TopShelfCraft / Wordsmith-Docs

Documentation for the Wordsmith plugin — https://wordsmith.docs.topshelfcraft.com
3 stars 3 forks source link

The included Inflector package is not compatible with PHP 8 #21

Closed andypullen closed 2 years ago

andypullen commented 2 years ago

Any of the filters in using the included Inflector package (v1.5.0) breaks with PHP 8+, and causes the rest of the script to stop executing.

For example, in a template, Hello {{ 1 | ordinalize }} World will only output Hello, breaking at the ordinalize filter.

phperrors.log records this error:

#0 {main}
  thrown in /app/vendor/yiisoft/yii2/base/ErrorException.php on line 50
[12-Apr-2022 14:23:54 America/Los_Angeles] PHP Fatal error:  Array and string offset access syntax with curly braces is no longer supported in /app/vendor/icanboogie/inflector/lib/inflections.php on line 350
[12-Apr-2022 14:23:54 America/Los_Angeles] PHP Warning:  Function must be enabled in php.ini by setting 'xdebug.mode' to 'develop' in /app/vendor/yiisoft/yii2/base/ErrorException.php on line 50
[12-Apr-2022 14:23:54 America/Los_Angeles] PHP Fatal error:  Uncaught yii\base\ErrorException: Function must be enabled in php.ini by setting 'xdebug.mode' to 'develop' in /app/vendor/yiisoft/yii2/base/ErrorException.php:50

Running Craft 3.7.38 on PHP 8.0.16

andypullen commented 2 years ago

Duplicate of https://github.com/TopShelfCraft/Wordsmith/issues/34