-
-
Notifications
You must be signed in to change notification settings - Fork 546
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
[5.x] PHP 8.4 Support #11114
[5.x] PHP 8.4 Support #11114
Conversation
Otherwise, we'll see deprecation warnings when running the `prefer-lowest` tests with PHP 8.4.
Otherwise, we'll see deprecation warnings when running the `prefer-lowest` tests with PHP 8.4.
Due to another PR preventing deprecation warnings: laravel/framework#50922
This reverts commit 8f2b6a4.
Only 1.41.2 and above is compatible with PHP 8.4, otherwise we get deprecation warnings which throws off one of our tests. Related: https://github.com/spatie/ray/releases/tag/1.41.2 Since `spatie/laravel-ray` doesn't specify a minimum version, we're having to specify it here.
When you run the test suite locally, you'll see a couple of deprecation warnings from Carbon:
These deprecations have been addressed in Carbon 3, however upgrading to Carbon 3 would involve breaking changes. We might have to live with the deprecation warnings for now until we can upgrade in Statamic 6. |
If you have GraphQL enabled, you'll see a bunch of deprecation warnings from the Unfortunatley, deprecation warnings prevent the Control Panel from working. 😬 |
The "lowest" versions of dependencies throw deprecation errors with PHP 8.4 - we only want to test with the latest versions for now. This means we also don't need to adjust the minimum versions of dependencies. This is what Laravel does in their test suite.
This reverts commit c37d23b.
You might want to manually require |
Thank you! |
Thanks, @crynobone! |
This reverts commit cde9043.
prefer-lowest failed because of changes introduced in laravel 11.11. it used to pass because our prefer-lowest allowed laravel 11.0. now that we force 11.34, the lowest causes those errors. testbench 9.2 fixes it.
Ok so like Duncan said, we can't upgrade to Carbon v3 just yet since it would require breaking changes. We'll do it for Statamic v6. In the mean time, you can get rid of the deprecation notices by doing this:
<?php
use Illuminate\Http\Request;
+error_reporting(E_ALL & ~E_DEPRECATED);
define('LARAVEL_START', microtime(true));
#!/usr/bin/env php
<?php
use Symfony\Component\Console\Input\ArgvInput;
+error_reporting(E_ALL & ~E_DEPRECATED);
define('LARAVEL_START', microtime(true)); Also, Or, just stick to PHP 8.3. |
This pull request adds PHP 8.4 support.
Statamic itself is compatible with PHP 8.4, however, some packages we're using still need to be updated to support it, otherwise users may see deprecation notices.
voku/portable-ascii
: Update ASCII.php for PHP 8.4 compatibility voku/portable-ascii#105thecodingmachine/safe
: [PHP 8.4] Fixes for implicit nullability deprecation thecodingmachine/safe#441rebing/graphql-laravel
: Fixes for implicit nullability deprecation rebing/graphql-laravel#1152