heimrichhannot / contao-utils-bundle

This bundle offers various utility functionality for the Contao CMS.
GNU Lesser General Public License v3.0
8 stars 4 forks source link

Unable to install v2.237.0 on PHP 7.4 #84

Closed ChipsVII closed 3 months ago

ChipsVII commented 3 months ago

Context Contao version: 4.13.18 Bundle version: 2.237.0 PHP version: 7.4.33

Description

I wanted to update one of my package (which requires this one) through the Contao Manager, but it ended up in an error.

composer update :

...
- Upgrading heimrichhannot/contao-utils-bundle (2.227.1 => 2.237.0)
...

composer install :

...
contao/manager-plugin: ...done dumping generated plugins file
Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE) in /vendor/heimrichhannot/contao-utils-bundle/src/StaticUtil/StaticArrayUtil.php on line 17
> @php vendor/bin/contao-setup
PHP Parse error:  syntax error, unexpected '|', expecting variable (T_VARIABLE) in /vendor/heimrichhannot/contao-utils-bundle/src/StaticUtil/StaticArrayUtil.php on line 17
Script @php vendor/bin/contao-setup handling the post-install-cmd event returned with error code 255
# Process terminated with exit code 255
# Result: Unknown error

And indeed, this code is not PHP 7.4 compliant because of the array|string https://github.com/heimrichhannot/contao-utils-bundle/blob/6749f71134ff224d883b7835a6e7a2debf56c785/src/StaticUtil/StaticArrayUtil.php#L17

Have a nice day,

koertho commented 3 months ago

Thanks for reporting, fixed in e797fad