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

Laravel 11.x Compatibility #721

Merged
merged 16 commits into from
Apr 21, 2024

Conversation

laravel-shift
Copy link
Contributor

This is an automated pull request from Shift to update your package code and dependencies to be compatible with Laravel 11.x.

Before merging, you need to:

  • Checkout the l11-compatibility branch
  • Review all comments for additional changes
  • Thoroughly test your package

If you do find an issue, please report it by commenting on this PR to help improve future automation.

@laravel-shift
Copy link
Contributor Author

⚗️ Using this package? If you would like to help test these changes or believe them to be compatible, you may update your project to reference this branch.

To do so, temporarily add Shift's fork to the repositories property of your composer.json:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/laravel-shift/laravel-form-builder.git"
        }
    ]
}

Then update your dependency constraint to reference this branch:

{
    "require": {
        "kris/laravel-form-builder": "dev-l11-compatibility",
    }
}

Finally, run: composer update

@rudiedirkx
Copy link
Collaborator

Tests pass, buttttt with Laravel 10, not 11. Maybe the test should have a version matrix for PHP + Laravel, so we can explicitly test L9, L10 and L11.

@webpioneer23
Copy link

I need this module for Laravel v11. I tried to install the module with the above guide, but I've got error. When will this module be ready to work in laravel v11?

@rudiedirkx
Copy link
Collaborator

We need betters tests in .github/workflows/test.yml. Laravel 11 isn't tested now. We need a better matrix that tests [php 8.0, 8.1, 8.2, 8.3] x [laravel 9, 10, 11] (with some hard-coded exceptions like L11 on P8.0). I'll give it a shot today.

@rudiedirkx
Copy link
Collaborator

The test matrix works, butttt all Laravel 11 tests fail. @webpioneer23 How do you feel about finding out why and fix them? :D Check out this branch, and then run composer require illuminate/database:^11.0 illuminate/validation:^11.0 to install Laravel 11, and then run vendor/bin/phpunit to see what's wrong.

@rudiedirkx rudiedirkx linked an issue Mar 26, 2024 that may be closed by this pull request
@hooman-mirghasemi
Copy link

I check it, if you change composer like this:

"require-dev": {
    "orchestra/testbench": "^6.13 || ^7 || ^8 || ^9",
    "phpunit/phpunit": "^10.0.0"
},

all of your test with laravel 11 will pass.

The issue is for PHP unite 11, if want to use PHP unite 11 you should change tests and remove all @test annotation and use test in function name with camelcase . see:
https://phpunit.de/getting-started/phpunit-11.html
and
https://phpunit.de/announcements/phpunit-11.html
Metadata section

@rudiedirkx
Copy link
Collaborator

@hooman-mirghasemi Almost perfect. All we have to do now is tell the Github workflow to use phpunit 9.x for Laravel 9. More matrix?

@rudiedirkx
Copy link
Collaborator

Laravel 11 seems to work fine. And Github tests too 👍

Thanks @hooman-mirghasemi

@rudiedirkx rudiedirkx merged commit 8ef6b44 into kristijanhusak:master Apr 21, 2024
8 checks passed
@hooman-mirghasemi
Copy link

your welcome
now only we need new tag (version) of this repo.

@rudiedirkx
Copy link
Collaborator

rudiedirkx commented Apr 23, 2024

Voila 1.53

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.

Support for Laravel 11
4 participants