laravel-debugbar
laravel-debugbar copied to clipboard
Add (initial) support for PHP 8.4
This MR:
- Runs the testsuite against PHP 8.4 (uses the currently still unstable beta version); to allow this the
--ignore-platform-req=php+is added tocomposercalls in integration tests, to ignore checking package bounds on upper PHP versions - ~~Replaces deprecated implicit nullable types in parameter declarations (see https://wiki.php.net/rfc/deprecate-implicitly-nullable-types)~~ see #1632
To make (integration) tests pass, the following changes are introduced:
- As Laravel cannot install yet by default with PHP 8.4, per https://github.com/nette/schema/issues/68, the suggestion there is applied to ignore PHP version in platform req checks for composer. Although opting to wait for a fix of the mentioned issue is also viable, I think not checking PHP version (through composer) for integration tests is a reasonable change, as any impactful change should already be breaking the tests anyways, and still end-users will be warned when installing with composer.
- The integration test is somewhat altered, as previously it checked for an empty
logsdirectory. Due to deprecations in previous Laravel/Lumen versions being triggered on PHP 8.4, a log file is created by Laravel to log these messages. This MR changes the integration test to solely test functionality of the clear command, by adding a test file to the directory that should be cleared and subequently testing emptiness of that directory.