Commits -------8710a13
Added example to the change log filec9a2b49
Fixed xml encoder test script, and group `item` tags into an arraya0561e5
Replaced `item` with `*item` when parsing XML string Discussion ---------- Replaced `item` with `*item` when parsing XML string --------------------------------------------------------------------------- by fabpot at 2011/11/23 22:14:12 -0800 Tests do not pass: 1) Symfony\Tests\Component\Serializer\Encoder\XmlEncoderTest::testDecode Failed asserting that two arrays are equal. --- Expected +++ Actual @@ @@ 'key2' => 'val' - 'A B' => 'bar' 'Barry' => Array (...) + 'item' => Array (...) ) 'qux' => '1' ) .../tests/Symfony/Tests/Component/Serializer/Encoder/XmlEncoderTest.php:173 --------------------------------------------------------------------------- by fabpot at 2011/11/24 22:57:37 -0800 I don't understand the patch anymore. I don't see any use of `*item` in the code. --------------------------------------------------------------------------- by excelwebzone at 2011/11/24 23:04:07 -0800 I run some testing and you can't use '*item' XML parser reject it. So I modified it to convert it to an array.. Look at the test script change --------------------------------------------------------------------------- by fabpot at 2011/11/24 23:13:30 -0800 So, you probably need to change the CHANGELOG as well? You should add an example which shows a before/after example. --------------------------------------------------------------------------- by excelwebzone at 2011/11/24 23:15:51 -0800 Yes, forgot to change that.. --------------------------------------------------------------------------- by fabpot at 2011/11/25 01:27:42 -0800 ping @Seldaek, @lsmith77 --------------------------------------------------------------------------- by Seldaek at 2011/11/25 04:16:43 -0800 There are other meta-names available in the XmlEncoder, @-something for attributes, then there is something happening with a # but I'm not quite sure what. I'm just saying, maybe *item isn't the best name, if it introduces a third metacharacter. Apart from that I'm fine with it. --------------------------------------------------------------------------- by excelwebzone at 2011/11/25 08:45:31 -0800 Maybe we can rename it to `wildcard` instead --------------------------------------------------------------------------- by excelwebzone at 2011/11/25 15:12:09 -0800 Any chance we can push this throw? --------------------------------------------------------------------------- by lsmith77 at 2011/11/27 04:06:25 -0800 here is the old PR #2682 @Seldaek: i think your comment was made for an older version of the patch. overall I am fine with the change, the Serializer component takes a fairly simple approach. it is also not designed to really produce XML or JSON cleanly from the same data. it will really only be able to output a clean API for one or the other with the same data structure. --------------------------------------------------------------------------- by excelwebzone at 2011/12/01 06:25:24 -0800 @fabpot can we merge this change
7.0 KiB
CHANGELOG for 2.1.x
This changelog references the relevant changes (bug and security fixes) done in 2.1 minor versions.
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.1.0...v2.1.1
2.1.0
DoctrineBrige
- added a default implementation of the ManagerRegistry
- added a session storage for Doctrine DBAL
AbstractDoctrineBundle
- This bundle has been removed and the relevant code has been moved to the Doctrine bridge
DoctrineBundle
- added optional
group_by
property toEntityType
that supports either aPropertyPath
or a\Closure
that is evaluated on the entity choices - The
em
option for theUniqueEntity
constraint is now optional (and should probably not be used anymore).
FrameworkBundle
- added a router:match command
- added kernel.event_subscriber tag
- added a way to create relative symlinks when running assets:install command (--relative option)
- added Controller::getUser()
- [BC BREAK] assets_base_urls and base_urls merging strategy has changed
- changed the default profiler storage to use the filesystem instead of SQLite
- added support for placeholders in route defaults and requirements (replaced by the value set in the service container)
SecurityBundle
-
[BC BREAK] The custom factories for the firewall configuration are now registered during the build method of bundles instead of being registered by the end-user (you need to remove the 'factories' keys in your security configuration).
-
[BC BREAK] The Firewall listener is now registered after the Router one. It means that specific Firewall URLs (like /login_check and /logout must now have proper route defined in your routing configuration)
-
[BC BREAK] refactored the user provider configuration. The configuration changed for the chain provider and the memory provider:
Before:
security: providers: my_chain_provider: providers: [my_memory_provider, my_doctrine_provider] my_memory_provider: users: toto: { password: foobar, roles: [ROLE_USER] } foo: { password: bar, roles: [ROLE_USER, ROLE_ADMIN] }
After:
security: providers: my_chain_provider: chain: providers: [my_memory_provider, my_doctrine_provider] my_memory_provider: memory: users: toto: { password: foobar, roles: [ROLE_USER] } foo: { password: bar, roles: [ROLE_USER, ROLE_ADMIN] }
-
added a validator for the user password
-
added 'erase_credentials' as a configuration key (true by default)
-
added new events:
security.authentication.success
andsecurity.authentication.failure
fired on authentication success/failure, regardless of authentication method, events are defined in new event class:Symfony\Component\Security\Core\AuthenticationEvents
.
SwiftmailerBundle
- moved the data collector to the bridge
- replaced MessageLogger class with the one from Swiftmailer 4.1.3
TwigBundle
- added the real template name when an error occurs in a Twig template
WebProfilerBundle
- added a routing panel
- added a timeline panel
- The toolbar position can now be configured via the
position
option (can betop
orbottom
)
Config
- implemented
Serializable
on resources
Console
- made the defaults (helper set, commands, input definition) in Application more easily customizable
- added support for the shell even if readline is not available
ClassLoader
- added support for loading globally-installed PEAR packages
DomCrawler
- added a way to get parsing errors for Crawler::addHtmlContent() and Crawler::addXmlContent() via libxml functions
- added support for submitting a form without a submit button
EventDispatcher
- added a reference to the EventDispatcher on the Event
- added a reference to the Event name on the event
Finder
- Finder::exclude() now supports an array of directories as an argument
Form
- added support for validation groups as callbacks
- made the translation catalogue configurable via the "translation_domain" option
- added Form::getErrorsAsString() to help debugging forms
- allowed setting different options for RepeatedType fields (like the label)
HttpFoundation
- made Response::prepare() method the place to enforce HTTP specification
- [BC BREAK] moved management of the locale from the Session class to the Request class
- added a generic access to the PHP built-in filter mechanism: ParameterBag::filter()
- made FileBinaryMimeTypeGuesser command configurable
- added Request::getUser() and Request::getPassword()
- added support for the PATCH method in Request
- removed the ContentTypeMimeTypeGuesser class as it is deprecated and never used on PHP 5.3
- added ResponseHeaderBag::makeDisposition() (implements RFC 6266)
- made mimetype to extension conversion configurable
HttpKernel
- added a Stopwatch class
- added WarmableInterface
- improved extensibility between bundles
- added a File-based profiler storage
- added a MongoDB-based profiler storage
Locale
- added Locale::getIcuVersion() and Locale::getIcuDataVersion()
Routing
- added a TraceableUrlMatcher
- added the possibility to define default values and requirements for placeholders in prefix
- added RouterInterface::getRouteCollection
Security
- after login, the user is now redirected to
default_target_path
ifuse_referer
is true and the referrer is thelogin_path
. - added a way to remove a token from a session
Serializer
-
[BC BREAK] convert the
item
XML tag to an arrayBefore:
Array()
After:
Array( [item] => Array( [0] => Array( [title] => title1 ) [1] => Array( [title] => title2 ) ) )
Translation
- added support for gettext
- added support for more than one fallback locale
- added support for translations in ResourceBundles
- added support for extracting translation messages from templates (Twig and PHP)
- added dumpers for translation catalogs
- added support for QT translations
Validator
- added support for
ctype_*
assertions inTypeValidator
- added a Size validator
- added a SizeLength validator
- improved the ImageValidator with min width, max width, min height, and max height constraints
- added support for MIME with wildcard in FileValidator
Yaml
- Yaml::parse() does not evaluate loaded files as PHP files by default anymore (call Yaml::enablePhpParsing() to get back the old behavior)