Commit Graph

759 Commits

Author SHA1 Message Date
Fabien Potencier
f0c558592c Merge remote branch 'everzet/console-formatter-refactoring' 2011-03-18 11:58:05 +01:00
Fabien Potencier
3627eee3c6 Merge remote branch 'vicb/cfg_rebase'
* vicb/cfg_rebase:
  [Config] Ability to add and override node types without having to subclass NodeBuilder
  [DoctrineBundle] Fix some typos
  [SwiftMailerBundle] Fix a merge issue in the configuration
  Tweak PHPDocs in the extension configuration files
  [Config] Component refactoring
2011-03-18 11:41:43 +01:00
Fabien Potencier
136b23ead4 [EventDispatcher] refactored the code
* The array returned by getListeners() now removes the listener hash as the key (as this is an implementation detail)
 * The sort method now guarantees that a listener registered before another will stay in the same order even for the same priority (for BC)
 * Made various optimizations
2011-03-18 09:01:22 +01:00
Fabien Potencier
69d324eca8 [EventDispatcher] added EventDispatcher::removeSubscriber() 2011-03-18 09:00:58 +01:00
Fabien Potencier
9e88fc4e66 Merge remote branch 'kriswallsmith/kernel/uploaded-file-for-test' 2011-03-18 08:02:16 +01:00
Victor Berchet
9fd7d05ecf [Config] Ability to add and override node types without having to subclass NodeBuilder 2011-03-18 00:32:35 +01:00
Kris Wallsmith
0a229947a6 [Form] updated tests for changes in HttpFoundation 2011-03-17 16:09:12 -07:00
Kris Wallsmith
ab3b8ac364 [HttpFoundation] cleaned up comments and coding standards, added better exception messages when filesystem functions throw errors, added "moved" arg to UploadedFile constructor, added FileNotFoundException to UploadedFile per the parent constructor 2011-03-17 16:07:53 -07:00
Kris Wallsmith
69609257ac [DomCrawler] updated upload logic to better emulate a real upload by copying the source file to the temp directory 2011-03-17 16:06:47 -07:00
Fabien Potencier
6c8e71c8e7 renamed filterCore* to onCore*
The onCore* events are fired at some pre-defined points during the
handling of a request. At this is more important than the fact
that you can change things from the event.
2011-03-17 17:01:59 +01:00
ever.zet
8b55c239a2 [Console] updated output tests after formatter adding 2011-03-17 17:53:28 +02:00
ever.zet
4fe2efd49e [Console] implemented output formatter to decorate and format output messages 2011-03-17 17:51:49 +02:00
ever.zet
e5700b817b [Console] implemented output formatter style class for defining custom styles 2011-03-17 17:51:25 +02:00
Victor Berchet
1e0ed22c55 [Config] Component refactoring
The Config component API have changed and the extension configuration files must be updated accordingly:

1. Array nodes must enclosed their children definition in ->children() ... ->end() calls:

Before:

    $treeBuilder->root('zend', 'array')
        ->arrayNode('logger')
            ->scalarNode('priority')->defaultValue('INFO')->end()
            ->booleanNode('log_errors')->defaultFalse()->end()
        ->end();

After:

    $treeBuilder->root('zend', 'array')
        ->children()
            ->arrayNode('logger')
                ->children()
                    ->scalarNode('priority')->defaultValue('INFO')->end()
                    ->booleanNode('log_errors')->defaultFalse()->end()
                ->end()
            ->end()
        ->end();

2. The 'builder' method (in NodeBuilder) has been dropped in favor of an 'append' method (in ArrayNodeDefinition)

Before:

    $treeBuilder->root('doctrine', 'array')
        ->arrayNode('dbal')
            ->builder($this->getDbalConnectionsNode())
        ->end();

After:

    $treeBuilder->root('doctrine', 'array')
        ->children()
            ->arrayNode('dbal')
                ->append($this->getDbalConnectionsNode())
            ->end()
        ->end();

3. The root of a TreeBuilder is now an NodeDefinition (and most probably an ArrayNodeDefinition):

