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

php 8.4 - incompatibility #310

Closed
logic-b-o-m-b opened this issue Nov 28, 2024 · 3 comments
Closed

php 8.4 - incompatibility #310

logic-b-o-m-b opened this issue Nov 28, 2024 · 3 comments

Comments

@logic-b-o-m-b
Copy link

Pint Version

1.18.3

PHP Version

8.4.x

Description

I did not try pint with property hooks, or updated exit() / die() but they for sure cause issues to pint as well.

Steps To Reproduce

Create following class and try to pass it by pint.

class Example
{
    public function __construct(
        public private(set) ?string $text = null;
    ) {
        $this->text ??= 'Hello World!';
    }
}

Result: Fatal error: Multiple access type modifiers are not allowed on line XX

After removing redundant "public":

class Example
{
    public function __construct(
        private(set) ?string $text = null;
    ) {
        $this->text ??= 'Hello World!';
    }
}

Result: Parse error: syntax error, unexpected token ")", expecting amp on line XX

@Jubeki
Copy link
Contributor

Jubeki commented Nov 29, 2024

The underlying library PHP-CS-Fixer is currently working on PHP 8.4 compatibility (this does not include PHP 8.4 syntax specific fixers).
See the following milestone for more information:
https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/milestone/173

Furthermore is Laravel Pint working on PHP 8.4 compatibility:
See #304

Because this is a CLI tool and not Laravel/Illuminate directly, it is also waiting on laravel-zero to be compatible with PHP 8.4.

@logic-b-o-m-b
Copy link
Author

thank you @Jubeki

@crynobone
Copy link
Member

Duplicate of #304

Let's just monitor the status using the posted PR.

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

No branches or pull requests

3 participants