Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to parse section when using translation helper with parameters #62

Open
khalyomede opened this issue Jul 5, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@khalyomede
Copy link
Owner

For the following code, PHP Parser throws an error

@section('title', __('How :app works', ['app' => config('app.name')]))
anwar@ubuntu:~/programming/predzo/app$ dcr php artisan translate
Fetching langs...
Fetching files to parse...
Fetching translation keys...
 320/399 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░]  80%
   PhpParser\Error 

  Syntax error, unexpected ';', expecting ')' on line 1

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

      +19 vendor frames 

  20  artisan:35
      Illuminate\Foundation\Console\Kernel::handle()

ERROR: 1
@khalyomede khalyomede added the bug Something isn't working label Jul 5, 2024
@khalyomede khalyomede self-assigned this Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant