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

[1.x] Supports PHP 8.4 #304

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

[1.x] Supports PHP 8.4 #304

wants to merge 6 commits into from

Conversation

crynobone
Copy link
Member

@crynobone crynobone commented Nov 12, 2024

composer.json and composer.lock was updated using:

composer update --patch-only --bump-after-update

@Jubeki
Copy link
Contributor

Jubeki commented Nov 12, 2024

Hey @crynobone there are deprecations in the PHP 8.4 Unit Tests when running vendor/bin/pest.

This is probably due to using Laravel Zero v10 and illuminate/view v10 instead of v11.

@crynobone crynobone marked this pull request as draft November 12, 2024 13:37
Signed-off-by: Mior Muhammad Zaki <[email protected]>
@mokhosh
Copy link

mokhosh commented Nov 23, 2024

@crynobone this should be fine to merge?

@Jubeki
Copy link
Contributor

Jubeki commented Nov 24, 2024

@mokhosh I think this is pending the next release of illuminate/xxx 10.48.5 (so probably Tuesday)

@Jubeki
Copy link
Contributor

Jubeki commented Nov 25, 2024

@crynobone I am not sure if Laravel Pint can fully support PHP 8.4 for now.

PHP-CS-Fixer has not full PHP 8.4 support. A corresponding, PR is WIP: PHP-CS-Fixer/PHP-CS-Fixer#8300

You currently can only run PHP-CS-Fixer with the following env flag enabled:

PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix

(I think Pint runs, even though this flag is not set, I did not test this.)

@Wirone
Copy link

Wirone commented Nov 25, 2024

Yes, you can run Fixer on any PHP version using PHP_CS_FIXER_IGNORE_ENV=1, but it's not recommended for such a widely used tool as Pint and having in mind how big 8.4 is in terms of syntax-related features. I recommend observing mentioned PR and this milestone, where I started to collect issues found on 8.4. More issues will be added there likely, I just did not have time to cover more 8.4 features yet.

@Jubeki
Copy link
Contributor

Jubeki commented Nov 29, 2024

@crynobone in my opinion the way going forward should be:

  • Fix all deprecations displayed (Laravel-Zero and Illuminate v10 compatibility with PHP 8.4)
  • Displaying a warning when running Pint with PHP 8.4 and only allow running when PINT_IGNORE_ENV=1 is set, similar to PHP-CS-Fixer (see Show warning regarding PHP 8.4 support #312)

And then later when PHP-CS-Fixer is PHP 8.4 compatible according to the milestone. There should be another PR, which updates to the latest PHP-CS-Fixer version and only show the warning for PHP 8.5

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.

4 participants