Skip to content

Commit

Permalink
moved ErrorHandler management to the distributions
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed May 5, 2011
1 parent 0f0e581 commit ca3c5e6
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 28 deletions.
3 changes: 3 additions & 0 deletions UPDATE.md
Expand Up @@ -9,6 +9,9 @@ timeline closely anyway.
beta1 to beta2
--------------

* The ``error_handler`` setting has been removed. The ``ErrorHandler`` class
is now managed directly by Symfony SE in ``AppKernel``.

* The Doctrine metadata files has moved from
``Resources/config/doctrine/metadata/orm/`` to ``Resources/config/`` and the
extension from ``.dcm.yml`` to ``.orm.dcm.yml``
Expand Down
@@ -1,6 +1,5 @@
framework:
charset: UTF-8
error_handler: null
secret: xxxxxxxxxx
csrf_protection:
enabled: true
Expand Down
Expand Up @@ -40,7 +40,6 @@ public function getConfigTreeBuilder()
->scalarNode('cache_warmer')->defaultValue(!$this->debug)->end()
->scalarNode('charset')->end()
->scalarNode('secret')->isRequired()->end()
->scalarNode('error_handler')->end()
->scalarNode('exception_controller')->defaultValue('Symfony\\Bundle\\FrameworkBundle\\Controller\\ExceptionController::showAction')->end()
->scalarNode('ide')->defaultNull()->end()
->booleanNode('test')->end()
Expand Down
Expand Up @@ -67,17 +67,6 @@ public function load(array $configs, ContainerBuilder $container)

$container->setParameter('kernel.secret', $config['secret']);

if (isset($config['error_handler'])) {
if (false === $config['error_handler']) {
$container->getDefinition('error_handler')->setMethodCalls(array());
} else {
$container
->getDefinition('error_handler')->addMethodCall('register', array())
->replaceArgument(0, $config['error_handler'])
;
}
}

$container->getDefinition('exception_listener')->replaceArgument(0, $config['exception_controller']);

if (!empty($config['test'])) {
Expand Down
10 changes: 0 additions & 10 deletions src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php
Expand Up @@ -34,16 +34,6 @@
*/
class FrameworkBundle extends Bundle
{
/**
* Boots the Bundle.
*/
public function boot()
{
if ($this->container->has('error_handler')) {
$this->container->get('error_handler');
}
}

public function build(ContainerBuilder $container)
{
parent::build($container);
Expand Down
Expand Up @@ -7,7 +7,6 @@
<parameters>
<parameter key="event_dispatcher.class">Symfony\Bundle\FrameworkBundle\ContainerAwareEventDispatcher</parameter>
<parameter key="http_kernel.class">Symfony\Bundle\FrameworkBundle\HttpKernel</parameter>
<parameter key="error_handler.class">Symfony\Component\HttpKernel\Debug\ErrorHandler</parameter>
<parameter key="filesystem.class">Symfony\Component\HttpKernel\Util\Filesystem</parameter>
<parameter key="cache_warmer.class">Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate</parameter>
<parameter key="file_locator.class">Symfony\Component\HttpKernel\Config\FileLocator</parameter>
Expand All @@ -18,10 +17,6 @@
<argument type="service" id="service_container" />
</service>

<service id="error_handler" class="%error_handler.class%">
<argument /> <!-- level (null by default) -->
</service>

<service id="http_kernel" class="%http_kernel.class%">
<argument type="service" id="event_dispatcher" />
<argument type="service" id="service_container" />
Expand Down

5 comments on commit ca3c5e6

@marijn
Copy link

@marijn marijn commented on ca3c5e6 May 5, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it be included in all distributions?

@brikou
Copy link
Contributor

@brikou brikou commented on ca3c5e6 May 5, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fabpbot I made a pr in symfony standard to reflect change in test config

@fabpot
Copy link
Member Author

@fabpot fabpot commented on ca3c5e6 May 5, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marijn: it's already included in Symfony SE.

@marijn
Copy link

@marijn marijn commented on ca3c5e6 May 5, 2011 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stof
Copy link
Member

@stof stof commented on ca3c5e6 May 5, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dot-i-fy it is generated by the bin/build_bootstrap.php script

Please sign in to comment.