Before:

    $root = $treeBuilder->root('doctrine', 'array');
    $this->addDbalSection($root);

    public function addDbalSection(NodeBuilder $node)
    {
        ...
    }

After:

    $root = $treeBuilder->root('doctrine', 'array');
    $this->addDbalSection($root);

    public function addDbalSection(ArrayNodeDefinition $node)
    {
        ...
    }

4. The NodeBuilder API has changed (this is seldom used):

Before:

    $node = new NodeBuilder('connections', 'array');

After:

The recommended way is to use a tree builder:

    $treeBuilder = new TreeBuilder();
    $node = $treeBuilder->root('connections', 'array');

An other way would be:

    $builder = new NodeBuilder();
    $node = $builder->node('connections', 'array');

Some notes:

- Tree root nodes should most always be array nodes, so this as been made the default:

    $treeBuilder->root('doctrine', 'array') is equivalent to $treeBuilder->root('doctrine')

- There could be more than one ->children() ... ->end() sections. This could help with the readability:

    $treeBuilder->root('doctrine')
        ->children()
            ->scalarNode('default_connection')->end()
        ->end()
        ->fixXmlConfig('type')
        ->children()
            ->arrayNode('types')
                ....
            ->end()
        ->end()
2011-03-17 16:26:15 +01:00
Fabien Potencier
1219b98ec5 renamed some methods in the event dispatcher 2011-03-17 15:27:42 +01:00
Bernhard Schussek
466f1b99c5 [Security] Fixed method names in the Firewall listeners 2011-03-17 13:24:23 +01:00
Bernhard Schussek
5f14d8d6aa Merge remote branch 'symfony/master' into event-manager
Conflicts:
	src/Symfony/Bundle/AsseticBundle/CacheWarmer/AssetWriterCacheWarmer.php
	src/Symfony/Bundle/AsseticBundle/Tests/CacheWarmer/AssetWriterCacheWarmerTest.php
	src/Symfony/Bundle/FrameworkBundle/Profiler/ProfilerListener.php
	src/Symfony/Bundle/FrameworkBundle/Resources/config/profiling.xml
	src/Symfony/Component/HttpKernel/HttpKernel.php
	src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php
	src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php
