Problem/Motivation

Latest build pipelines come back with various errors for the different jobs and core versions tested, see:
https://git.drupalcode.org/project/admin_toolbar/-/pipelines/964694

Next minor: 11.5.x, currently: 11.x

PHPSTAN Next minor:

$ php $COMPOSER_BIN_DIR/phpstan analyze . --autoload-file="$CI_PROJECT_DIR/vendor/autoload.php" $LEVEL $_PHPSTAN_EXTRA_NO_DEBUG --no-progress --generate-baseline=$_PHPSTAN_BASELINE_FILENAME --allow-empty-baseline || true
Note: Using configuration file /builds/project/admin_toolbar/web/modules/custom/admin_toolbar/phpstan.neon.
PHP Fatal error:  Class Drupal\project_browser_test\Extension\TestModuleInstaller contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Drupal\Core\Extension\ModuleInstallerInterface::getModulesToInstall) in /builds/project/admin_toolbar/web/modules/contrib/project_browser/tests/modules/project_browser_test/src/Extension/TestModuleInstaller.php on line 15
Fatal error: Class Drupal\project_browser_test\Extension\TestModuleInstaller contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Drupal\Core\Extension\ModuleInstallerInterface::getModulesToInstall) in /builds/project/admin_toolbar/web/modules/contrib/project_browser/tests/modules/project_browser_test/src/Extension/TestModuleInstaller.php on line 15

and deprecation error messages and errors in PHPUNIT next minor.

The LTS 9.5.x build has been failing with a PHPUNIT error as well, see:
https://git.drupalcode.org/project/admin_toolbar/-/pipelines/964587


    Testing
    Drupal\Tests\admin_toolbar_search\Functional\AdminToolbarSearchSettingsFormTest
    E                                                                   1 / 1
    (100%)
    
    Time: 00:04.983, Memory: 4.00 MB
    
    There was 1 error:
    
    1)
    Drupal\Tests\admin_toolbar_search\Functional\AdminToolbarSearchSettingsFormTest::testAdminToolbarSearchSettingsForm
    Behat\Mink\Exception\ExpectationException: The pattern
    /\[{"labelRaw":"System","value":".*\\\/admin\\\/config\\\/system"},{"labelRaw":"Admin
    Toolbar","value":".*\\\/admin\\\/config\\\/user-interface\\\/admin-toolbar"},{"labelRaw":"Admin
    Toolbar
    Search","value":".*\\\/admin\\\/config\\\/user-interface\\\/admin-toolbar-search"},{"labelRaw":"Admin
    Toolbar Extra
    Tools","value":".*\\\/admin\\\/config\\\/user-interface\\\/admin-toolbar-tools"}]/
    was not found anywhere in the HTML response of the page.
    
    /builds/project/admin_toolbar/vendor/behat/mink/src/WebAssert.php:888
    /builds/project/admin_toolbar/vendor/behat/mink/src/WebAssert.php:397
    /builds/project/admin_toolbar/web/core/tests/Drupal/Tests/WebAssert.php:938
    /builds/project/admin_toolbar/admin_toolbar_search/tests/src/Functional/AdminToolbarSearchSettingsFormTest.php:219
    /builds/project/admin_toolbar/vendor/phpunit/phpunit/src/Framework/TestResult.php:729
    
    ERRORS!
    Tests: 1, Assertions: 13, Errors: 1.

Steps to reproduce

Run build pipeline schedules at:
https://git.drupalcode.org/project/admin_toolbar/-/pipeline_schedules
Or manually build pipelines at:
https://git.drupalcode.org/project/admin_toolbar/-/pipelines

Proposed resolution

Fix all reported errors in all jobs for the different builds.

Tested versions with scheduled pipelines for 3.x:

  • Deprecated build: 9.5.x
  • Previous major: 10.6.x
  • Previous minor: 11.3.x
  • Current: 11.4.x
  • Next minor: 11.5.x (11.x)

Corresponding to module's core_version_requirement: ^9.5 || ^10 || ^11

Remaining tasks

User interface changes

API changes

Data model changes

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

dydave created an issue. See original summary.

  • dydave committed 7278c0ee on 3.x
    Issue #3627551 by dydave: Gitlab CI: Fixed validation jobs for next...
dydave’s picture

Status: Active » Fixed

Quick follow-up on this issue:

Next minor: 11.5.x
phpstan:

Fixed project_browser error crashing the job by bumping to the dev version instead of current "buggy" stable (2.1.5).

I'm not sure exactly why, but the code of the project_browser module with the current stable version 2.1.5 seems to be scanned by phpstan and has a fatal error which seems to crash the whole job and fail.
As a simple, "quick" solution, I thought we could use the dev version instead, for the time being, which already has the fix for the error... until the next stable version is released (2.1.6 for example).

Ignored phpstan deprecation errors for 11.5 and above in ToolbarControllerin file phpstan.neon.

All these changes are specific to the 3.x branch which is not going to support D12, core version requirements will stay as they currently are for this branch.
We will create a new 4.x branch which will support ^11.5 || ^12
Therefore, in the current branch we should not have to worry about deprecation errors for 11.5 and above.
Then, in the new branch, we should be able to remove the ignore rules and use the new API functions.
 

✅ No functional code file is impacted in this merge request.
✅ All of the changes are located in tests and scaffolding files (gitlab-ci and phpstan.neon).

Since all the tests and jobs were passing 🟢 and no impact on module's files is to be anticipated, I went ahead and merged the changes above at #3.

Scheduled builds are now all coming back green 🟢: All supported core versions (10.x, 11.x) and LTS (9.5.x).
In other words, all the versions supported by the module are now tested successfully automatically for the 3.x branch.

Marking issue as Fixed for now.

Thanks in advance!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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