Created
August 21, 2018 21:10
-
-
Save pierredup/10e3c1a435bb11803aa5c759201ffb82 to your computer and use it in GitHub Desktop.
Track class for changes to rebuilt container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
use Symfony\Component\HttpKernel\Bundle\Bundle; | |
class AppBundle extends Bundle | |
{ | |
public function build(ContainerBuilder $container) | |
{ | |
// Any changes to the MyConfig class will trigger the container cache to be rebuilt | |
// Note: This only works when Symfony is in development mode | |
$container->addObjectResource(MyConfig::class); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment