-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Helper and Inheritance Deprecations #146
Merged
Ocramius
merged 7 commits into
laminas:2.21.x
from
gsteel:deprecate-inheritance-in-helpers
Mar 24, 2022
Merged
Helper and Inheritance Deprecations #146
Ocramius
merged 7 commits into
laminas:2.21.x
from
gsteel:deprecate-inheritance-in-helpers
Mar 24, 2022
Conversation
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
…structor - there is no need to reach into the view to retrieve one. Signed-off-by: George Steel <george@net-glue.co.uk>
…that you can manipulate response headers from the view layer. Signed-off-by: George Steel <george@net-glue.co.uk>
… the view model helper from the renderer favouring constructor injection of the helper. Also mark it as final Signed-off-by: George Steel <george@net-glue.co.uk>
…e marked as final. Signed-off-by: George Steel <george@net-glue.co.uk>
Signed-off-by: George Steel <george@net-glue.co.uk>
…ritance tree Signed-off-by: George Steel <george@net-glue.co.uk>
…e consistent with arguments to other helpers Signed-off-by: George Steel <george@net-glue.co.uk>
Let's split this up: gravatar added in smells a bit 😁 |
gsteel
force-pushed
the
deprecate-inheritance-in-helpers
branch
from
February 22, 2022 08:31
4c97a22
to
125f5f9
Compare
Ocramius
approved these changes
Mar 24, 2022
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.
LGTM, thanks @gsteel!
Few notes of things that may be improved in future:
- when checking against
Foo|null
, instead of! $foo
,$foo === null
is a better approach, as it will be picked up by static analysis, if the type changes - when casting
object
tostring
, use$object->__toString()
rather than(string) $object
, which avoids having regressions when$object
(by accident) is no longer anobject
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.
Description
setResponse()
so it's effectively justjson_encode()
(Eventually) - The response really shouldn't be modified in the view should it?The Gravatar helper is deprecated completely with all its setters and getters. An alternative implementation is provided that simply returns an tag based on its argumentsMoved to Deprecates and replaces the Gravatar helper with a simplified version… #147There's no need IMO to have this block a 2.20 release