Problem/Motivation
EntityFieldManager::getFieldDefinitions() does not type its $bundle argument, so a caller passing NULL reaches buildBundleFieldDefinitions() and then this alter hook. The non-nullable string parameter then throws a TypeError.
Steps to reproduce
Try to use Canvas Override with Canvas Tools and the MCP server suite.
Proposed resolution
- public function entityBundleFieldInfoAlter(array &$fields, EntityTypeInterface $entity_type, string $bundle): void {
+ public function entityBundleFieldInfoAlter(array &$fields, EntityTypeInterface $entity_type, ?string $bundle): void {
Remaining tasks
- ✅ 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
User interface changes
API changes
Data model changes
Release notes snippet
Comments
Comment #3
longwaveComment #4
rajab natshahComment #6
rajab natshah✅ Released canvas_override-1.0.0-rc1