- Issue created by @abhinesh
The Liveblog module is experiencing a fatal PHP error when running on Drupal 11 due to an incorrect type declaration in the LiveblogAjaxResponseAttachmentsProcessor
class. This appears to be a compatibility issue where the module hasn't been updated to match Drupal 11's stricter type requirements.
Root Cause: Drupal 11 enforces stricter type declarations and the Liveblog module's $assetResolver
property declaration doesn't match the required AssetResolverInterface
type from the parent class.
composer require drupal/liveblog
drush en liveblog
The issue requires updating the Liveblog module to be compatible with Drupal 11's type system requirements. The immediate fix involves correcting the property type declaration.
Immediate Fix:
Update the $assetResolver
property declaration in LiveblogAjaxResponseAttachmentsProcessor.php
:
// Current (incorrect) declaration: protected $assetResolver; // Correct declaration for Drupal 11: protected AssetResolverInterface $assetResolver;
Long-term Solution:
No user interface changes are expected from this compatibility fix. The changes are purely backend code corrections to resolve the fatal error and ensure the module functions properly on Drupal 11.
No breaking API changes are expected. The fix maintains backward compatibility while ensuring forward compatibility with Drupal 11. The changes involve:
No data model changes are required for this compatibility fix. This is purely a code-level correction to resolve type declaration mismatches introduced by Drupal 11's stricter type enforcement requirements.
Active
2.0
Code