edition-php-twig-standard icon indicating copy to clipboard operation
edition-php-twig-standard copied to clipboard

can't generate

Open ashcatmeowmeow opened this issue 9 years ago • 3 comments

I can't use the generate command to build out patternlab.

I get this error:

Fatal Error Class ......\PatternEngineRule not found in ......\patternEngine.php on line 76

Wot sure why this is occurring.

I've used composer to build the demo (option 2) I did see this in the command line: [Alchemy\Zippy\Exception\RuntimeException] Unable to create the inflator

Maybe that has something to do with it? Thanks in advance!

ashcatmeowmeow avatar Jun 08 '15 19:06 ashcatmeowmeow

I get the same error on Windows 10 with node 14.15.0, npm 6.14.8, php 8.0.0. Works fine on my linux box.

Here's the stack trace:

PHP Fatal error:  Uncaught Error: Class "\PatternEngineRule" not found in C:\xampp\htdocs\wp-sandbox\wp-content\themes\dream\src\patternlab\vendor\pattern-lab\core\src\PatternLab\PatternEngine.php:71
Stack trace:
#0 C:\xampp\htdocs\wp-sandbox\wp-content\themes\dream\src\patternlab\vendor\pattern-lab\core\src\PatternLab\PatternEngine.php(38): PatternLab\PatternEngine::loadRules()
#1 C:\xampp\htdocs\wp-sandbox\wp-content\themes\dream\src\patternlab\vendor\pattern-lab\core\src\PatternLab\Builder.php(39): PatternLab\PatternEngine::init()
#2 C:\xampp\htdocs\wp-sandbox\wp-content\themes\dream\src\patternlab\vendor\pattern-lab\core\src\PatternLab\Generator.php(34): PatternLab\Builder->__construct(Array)
#3 C:\xampp\htdocs\wp-sandbox\wp-content\themes\dream\src\patternlab\vendor\pattern-lab\core\src\PatternLab\Console\Commands\GenerateCommand.php(41): PatternLab\Generator->__construct()
#4 C:\xampp\htdocs\wp-sandbox\wp-content\themes\dream\src\patternlab\vendor\pattern-lab\core\src\PatternLab\Console.php(91): PatternLab\Console\Commands\GenerateCommand->run()
#5 C:\xampp\htdocs\wp-sandbox\wp-content\themes\dream\src\patternlab\core\console(46): PatternLab\Console::run()
#6 {main}
  thrown in C:\xampp\htdocs\wp-sandbox\wp-content\themes\dream\src\patternlab\vendor\pattern-lab\core\src\PatternLab\PatternEngine.php on line 71

Fatal error: Uncaught Error: Class "\PatternEngineRule" not found in C:\xampp\htdocs\wp-sandbox\wp-content\themes\dream\src\patternlab\vendor\pattern-lab\core\src\PatternLab\PatternEngine.php:71
Stack trace:
#0 C:\xampp\htdocs\wp-sandbox\wp-content\themes\dream\src\patternlab\vendor\pattern-lab\core\src\PatternLab\PatternEngine.php(38): PatternLab\PatternEngine::loadRules()
#1 C:\xampp\htdocs\wp-sandbox\wp-content\themes\dream\src\patternlab\vendor\pattern-lab\core\src\PatternLab\Builder.php(39): PatternLab\PatternEngine::init()
#2 C:\xampp\htdocs\wp-sandbox\wp-content\themes\dream\src\patternlab\vendor\pattern-lab\core\src\PatternLab\Generator.php(34): PatternLab\Builder->__construct(Array)
#3 C:\xampp\htdocs\wp-sandbox\wp-content\themes\dream\src\patternlab\vendor\pattern-lab\core\src\PatternLab\Console\Commands\GenerateCommand.php(41): PatternLab\Generator->__construct()
#4 C:\xampp\htdocs\wp-sandbox\wp-content\themes\dream\src\patternlab\vendor\pattern-lab\core\src\PatternLab\Console.php(91): PatternLab\Console\Commands\GenerateCommand->run()
#5 C:\xampp\htdocs\wp-sandbox\wp-content\themes\dream\src\patternlab\core\console(46): PatternLab\Console::run()
#6 {main}

pdrittenhouse avatar Dec 28 '20 19:12 pdrittenhouse

I suspect there was a problem with one of the installer scripts. In config/patternengines.json I had

{"patternengines":["\\PatternEngineRule"]}

instead of

{"patternengines":["\\PatternLab\\PatternEngine\\Twig\\PatternEngineRule"]}

I fixed it manually rather than chase down the actual problem.

jproctor avatar Feb 16 '22 14:02 jproctor

I believe this is a bug in patternlab-php-core introduced with PHP 8.0.

I've created an issue here https://github.com/pattern-lab/patternlab-php-core/issues/177

percoction avatar Jul 26 '22 15:07 percoction