Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

can't generate #4

Open
ashcatmeowmeow opened this issue Jun 8, 2015 · 3 comments
Open

can't generate #4

ashcatmeowmeow opened this issue Jun 8, 2015 · 3 comments

Comments

@ashcatmeowmeow
Copy link

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!

@pdrittenhouse
Copy link

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}

@jproctor
Copy link

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.

@percoction
Copy link

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

I've created an issue here pattern-lab/patternlab-php-core#177

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants