Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
FileEntityNormalizer extends a class in hal, but the service is defined even if only rest is enabled.
FileEntityServiceProvider.php:
if (isset($modules['rest'])) {
// Add a normalizer service for file entities.
$service_definition = new Definition('Drupal\file_entity\Normalizer\FileEntityNormalizer', array(
FileEntityNormalizer.php:
use Drupal\hal\Normalizer\ContentEntityNormalizer;
class FileEntityNormalizer extends ContentEntityNormalizer {
Proposed resolution
Define only if hal is enable.
Comments
Comment #2
ArlaUgh, nevermind, I was checking an older version.