Last active
August 29, 2015 14:07
-
-
Save smottt/c303cdac85126ce9f09e to your computer and use it in GitHub Desktop.
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\DependencyInjection\ContainerBuilder; | |
$container = new ContainerBuilder(); | |
// ... set up the container | |
// might be helpful to check if the service is synthetic | |
var_dump($container->getDefinition('my.synthetic.service')->isSynthetic()); // true | |
if ($container->hasDefinition('my.synthetic.service')) { | |
$container->set('my.synthetic.service', new SyntheticService()); | |
} | |
var_dump($container->hasDefinition('my.synthetic.service')); // false | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a bad work with "Synthetic" mode of service.