This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Bundle/FrameworkBundle
Jeremy Mikola 099b9dee1f [FrameworkBundle] Integrate Configuration\Builder class for config merging and normalization
This fixes some BC problems introduced in f9138d313b. Some top-level can now be simply enabled by providing true/null in PHP/YAML. Additionally, the Configuration\Builder allows options to be unset by providing "false" (helpful for overriding activation in a previous config file). All options supporting these behaviors can be found in the Configuration.php file (look for canBeUnset() and treatNull/TrueLike()).

Major changes:

 * Removed "enabled" option for profiler config. Profiler is now enabled if its config is true, null or a map.
 * Restore original config structure for validation namespaces. In PHP/YAML, namespaces are defined under annotations as an alternative to false (disabled) and true/null (enabled). For XML, annotation remains a boolean attribute for validation and a one or more optional namespace tags may appear within <app:validation />. During config normalization, namespace tags under validation will be moved to annotations to conform to the PHP/YAML structure (this occurs transparently to the user).
 * Restore behavior for router/templating config sections being optional (as shown in changes to session/validation test fixtures). If either top-level section is unset in the configuration, neither feature will be enabled and the user will no longer receive exceptions due to missing a resource option (router) or engines (templating). Resource/engines will still be properly required if the respective feature is enabled.
 * Remove unused router type option from XML config XSD. Type is only relevant for import statements, so this option is likely useless.

Additional small changes:

 * Added isset()'s, since config options may be unset
 * Wrap registerXxxConfiguration() calls in isset() checks
 * Load translation.xml in configLoad(), since it's always required
 * Default cache_warmer value (!kernel.debug) is determined via Configuration class

Things to be fixed:

 * Configuration\Builder doesn't seem to respect isRequired() and requiresAtLeastOneElement() (or I haven't set it properly); this should replace the need for FrameworkExtension to throw exceptions for bad router/templating configs
 * The config nodes for session options don't have the "pdo." prefix, as dots are not allowed in node names. To preserve BC for now, the "pdo." prefix is still allowed (and mandated by XSD) in configuration files. In the future, we may just want to do away with the "pdo." prefix.
 * Translator has an "enabled" option. If there's no use case for setting "fallback" independently (when "enabled" is false), perhaps "enabled" should be removed entirely and translator should function like profiler currently does.
 * Profiler matcher merging might need to be adjusted so multiple configs simply overwrite matcher instead of merging its array keys.
2011-02-06 20:50:12 +01:00
..
CacheWarmer removed the need to define getNamespace() and getPath() in bundles 2011-02-05 22:40:30 +01:00
Command [FrameworkBundle] fixed router:apache-dump command 2011-01-30 11:37:38 +01:00
Console changed method signature to use the new KernelInterface 2011-01-25 17:20:20 +01:00
Controller [FrameworkBundle] added a safeguard for infinite loops on some Windows configurations 2011-01-31 08:54:05 +01:00
DataCollector changed method signature to use the new KernelInterface 2011-01-25 17:20:20 +01:00
Debug changed the EventDispatcher and Event interfaces 2011-01-26 08:41:59 +01:00
DependencyInjection [FrameworkBundle] Integrate Configuration\Builder class for config merging and normalization 2011-02-06 20:50:12 +01:00
HttpCache renamed HttpKernel/Cache/ namespace to HttpKernel/HttpCache/ 2011-01-26 21:44:54 +01:00
HttpFoundation [FrameworkBundle] added session listener for test environment 2011-01-30 20:13:29 +01:00
Resources [FrameworkBundle] Integrate Configuration\Builder class for config merging and normalization 2011-02-06 20:50:12 +01:00
Routing [FrameworkBundle] made a small optimization 2011-01-27 14:32:30 +01:00
Templating [FrameworkBundle] fixed error message for template as an array 2011-02-06 20:22:57 +01:00
Test Removed assumption that phpunit.xml is relative 2011-01-24 07:35:45 +01:00
Tests [FrameworkBundle] Integrate Configuration\Builder class for config merging and normalization 2011-02-06 20:50:12 +01:00
Translation normalized license messages in PHP files 2011-01-18 08:07:46 +01:00
Util [Standards] Changing many instances of "boolean" to "Boolean". 2011-01-21 09:53:24 +01:00
Validator normalized license messages in PHP files 2011-01-18 08:07:46 +01:00
Client.php removed KernelInterface::reboot() method 2011-01-26 08:41:59 +01:00
EventDispatcher.php changed the EventDispatcher and Event interfaces 2011-01-26 08:41:59 +01:00
FrameworkBundle.php removed the need to define getNamespace() and getPath() in bundles 2011-02-05 22:40:30 +01:00
HttpKernel.php renamed HttpKernel/Cache/ namespace to HttpKernel/HttpCache/ 2011-01-26 21:44:54 +01:00
RequestListener.php [FrameworkBundle] added port number to the context passed in to the router 2011-02-04 00:26:18 +01:00