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 PHP RFC: Deprecate implicitly nullable parameter types #869

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

@aik099
Copy link
Member

aik099 commented Apr 30, 2024

It will be a blocker for Drupal 11

@andypost , please explain how Mink method signatures are affecting/blocking Drupal?

@andypost
Copy link
Author

andypost commented Apr 30, 2024

Deprecation warnings affects tests so they fail.
In production you can disable this warnings

For example this pipeline

Testing Drupal\FunctionalJavascriptTests\Tests\JSWebAssertTest
    E                                                                   1 / 1
    (100%)
    Deprecated: Behat\Mink\Exception\ElementHtmlException::__construct():
    Implicitly marking parameter $exception as nullable is deprecated, the
    explicit nullable type must be used instead in
    /builds/issue/drupal-3427903/vendor/behat/mink/src/Exception/ElementHtmlException.php
    on line 39
    
    
    Time: 00:14.711, Memory: 8.00 MB
    
    There was 1 error:
    
    1) Drupal\FunctionalJavascriptTests\Tests\JSWebAssertTest::testJsWebAssert
    This test printed output: 
    Deprecated: Behat\Mink\Exception\ElementHtmlException::__construct():
    Implicitly marking parameter $exception as nullable is deprecated, the
    explicit nullable type must be used instead in
    /builds/issue/drupal-3427903/vendor/behat/mink/src/Exception/ElementHtmlException.php
    on line 39
    
    /builds/issue/drupal-3427903/vendor/phpunit/phpunit/src/Framework/TestResult.php:956
    
    ERRORS!
    Tests: 1, Assertions: 24, Errors: 1.

Copy link
Member

@aik099 aik099 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good. Doesn't look like a BC break.

@andypost
Copy link
Author

I did update of comment with example

@andypost
Copy link
Author

I checked files with $ php -d error_reporting="E_ALL" -l Mink/*/*/* to make sure no more deprecations left

also https://3v4l.org/6T9GB/rfc

@andypost
Copy link
Author

andypost commented Aug 2, 2024

Last deprecations for PHP 8.4 will be commited in 2 weeks https://wiki.php.net/todo/php84

Copy link

codecov bot commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.72%. Comparing base (d8527fd) to head (4a730e1).

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #869   +/-   ##
=========================================
  Coverage     98.72%   98.72%           
- Complexity      374      389   +15     
=========================================
  Files            24       24           
  Lines          1022     1022           
=========================================
  Hits           1009     1009           
  Misses           13       13           

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

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