Created
August 21, 2018 21:02
-
-
Save pierredup/dd729884a801af1ae89713f5617fa129 to your computer and use it in GitHub Desktop.
Add
This file contains 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\Config\Resource\FileResource; | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
use Symfony\Component\HttpKernel\Bundle\Bundle; | |
class AppBundle extends Bundle | |
{ | |
public function build(ContainerBuilder $container) | |
{ | |
// Add `test.php` as a resource to the container. | |
// Any changes to the file `test.php` will trigger the container cache to be rebuilt | |
// Note: This only works when Symfony is in development mode | |
$container->addResource(new FileResource(dirname(__DIR__).'/test.php')); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment