Skip to content
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

Merged
merged 1 commit into from
Jan 29, 2025
Merged

Conversation

Slamdunk
Copy link
Collaborator

@Slamdunk Slamdunk commented Dec 4, 2024

Fix #1086

This PR needs a new 6.0.x branch

@Slamdunk Slamdunk added this to the 6.0.0 milestone Dec 4, 2024
@lcobucci lcobucci changed the base branch from 5.5.x to 6.0.x December 4, 2024 19:46
src/Configuration.php Outdated Show resolved Hide resolved
src/Token/Builder.php Outdated Show resolved Hide resolved
Copy link
Owner

@lcobucci lcobucci left a 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.

@Slamdunk
Copy link
Collaborator Author

Slamdunk commented Dec 5, 2024

I personally don't like the factory method Builder::new()

This concern is easy to address with new Headers, Header, Claims, RegisteredClaims, UnregisteredClaim, RegisteredClaim objects and so on, but it would probabily be a bit overkill

@Slamdunk Slamdunk force-pushed the readonly_classes branch 2 times, most recently from 55638e5 to c1daba7 Compare January 29, 2025 07:08
@Slamdunk Slamdunk merged commit 829cabf into lcobucci:6.0.x Jan 29, 2025
17 of 18 checks passed
@Slamdunk Slamdunk deleted the readonly_classes branch January 29, 2025 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Token\Builder really readonly
2 participants