fix: #3638604 Pass a provider in the Bootstrap layout deriver for PHP 8.5 (10.1.x)

Closes https://www.drupal.org/i/3638604

Backport of !121 (merged) (10.2.x) to 10.1.x, which Varbase 10.0.x use. Same one-line change: pass 'provider' => 'varbase_layout_builder' in each derived LayoutDefinition, as Bootstrap Layout Builder's own deriver does. Without it, layout discovery calls moduleExists(NULL) and themeExists(NULL), which PHP 8.5 logs as "Using null as an array offset is deprecated".

On 10.2.x the change was checked on Drupal 11.4.12 with PHP 8.4.27, 8.5.12 and 8.6.0RC3: the deprecations are gone and nothing else changed. On 10.1.x the cherry-pick applies cleanly and the file passes php -l on PHP 8.5.

CI on 10.1.x now really runs and passes. The branch's own composer job never built a Drupal site, so every check failed on a missing web/core and was allowed to fail (the branch pipeline was red the same way). This MR also:

  • Uses the template's composer job on Drupal 11.3.21 (DRUPAL_CORE on the composer job; the branch supports ~10.6.0 || ~11.3.0) and makes the checks blocking, as on 10.0.x and 10.2.x.
  • Installs cl_block, cl_components, cl_selector_field and cl_server through the lenient endpoint: varbase_components ~2 needs them and none has a Drupal 11 release.
  • Adds the allow-plugins list of 10.0.x and 10.2.x to composer.json.
  • Uses the eslint, stylelint and phpstan configuration of 10.2.x (the old configs extended airbnb-base and stylelint-config-standard, which the Drupal CI does not install).
  • Fixes what the checks found, each the same as on 10.2.x: Drupal\Component\Serialization\Yaml instead of Drupal\Core\Serialization\Yaml (gone in Drupal 11, so this was a real error on Drupal 11.3 sites), Yaml::decode() instead of Symfony's Yaml::parse() in the 10.0 update helpers, the Drupal 11.3 CacheableMetadata parameter on hook_entity_operation(), and trailing whitespace in the theme negotiator.

Pipeline 1051848: composer, composer-lint, cspell, eslint, stylelint, phpcs and phpstan all pass, none allowed to fail.

AI-Generated: Yes

Checkpoints:

  • File an issue
  • Addition/Change/Update/Fix
  • Testing to ensure no regression
  • Automated unit testing coverage
  • Automated functional testing coverage
  • UX/UI designer responsibilities
  • Readability
  • Accessibility
  • Performance
  • Security
  • Developer Documentation
  • User Guide Documentation
  • Reviewed by human
  • Code review by maintainers
  • Full testing and approval
  • Credit contributors
  • Review with the product owner
  • Release notes snippet
  • Release
Edited by Rajab Natshah

Merge request reports

Loading
Loading