Skip to content

feat: Laravel 12 Support #40

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

mahavishnup
Copy link

Pretty mush all test passes.

image
image

@mahavishnup mahavishnup mentioned this pull request Mar 17, 2025
@michael-rubel
Copy link
Owner

@mahavishnup Could you please update the GitHub Actions CI also to include Laravel 12?

Note: actions/cache should probably be updated to v4.

@mahavishnup
Copy link
Author

@michael-rubel, Upgraded actions/cache from v2 to v4 in workflow files.

@michael-rubel
Copy link
Owner

Now it's L12 tests and phpstan/pint is failing.

@mahavishnup
Copy link
Author

mahavishnup commented Mar 20, 2025

@michael-rubel, Now pint phpstan fix's and L12 test added

@michael-rubel
Copy link
Owner

Looks like nesbot/carbon should be adjusted based on the Laravel version. Take a look at how Spatie does that.

For L12 it should be version ^3.8.4.

@mahavishnup
Copy link
Author

@michael-rubel, carbon added

@michael-rubel
Copy link
Owner

@mahavishnup you haven't included a matrix variable for the composer require stage.

@mahavishnup
Copy link
Author

mahavishnup commented Mar 25, 2025

@michael-rubel, I guess now everything fine?

@michael-rubel
Copy link
Owner

@mahavishnup Unfortunately not, the version must be added to each variant. 😄

@mahavishnup
Copy link
Author

mahavishnup commented Mar 25, 2025

Ohh, no can you help me on this 😢, I'm not pro at package development.

@michael-rubel
Copy link
Owner

@mahavishnup Sure, no worries!

Take a look at these lines:
https://github.com/spatie/laravel-enum/blob/main/.github/workflows/run-tests.yml#L22
https://github.com/spatie/laravel-enum/blob/main/.github/workflows/run-tests.yml#L28

When the test runner initializes, it takes the version per every record in the matrix, i.e. the carbon version is added per every "include".

@mahavishnup
Copy link
Author

Hi @michael-rubel, carbon version added.

@michael-rubel
Copy link
Owner

It looks like testbench must also be passed from the matrix.

Example

@mahavishnup
Copy link
Author

mahavishnup commented Apr 1, 2025

testbench added. Now seems good to go.

@michael-rubel
Copy link
Owner

michael-rubel commented Apr 2, 2025

It seems like composer.json must be updated too. Take a look at phpunit and testbench dependencies.

@mahavishnup
Copy link
Author

mahavishnup commented Apr 2, 2025

Now it can be work, I guess

@michael-rubel
Copy link
Owner

michael-rubel commented Apr 3, 2025

Wow, you introduced too many changes. I guess you only needed to review dependencies in composer.json

P.S. You removed PHP 8.4 tests. 🥲
I suggest reverting that and modifying only composer.json

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