- Issue created by @jonathan_hunt
- 🇫🇷France aiphes
Hello,
Same here after update on D9.5.9:
Parse error: syntax error, unexpected '|', expecting ';' or '{' in /home/www/sited9/web/modules/contrib/fixed_block_content/src/Normalizer/BlockContentNormalizer.php on line 22
Rollback to previous for the moment.
Downgrading drupal/fixed_block_content (1.2.0 => 1.1.0)
- 🇺🇸United States stephenplatz
This affects both 8.x-1.x-dev and 8.x-1.2, since union return types were made available in php 8. Would using phpdoc annotations be an alternative?
- 🇺🇸United States stephenplatz
Looks like the change to
src/Normalizer/BlockContentNormalizer.php
was just added from the automated patch for Drupal 10 readiness in this commit. Does PHP 8.1 require union types? If not, I think that this part could be left out to support older versions of PHP. - 🇮🇹Italy apaderno Brescia, 🇮🇹
PHP 8.1 does not require to use union types. They help because PHP detects when the wrong type is used and the type can be either one or another type.
For backward-compatibility, they should not be used. I would rather use them in a branch that requires PHP 8.1. - last update
over 1 year ago 16 pass - @stephenplatz opened merge request.
- 🇫🇷France aiphes
Hello
Still there, so which version can we use on D9.5.10 ?
[error] ParseError: syntax error, unexpected '|', expecting ';' or '{' in Composer\Autoload\includeFile() (line 22 of /home/www/xx/sited9/web/modules/contrib/fixed_block_content/src/Normalizer/BlockContentNormalizer.php) #0 /home/www/xx/sited9/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile('/home/...')
Thanks
- 🇸🇰Slovakia kaszarobert
I guess until this is committed, on Drupal 9 stick to https://www.drupal.org/project/fixed_block_content/releases/8.x-1.1 → . But I don't see a big chance for that since PHP 7.4 is EOL and everyone should migrate to a newer PHP to stay secure, plus Drupal 9 is close to the November 2023 EOL, too.
Drupal 10 works on PHP 8.1<= only, so there should be no problem there. If the maintainer does not wish to fix this issue, then the required minimum PHP version should be stated in the module's composer.json at least.
- last update
over 1 year ago 12 fail - @stephenplatz opened merge request.
- last update
over 1 year ago 16 pass - 🇺🇸United States stephenplatz
Apparently removing the union types makes the module incompatible with HAL 2.x, which is required for Drupal 10. Drupal 9 can use HAL 1.x.
- 🇫🇷France aiphes
Hello, this explain why it's impossible to update HAL too.
drupal/hal 1.0.3 2.0.1 Hypermedia Application Language (HAL)
- Status changed to Needs review
over 1 year ago 11:10am 5 August 2023 - last update
over 1 year ago 16 pass - 🇪🇸Spain manuel.adan 🌌
We need a HAL < 2.x compatible normalizer class. Initial approach.
- last update
over 1 year ago PHPLint Failed