Skip to content

feat: support laravel 12 #50

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

Merged
merged 4 commits into from
May 12, 2025
Merged

feat: support laravel 12 #50

merged 4 commits into from
May 12, 2025

Conversation

ricklambrechts
Copy link
Member

@ricklambrechts ricklambrechts commented May 8, 2025

Also added #[\Override] attributes, psalm default configuration checks for this https://psalm.dev/docs/running_psalm/issues/MissingOverrideAttribute/.

The benefit is that PHP8.3 will throw a fatal exception when the #[\Override] is added to a specific function but the method does not override the parent method, if the method does not exists on the parent class for example.

@ricklambrechts ricklambrechts force-pushed the support-laravel branch 2 times, most recently from ec2ddd6 to 9ffa1a3 Compare May 12, 2025 12:14
@ricklambrechts ricklambrechts marked this pull request as ready for review May 12, 2025 12:20
@ricklambrechts ricklambrechts requested a review from a team as a code owner May 12, 2025 12:20
Copy link

@randh1r randh1r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, #[\Override] in php 8.3 is nice and as far as I know it's ignored in the previous versions right?

@ricklambrechts
Copy link
Member Author

ricklambrechts commented May 12, 2025

LGTM, #[\Override] in php 8.3 is nice and as far as I know it's ignored in the previous versions right?

It is indeed ignored/ has no effect in previous PHP versions. If wanted we could add this polyfill for IDE/linter support but I think this is not needed.
https://packagist.org/packages/symfony/polyfill-php83

The tests are successful and I have tested locally with an older version of PHP 8.1 then the CI and it did not give any errors with running the linters and tests.

@ricklambrechts ricklambrechts merged commit 20f88dc into main May 12, 2025
11 checks passed
@ricklambrechts ricklambrechts deleted the support-laravel branch May 12, 2025 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants