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

Deprecation Warnings - PHP 8.4 #311

Closed
Fludem opened this issue Nov 29, 2024 · 3 comments
Closed

Deprecation Warnings - PHP 8.4 #311

Fludem opened this issue Nov 29, 2024 · 3 comments

Comments

@Fludem
Copy link

Fludem commented Nov 29, 2024

Pint Version

1.18.3

PHP Version

8.4

Description

Summary

I've not read previous PRs or Issues fully; I apologise for missing anything.

Running Pint generates numerous deprecation warnings. The warnings are about implicitly declaring a type as nullable in a parameter.
The warnings stem from using outdated Illuminate/* packages that implementations of implicitly null types.

Potential solution

Both laravel 10 and 11 have recently released versions addressing the deprecation of implicit null parameters.

Laravel 11

If there are no blockers, publishing a release with updated dependencies would make sense.

Example Output

I've only included 2 of the 50+ warnings. Including more isn't necessary.

Deprecated: Illuminate\Contracts\Container\Container::resolving(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in phar://{{REDACTED}}vendor/laravel/pint/builds/pint/vendor/illuminate/contracts/Container/Container.php on line 209
PHP Deprecated: Illuminate\Contracts\Container\Container::afterResolving(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in phar://{{REDACTED}}vendor/laravel/pint/builds/pint/vendor/illuminate/contracts/Container/Container.php on line 218

Related:

#304 #310

Steps To Reproduce

Install pint using PHP8.4.
Run ./vendor/bin/pint
See Warnings

@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.

@Fludem
Copy link
Author

Fludem commented Dec 1, 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.

Hey, I understand. I knew you guys were working on it before I tagged PR 304; I just wasn't sure what was preventing Herd from updating the illuminate dependencies to a version without implicit nulls.

Thank you for clearing it up

@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