kristijanhusak / laravel-form-builder

Laravel Form builder for version 5+!
https://packagist.org/packages/kris/laravel-form-builder
MIT License
1.7k stars 298 forks source link

Laravel 11.x Compatibility #721

Closed laravel-shift closed 5 months ago

laravel-shift commented 7 months ago

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:

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

laravel-shift commented 7 months ago

:alembic: 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 commented 7 months ago

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 commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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.

hooman-mirghasemi commented 5 months ago

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 commented 5 months ago

@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 commented 5 months ago

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

Thanks @hooman-mirghasemi

hooman-mirghasemi commented 5 months ago

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

rudiedirkx commented 5 months ago

Voila 1.53