Problem/Motivation

Drupal 10.2.0 is due in the week of December 11, 2023
A number of composer dependencies have minor and patch level release bumps that we should try to incorporate in the release.

Notes:

  • This issue is chasing the ever moving target to keep as up-to-date as possible.
  • It will be kept updated until the release of Drupal 10.2.0.
  • Until the week of December 11, 2023, this issue will not be on Needs Review in order to get the most up-to-date list of composer dependencies in the 10.2.0 release.
  • There will be an up-to-date with the current state of the MR $ composer-lock-diff --no-links in #2.

Steps to reproduce

$ composer outdated

Proposed resolution

- Remove the "conflict": { "phpstan/phpstan": "1.10.45 || 1.10.46" in the root composer.json. PHPStan 1.10.47 should incorporate the fix for the regression (https://github.com/phpstan/phpstan-src/pull/2794) we avoided by adding that.
- Bump minimal version of phpstan/phpstan to 1.10.47 since the baseline won't pass on the above mentioned versions.
- $ composer update --with=phpunit/phpunit:^9

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3405696

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Spokje created an issue. See original summary.

spokje’s picture

Issue summary: View changes

This list is up-to-date up to and including #10.

$ composer-lock-diff --no-links
+------------------------------+--------+--------+
| Production Changes           | From   | To     |
+------------------------------+--------+--------+
| guzzlehttp/guzzle            | 7.8.0  | 7.8.1  |
| guzzlehttp/promises          | 2.0.1  | 2.0.2  |
| guzzlehttp/psr7              | 2.6.1  | 2.6.2  |
| symfony/console              | v6.4.0 | v6.4.1 |
| symfony/dependency-injection | v6.4.0 | v6.4.1 |
| symfony/http-kernel          | v6.4.0 | v6.4.1 |
| symfony/routing              | v6.4.0 | v6.4.1 |
| symfony/serializer           | v6.4.0 | v6.4.1 |
| symfony/var-exporter         | v6.4.0 | v6.4.1 |
+------------------------------+--------+--------+

+------------------------+---------+---------+
| Dev Changes            | To      | From    |
+------------------------+---------+---------+
| php-http/discovery     | 1.19.1  | 1.19.2  |
| phpstan/phpstan        | 1.10.44 | 1.10.47 |
| phpunit/phpunit        | 9.6.13  | 9.6.15  |
| symfony/phpunit-bridge | v6.4.0  | v6.4.1  |
+------------------------+---------+---------+
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes

spokje’s picture

Issue summary: View changes
spokje’s picture

Issue summary: View changes
andypost’s picture

Related could be merged here but may leave alone

andypost’s picture

Status: Active » Needs review
spokje’s picture

Issue summary: View changes

Since this is now (apparently, since marked so by @andypost) ready for review, I've:

- "Striken-through" some lines in the IS that are now invalid.
- Clarified in #2 up to what commit the list in there is valid.
- Unassigned myself.
- Shrugged off my amazement.
- Unfollowed the issue.

spokje’s picture

Assigned: spokje » Unassigned
Issue summary: View changes
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Seems to be all minor releases. Though with 10.2 out in 3 days wonder if it's too late?

mondrake’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +PHPUnit 10

phpspec/prophecy-phpunit 2.1.0 was just released, https://github.com/phpspec/prophecy-phpunit/releases/tag/v2.1.0

andypost’s picture

Status: Needs work » Needs review
Issue tags: +PHP 8.3

Added following changes

Needs review and fixes issues with PHP 8.3 deprecations https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/tag/3.8.0
Composer prevents SF7 https://getcomposer.org/changelog/2.6.6

+---------------------------+---------+---------+
| Dev Changes               | From    | To      |
+---------------------------+---------+---------+
| composer/composer         | 2.6.5   | 2.6.6   |
| instaclick/php-webdriver  | 1.4.16  | 1.4.18  |
| phpspec/prophecy-phpunit  | v2.0.2  | v2.1.0  |
| phpstan/phpstan           | 1.10.47 | 1.10.48 |
| squizlabs/php_codesniffer | 3.7.2   | 3.8.0   |
+---------------------------+---------+---------+
andypost’s picture

Status: Needs review » Needs work

one functional test repeatedly fails

Testing Drupal\Tests\options\FunctionalJavascript\OptionsFieldUITest
    EEEEEEEEE.                                                        10 / 10
    (100%)
    
    Time: 01:38.596, Memory: 4.00 MB
    
    There were 9 errors:
    
    1)
    Drupal\Tests\options\FunctionalJavascript\OptionsFieldUITest::testOptionsAllowedValues
    with data set "List integer: Press button" ('list_integer', array('First',
    'Second', 'Third'), false, 'Press button')
    Undefined array key "attribute"
    
    /builds/issue/drupal-3405696/vendor/instaclick/php-webdriver/lib/WebDriver/AbstractWebDriver.php:226
    /builds/issue/drupal-3405696/vendor/instaclick/php-webdriver/lib/WebDriver/Container.php:241
    /builds/issue/drupal-3405696/core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php:400
    /builds/issue/drupal-3405696/core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php:109
    /builds/issue/drupal-3405696/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    
    2)
    Drupal\Tests\options\FunctionalJavascript\OptionsFieldUITest::testOptionsAllowedValues
    with data set "List integer: Enter button" ('list_integer', array('First',
    'Second', 'Third'), false, 'Enter button')
    Undefined array key "attribute"

