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
Remove references to unused EnvironmentInterface #2625
Remove references to unused EnvironmentInterface #2625
Conversation
Slim/Http/Environment.php
Outdated
@@ -18,7 +17,7 @@ | |||
* This is particularly useful for unit testing, but it also lets us create | |||
* custom sub-requests. | |||
*/ | |||
class Environment extends Collection implements EnvironmentInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bit feels like worth keeping to me, the class does implement the interface and who knows how it's used/hinted downstream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Will put it back later tonight.
Thanks @jdrieghe |
@akrabat should we change the reference on this page as well? https://github.com/slimphp/Slim-Website/blob/328758f4ecd0400ec14efc280e8d3b9051f39bed/docs/v3/concepts/di.md |
Yes. |
One of the proposed solutions in this issue (#2548) is to no longer reference the
EnvironmentInterface
in the docs, which I believe extends to type hints in the code.I don't think removing
EnvironmentInterface
completely is possible without shipping a breaking change as people might have extended theEnvironment
specifically implemented theEnvironmentInterface
again in their extension.Unless someone is willing to rework the
EnvironmentInterface
and the rest of the framework to accept any implementation of this interface, I think this fix might be serviceable to manage developer expectations.If this solution is accepted I will create a similar pull request to the documentation to replace these references: https://github.com/slimphp/Slim-Documentation/search?q=EnvironmentInterface&unscoped_q=EnvironmentInterface