Loading
fix: #3616070 Avoid null array offsets on PHP 8.5
Closes https://www.drupal.org/i/3616070
What it fixes
PHP 8.5 "Using null as an array offset" deprecations in:
ds_contextual_links_view_alter()andds_switch_view_mode_form_node_form_alter()(patch from comment #4 by flemming.fridthjof, kept as its own commit)ds_field_formatter_settings_summary_alter(): falls back to the default field template when the field function isNULL
CI cleanup
All CI jobs now pass, including the ones allowed to fail (they also fail on 8.x-3.x).
fix:phpstan errorstask:phpcs, cspell and eslint (no behaviour change, translatable strings unchanged)
Behaviour change
ds_switch_view_mode no longer calls node_is_page() (deprecated in Drupal 11.3; ContentPreprocess is removed in 11.4). The switch now applies whenever a node renders in the full view mode. Same change as !66 (#3618575), so the two MRs overlap.
Tested
- Drupal 11.4.12 on PHP 8.4, 8.5 and 8.6: no ds PHP messages on Field UI display pages
- Pipeline 1051964: composer, composer-lint, phpunit, cspell, eslint, stylelint, phpstan, phpcs all green
AI-Generated: Yes (all commits except the first)
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