Skip to content

Conversation

@Jubeki
Copy link
Contributor

@Jubeki Jubeki commented Sep 4, 2024

I send the PR to the php84 branch, or should it go directly to 11.x branch?

Is there a StyleCI Rule to enforce explicit nullable types?
A Quick Look / search on https://docs.styleci.io/fixers resulted in nothing.

PHP-CS-Fixer has a rule for this (which is also enforced in Laravel Pint)
https://cs.symfony.com/doc/rules/function_notation/nullable_type_declaration_for_default_null_value.html

Lower Requirements for PHP 8.4:

  • guzzle/promises should be ^2.0.3
  • mockery/mockery should be ^1.6.10
  • symfony/* should be ^7.1.3 or ^7.0.10
  • sebastian/cli-parser should be ^2.0.1 for PHPUnit 10 and ^3.0.1 for PHPunit 11
  • nesbot/carbon should be ^3.4.0
  • sebastian/exporter should be ^6.0.1

I also adjusted the PHPunit requirements in Github Workflows accordingly for nullable types.

@Jubeki Jubeki changed the title [php84] Fix implicit null types [php84] Fix some deprecations and lower requirements Sep 4, 2024
@Jubeki
Copy link
Contributor Author

Jubeki commented Sep 4, 2024

Starting Point:
PHPUnit 11 - lowest: Errors: 10, Failures: 8, Deprecations: 735

After this PR:
PHPUnit 11 - stable: Errors: 9, Failures: 8, Deprecations: 68

(Not completely a fair comparison due to using lowest vs stable, but that is okay for me)

@driesvints driesvints merged commit f1c8683 into laravel:php84 Sep 4, 2024
@driesvints
Copy link
Member

Very nice. Thanks @Jubeki

@driesvints
Copy link
Member

Btw, we can also bump these dependencies inside our own composer.json

@Jubeki Jubeki deleted the php84-explicit-nullable branch September 4, 2024 07:23
@Jubeki
Copy link
Contributor Author

Jubeki commented Sep 4, 2024

Yeah I know, I just wanted to find out the lower bounds for now, without needing to update all composer.json files.

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.

2 participants