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 1 commit 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

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.

None yet

2 participants