2011-03-17 12:34:12 +01:00
Fabien Potencier
c5c8e57754 [Locale] updated the tests so that we can be green again (previous version always add 2 skipped tests) 2011-03-17 12:20:37 +01:00
Bernhard Schussek
73464f411e Merge remote branch 'Infranology/intl-stub' into intl-stub 2011-03-17 11:20:52 +01:00
Bernhard Schussek
f966c30c8b Merge remote branch 'symfony/master' into intl-stub 2011-03-17 11:20:25 +01:00
Fabien Potencier
7edb1a5f13 fixed previous commit 2011-03-16 21:39:30 +01:00
Fabien Potencier
005287ac88 Merge remote branch 'kriswallsmith/templating/asset-packages' 2011-03-16 16:18:45 +01:00
Fabien Potencier
bf938cc885 Merge remote branch 'rrehbeindoi/master' 2011-03-16 16:03:14 +01:00
Fabien Potencier
8cc37eaa23 [HttpKernel] fixed CS 2011-03-16 15:16:21 +01:00
Fabien Potencier
f9d2f69ca8 Merge remote branch 'janschumann/mysql_profiler_storage' 2011-03-16 15:09:07 +01:00
Ray
73f70ae53c Merge remote branch 'symfony/master' 2011-03-16 09:00:13 -05:00
Ray
e83629139c Added matching test to mirror the xml file loader test 2011-03-16 08:56:26 -05:00
Fabien Potencier
ac49289451 Merge remote branch 'rrehbeindoi/master' 2011-03-16 14:44:44 +01:00
Kris Wallsmith
a5d8770a54 [HttpFoundation] fixed ApacheRequest, added tests 2011-03-16 06:13:01 -07:00
Ray
c2908cdaa0 Allow collection's internal keys to be mixed case 2011-03-15 09:35:40 -05:00
Jan Schumann
d1ebc8da9f - Added abstract PDO profiler storage, updated sqlite storage and added a mysql storage.
- Updated profiler config in framework bundle
2011-03-15 14:08:43 +01:00
Fabien Potencier
e5fad94482 [HttpKernel] fixed a unit test 2011-03-15 13:43:45 +01:00
Johannes M. Schmitt
98216a9af2 [DependencyInjection] refactored some more exceptions 2011-03-14 21:14:49 +01:00
Johannes M. Schmitt
4539b47522 [Security] small performance optimization 2011-03-14 17:41:33 +01:00
Eriksen Costa
157f001253 Merge remote branch 'bschussek/intl-stub' into intl-stub 2011-03-13 21:50:25 -03:00
Eriksen Costa
9c6ccd8290 [Locale] replaced symfony-project.org by symfony.com 2011-03-13 21:22:11 -03:00
Eriksen Costa
50aee60e9b Merge branch 'master' into intl-stub 2011-03-13 21:20:57 -03:00
Bernhard Schussek
06c682b4fb Switched from Doctrine's EventManager implementation to the EventManager clone in Symfony2 (now called EventDispatcher again) 2011-03-13 19:49:10 +01:00
Bernhard Schussek
699e046b4f [EventDispatcher] Replaced EventDispatcher by Doctrine's implementation 2011-03-13 19:15:38 +01:00
Bernhard Schussek
25931caeab Merge remote branch 'symfony/master' into event-manager
Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Debug/TraceableEventManager.php
	src/Symfony/Bundle/WebProfilerBundle/WebDebugToolbarListener.php
	src/Symfony/Component/Security/Http/Firewall.php
	src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php
	src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php
	src/Symfony/Component/Security/Http/Firewall/AccessListener.php
	src/Symfony/Component/Security/Http/Firewall/AnonymousAuthenticationListener.php
	src/Symfony/Component/Security/Http/Firewall/BasicAuthenticationListener.php
	src/Symfony/Component/Security/Http/Firewall/ChannelListener.php
	src/Symfony/Component/Security/Http/Firewall/ContextListener.php
	src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php
	src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php
	src/Symfony/Component/Security/Http/Firewall/ListenerInterface.php
	src/Symfony/Component/Security/Http/Firewall/LogoutListener.php
	src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php
	src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php
	tests/Symfony/Tests/Component/Security/Http/Firewall/RememberMeListenerTest.php
2011-03-13 19:15:25 +01:00
Artur Kotyrba
3f73a748a9 [Routing] Fixed compiling routes with empty string or 0 as default parameter value. 2011-03-13 18:13:41 +01:00
Pascal Borreli
fb33358d20 [Security] Fixed test 2011-03-12 16:17:42 -08:00
Fabien Potencier
411a382d80 [Serializer] fixed XmlEncoder for single char tags 2011-03-12 15:23:30 +01:00
Johannes Schmitt
70867f06e9 re-added a __toString method for debugging purposes 2011-03-12 13:24:57 +01:00
ever.zet
5ec8f47d7c if proper style not found, then this is a tag - no need in Exception 2011-03-12 11:55:44 +02:00
ever.zet
9cc3e1bd87 added ability to clear TestConsole 2011-03-12 11:55:01 +02:00
Fabien Potencier
bc6ffeef83 [HttpFoundation] fixed flash management 2011-03-11 20:23:17 +01:00
Fabien Potencier
a1fcbf4d5f Merge remote branch 'kriswallsmith/dic/false-circular-ref-fix'
* kriswallsmith/dic/false-circular-ref-fix:
  [DependencyInjection] fixed false positive when detecting circular references if a service throws an exception during creation
2011-03-11 19:58:54 +01:00
Fabien Potencier
cedf588e98 Revert "Merge remote branch 'kriswallsmith/dic/lazy-replace-ext-params'"
This reverts commit 32ac2e8709, reversing
changes made to 6e81c28ca4.
2011-03-11 15:35:09 +01:00
Fabien Potencier
f321fadad6 [DependencyInjection] moved most protected things to private 2011-03-11 14:50:46 +01:00