laravel-er-diagram-generator icon indicating copy to clipboard operation
laravel-er-diagram-generator copied to clipboard

PhpParser\Error : Syntax error, unexpected T_STRING on line 729

Open neogreco opened this issue 2 years ago • 1 comments

Im recently installed the diagram generator, and when i try to run it and generate a erd diagram i get this on console:

PhpParser\Error 

 Syntax error, unexpected T_STRING on line 729

 at vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php:318
   314▕                     /* error */
   315▕                     switch ($this->errorState) {
   316▕                         case 0:
   317▕                             $msg = $this->getErrorMessage($symbol, $state);
 ➜ 318▕                             $this->emitError(new Error($msg, $startAttributes + $endAttributes));
   319▕                             // Break missing intentionally
   320▕                         case 1:
   321▕                         case 2:
   322▕                             $this->errorState = 3;

     +5 vendor frames 
 6   [internal]:0
     BeyondCode\ErdGenerator\ModelFinder::BeyondCode\ErdGenerator\{closure}(Object(Symfony\Component\Finder\SplFileInfo))

     +3 vendor frames 
 10  [internal]:0
     BeyondCode\ErdGenerator\GenerateDiagramCommand::BeyondCode\ErdGenerator\{closure}("/[PROYECT-PATH]/app")

Any idea of how i can solve this error?

neogreco avatar Oct 06 '21 15:10 neogreco

Edit the directories array in config/erd-generator.php and specify app/Models as the lookup directory. Maybe that will help?

leemcd56 avatar Oct 26 '21 19:10 leemcd56