Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Contracts] Return the service directly in case it is not a callable #34709

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

Closed
wants to merge 1 commit into from

Conversation

jschaedl
Copy link
Contributor

Q A
Branch? master
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #34470
License MIT
Doc PR -

@stof
Copy link
Member

stof commented Nov 29, 2019

Given that the types described in the constructor signature say @param callable[] $factories, this looks like an invalid usage of the class.

@nicolas-grekas
Copy link
Member

What @stof said. Another approach would be to create a factory creating such locators - one that would wrap already instantiated objects into closures to fit the contract.

@nicolas-grekas nicolas-grekas added this to the 4.3 milestone Nov 29, 2019
@jschaedl
Copy link
Contributor Author

I will look into it.

@jschaedl jschaedl deleted the issue-34470 branch February 23, 2020 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error on listing environment variables
4 participants