Remove references to unused EnvironmentInterface#2625
Merged
akrabat merged 1 commit intoslimphp:3.xfrom Apr 8, 2019
jdrieghe:remove-pointless-environment-interface
Merged
Remove references to unused EnvironmentInterface#2625akrabat merged 1 commit intoslimphp:3.xfrom jdrieghe:remove-pointless-environment-interface
akrabat merged 1 commit intoslimphp:3.xfrom
jdrieghe:remove-pointless-environment-interface
Conversation
Rarst
reviewed
Apr 5, 2019
| * This is particularly useful for unit testing, but it also lets us create | ||
| * custom sub-requests. | ||
| */ | ||
| class Environment extends Collection implements EnvironmentInterface |
Contributor
There was a problem hiding this comment.
This bit feels like worth keeping to me, the class does implement the interface and who knows how it's used/hinted downstream.
Author
There was a problem hiding this comment.
Good point. Will put it back later tonight.
akrabat
approved these changes
Apr 8, 2019
akrabat
added a commit
that referenced
this pull request
Apr 8, 2019
Member
|
Thanks @jdrieghe |
Author
|
@akrabat should we change the reference on this page as well? https://github.com/slimphp/Slim-Website/blob/328758f4ecd0400ec14efc280e8d3b9051f39bed/docs/v3/concepts/di.md |
Member
Yes. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One of the proposed solutions in this issue (#2548) is to no longer reference the
EnvironmentInterfacein the docs, which I believe extends to type hints in the code.I don't think removing
EnvironmentInterfacecompletely is possible without shipping a breaking change as people might have extended theEnvironmentspecifically implemented theEnvironmentInterfaceagain in their extension.Unless someone is willing to rework the
EnvironmentInterfaceand 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