longwave made their first commit to this issue’s fork.

longwave’s picture

Status: Needs work » Needs review

instaclick/php-webdriver 1.4.17 changed attribute(): https://github.com/instaclick/php-webdriver/releases/tag/1.4.17

The relevant code change is https://github.com/instaclick/php-webdriver/compare/1.4.16..1.4.18#diff-...

Previously we were calling it as getAttribute() which has stopped working but switching to attribute() appears to work on both the old and new releases in local testing.

andypost’s picture

Thank you!

Today mink has releases to append here

- https://github.com/minkphp/Mink/releases/tag/v1.11.0
- https://github.com/minkphp/MinkBrowserKitDriver/releases/tag/v2.2.0
- https://github.com/minkphp/MinkSelenium2Driver/releases/tag/v1.7.0

+------------------------------+---------+---------+
| Dev Changes                  | From    | To      |
+------------------------------+---------+---------+
| behat/mink                   | v1.10.0 | v1.11.0 |
| behat/mink-browserkit-driver | v2.1.0  | v2.2.0  |
| behat/mink-selenium2-driver  | v1.6.0  | v1.7.0  |
+------------------------------+---------+---------+
smustgrave’s picture

If this is targeting 10.2 is there a date this needs to be reviewed by?

andypost’s picture

I think a bit more packages may add declaration and CI runs for PHP 8.3 in next week, also compatibility with SF7 a bonus

I bet right before 10.2 it should be considered for review

spokje’s picture

Status: Needs review » Needs work

Another interesting question: Why is this NR when there are (a lot of) failing functional tests after the update of behat/mink and friends?

longwave’s picture

The 10.2.0 release window is 11-15 December, really this needs to be completed towards the start of that window to ensure we have a stable release.

longwave’s picture

Behat has added more strict typing and the test failures all look related to that. At least two differentissues so far:

  1. Radio buttons can only take string inputs, sometimes we pass integers that were previously cast to string; I guess we have to cast this ourselves now.
  2. We used to check for the absence of headers by looking for NULL, the argument is now typed to string so it seems this is no longer possible, maybe need to raise an upstream bug for this.

Will continue to investigate.

longwave’s picture

Status: Needs work » Needs review

We can work around both these issues, we should probably issue deprecations and fix the callers properly though.

longwave’s picture

Opened https://github.com/minkphp/Mink/issues/862 as there appears to be no supported way to check for a non-existent header in Mink, however we do have responseHeaderExists() already which we should convert all cases to use, perhaps in a followup.

longwave’s picture

We also incorrectly pass headers to drupalGet() in a number of places. The docs say the array should be keyed by header name with the value being the header value; but in some cases we passed numeric arrays with both the header and value concatenated into the array value. This apparently still worked in older versions of Mink but now it is stricter, so I fixed all the cases I could find.

An alternative way around this might be to detect it in drupalGet() and issue a deprecation, maybe we should do that instead?

longwave’s picture

There are quite a lot of changes here. Unsure if we should just break these out to another issue, and avoid upgrading Mink in 10.2.0.

longwave’s picture

Not sure what is up with BlockDragTest.

longwave’s picture

Guessing it is related to the upgrade of the Syn library in the Selenium driver: https://github.com/minkphp/MinkSelenium2Driver/releases/tag/v1.7.0

BC break (when doing custom logic with syn):

    syn JS library was upgraded from v0.0.3 to v0.15.0

Syn is used for drag operations, we have had issues with it before.

This makes me think it might be better to defer this upgrade until 10.3.

andypost’s picture

+1 to move mink to separate issue it could be upgraded in bugfix release

quietone made their first commit to this issue’s fork.

quietone’s picture

I created an Issue for Behat #3407834: Update behat/mink and friends and reverted those changes from the MR.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Since today is the start of the 10.2 window mentioned #25 took a look at this again.

Tests appear green, applied locally and didn't notice anything weird.

Going to mark but guess it could be left open till the 15th? Or whenever the cutoff is.

  • catch committed be9cfcda on 10.2.x
    Issue #3405696 by longwave, Spokje, andypost, quietone, smustgrave,...

  • catch committed d719097a on 11.x
    Issue #3405696 by longwave, Spokje, andypost, quietone, smustgrave,...
catch’s picture

Version: 11.x-dev » 10.2.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x and cherry-picked to 10.2.x, thanks!

Do we have an issue already to switch to https://github.com/PHPCSStandards/PHP_CodeSniffer ?

longwave’s picture

@catch We don't depend on it directly:

$ composer why squizlabs/php_codesniffer
dealerdirect/phpcodesniffer-composer-installer v1.0.0   requires squizlabs/php_codesniffer (^2.0 || ^3.1.0 || ^4.0) 
drupal/coder                                   8.3.22   requires squizlabs/php_codesniffer (^3.7.1)                 
sirbrillig/phpcs-variable-analysis             v2.11.17 requires squizlabs/php_codesniffer (^3.5.6)                 
slevomat/coding-standard                       8.14.1   requires squizlabs/php_codesniffer (^3.7.1)                 

Also as per https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/109 only the GitHub repo is changing now, the namespace on Packagist will stay the same (this has changed since the original announcement).

catch’s picture

Oh interesting, I though there was going to be a 301 and we'd eventually want to update, but if it's 100% indirect and also we don't need to change anyway, all good then.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.