Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to define 2 service with the same name for differents environnements #183

Open
walva opened this issue Nov 26, 2014 · 0 comments
Open

Comments

@walva
Copy link

walva commented Nov 26, 2014

Hi there,

In my application, I need a service with 2 différents behaviors according to the current environnement. Here is the interface of my service.

interface FileSystemManagerInterface
{
    public function getFilesystemForContext($context = null);

    public function createPicture($context);

    public function configurePicture(Picture $picture, $context);
}

And I have 2 implementations : first)

@Service("CENSORED.filesystem.manager", environments={"prod"})
class AmazonS3FileSystemManager implements FileSystemManagerInterface

second)

@Service("CENSORED.filesystem.manager", environments={"dev"})
class LocalFileSystemManager implements FileSystemManagerInterface

Unfortunately, in the dev environment I get the AmazonS3FileSystemManager. I think I'm missing something :o

wodka added a commit to wodka/JMSDiExtraBundle that referenced this issue Feb 15, 2016
wodka added a commit to wodka/JMSDiExtraBundle that referenced this issue Feb 16, 2016
add deprecation warnings
add tests
fix schmittjoh#183
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant