-
-
Notifications
You must be signed in to change notification settings - Fork 604
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
Mark all classes as readonly
#1091
base: 6.0.x
Are you sure you want to change the base?
Conversation
@@ -15,7 +15,7 @@ | |||
* Serves like a small DI container to simplify the creation and usage | |||
* of the objects. | |||
*/ | |||
final class Configuration | |||
final readonly class Configuration |
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.
We need to open a discussion about this component... its design is a bit too convoluted for me.
I'll post something soon...
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.
I'm curious
public static function new(Encoder $encoder, ClaimsFormatter $claimFormatter): self | ||
{ | ||
return new self($encoder, $claimFormatter); | ||
} |
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 is something that we'll need to coordinate in v5.5 the migration path for...
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.
Migration API added in #1092
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.
The changes are good, thanks.
I personally don't like the factory method Builder::new()
but it's a necessary evil to ensure that we don't have people injecting crazy stuff there.
This concern is easy to address with new |
Fix #1086
This PR needs a new
6.0.x
branch