thephpleague / fractal

Output complex, flexible, AJAX/RESTful data structures.
fractal.thephpleague.com
MIT License
3.53k stars 351 forks source link

What a current state of this project? PHP8 support plans? #526

Closed Insolita closed 2 years ago

Insolita commented 2 years ago

The last commit was made more than a year ago. What is the project's future plans?

annuh commented 2 years ago

The latest release candidate (PHP 8.1 RC6) gives the following error:

Fatal error: During inheritance of JsonSerializable: Uncaught ErrorException: Return type of League\Fractal\Scope::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in vendor/league/fractal/src/Scope.php:298

Created a small fix for this: https://github.com/thephpleague/fractal/compare/master...annuh:support-php-8-1

# composer.json
{
    "repositories": [
        {
            "url": "https://github.com/annuh/fractal.git",
            "type": "vcs"
        }
    ],
    "require": {
        "league/fractal": "dev-support-php-8-1"
    }
}
patrick-radius commented 2 years ago

Please please don't leave us hanging here

matthewtrask commented 2 years ago

@patrick-radius @annuh @Insolita we are back, after life getting in the way and are currently working towards a 1.x with php 8 support. If there are specific things you want us to consider feature wise, please open a new issue with the request.

right now we currently support 7.4 with the latest release (0.20). However tests are currently passing with 8.0 and 8.1

I am going to close this for now as we are currently able to support 8.x