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

Fix implicitly nullable params #175

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

kamil-tekiela
Copy link
Contributor

No description provided.

@DASPRiD
Copy link
Member

DASPRiD commented Mar 21, 2024

What exactly is wrong with that? Maybe @Chris53897 can shed some light here, since he introduced that.

@kamil-tekiela
Copy link
Contributor Author

kamil-tekiela commented Mar 21, 2024

Oh sorry, I should have mentioned the reason. It's because of the deprecation in PHP 8.4.

23) /home/runner/work/phpmyadmin/phpmyadmin/vendor/bacon/bacon-qr-code/src/Encoder/Encoder.php:158
Implicitly marking parameter $encoding as nullable is deprecated, the explicit nullable type must be used instead

Triggered by:

* PhpMyAdmin\Tests\TwoFactorTest::testApplication
  /home/runner/work/phpmyadmin/phpmyadmin/tests/unit/TwoFactorTest.php:240

24) /home/runner/work/phpmyadmin/phpmyadmin/vendor/bacon/bacon-qr-code/src/Common/ReedSolomonCodec.php:225
Implicitly marking parameter $erasures as nullable is deprecated, the explicit nullable type must be used instead

Triggered by:

* PhpMyAdmin\Tests\TwoFactorTest::testApplication
  /home/runner/work/phpmyadmin/phpmyadmin/tests/unit/TwoFactorTest.php:240

https://wiki.php.net/rfc/deprecate-implicitly-nullable-types

@mfn
Copy link

mfn commented Mar 21, 2024

Rector added it too (afair, php-cs-fixer is also able to auto-fox it), e.g. rectorphp/rector-src#5724

@Chris53897
Copy link
Contributor

Chris53897 commented Mar 21, 2024 via email

@kamil-tekiela
Copy link
Contributor Author

kamil-tekiela commented Mar 21, 2024

Make it implicit nullable is fine for me. This is the way to go with PHP 7.4

Actually, it's since PHP 7.1. Explicit nullability is possible since PHP 7.1, but if your code needs to support PHP 7.0, you'd have to stick with implicit nullability or no types at all.

Copy link

codecov bot commented Mar 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.93%. Comparing base (c01758c) to head (4197cee).

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #175   +/-   ##
=========================================
  Coverage     64.93%   64.93%           
  Complexity      981      981           
=========================================
  Files            48       48           
  Lines          3094     3094           
=========================================
  Hits           2009     2009           
  Misses         1085     1085           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DASPRiD DASPRiD merged commit 1b26475 into Bacon:main Mar 22, 2024
6 of 7 checks passed
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