Problem/Motivation

On PHP 8.5, VarbaseLayoutBuilderBootstrapLayoutDeriver::getDerivativeDefinitions() builds each LayoutDefinition without a provider. Layout plugin discovery then calls moduleExists(NULL) and themeExists(NULL), which logs two deprecations:

Using null as an array offset is deprecated, use an empty string instead (ModuleHandler.php:267, ThemeHandler.php:167)

BootstrapLayoutDeriver in Bootstrap Layout Builder already passes 'provider' => 'bootstrap_layout_builder'.

Seen on Drupal 11.4.12, Varbase Layout Builder 10.2.x-dev, PHP 8.5.12, MariaDB 11.8.

Steps to reproduce

  1. Install Varbase 10.1.x on PHP 8.5, with at least one Bootstrap layout (blb_layout).
  2. Run drush cr, then open any Layout Builder page so layout plugins are discovered.
  3. Check Recent log messages: the two deprecations above are logged.

Proposed resolution

Pass 'provider' => 'varbase_layout_builder' in each derived LayoutDefinition, as Bootstrap Layout Builder does.

Remaining tasks

  • ✅ File an issue
  • ❌ Addition/Change/Update/Fix
  • ❌ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support
  • ➖ User Guide Documentation support
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ❌ Reviewed by a human
  • ❌ Code review by maintainers
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ❌ Update Release Notes
  • ❌ Release

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A
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

rajab natshah created an issue. See original summary.

  • rajab natshah committed 2938294b on 10.2.x
    fix: #3638604 Pass a provider in the Bootstrap layout deriver for PHP 8....

  • rajab natshah committed 3f9f643a on 10.0.x
    fix: #3638604 Pass a provider in the Bootstrap layout deriver for PHP 8....

  • rajab natshah committed f1b538d5 on 10.1.x
    fix: #3638604 Pass a provider in the Bootstrap layout deriver for PHP 8....
rajab natshah’s picture

Status: Active » Fixed

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.