Laravel-Lang / publisher

Publisher provides functionality for working with application localization
https://laravel-lang.com/packages-publisher.html
MIT License
212 stars 25 forks source link

Italian language installation and update fails when Pest is installed #298

Closed rinodrummer closed 2 years ago

rinodrummer commented 2 years ago

Description:

Recently I installed Laravel Lang with Publisher and added the Italian language using the command php artisan lang:add it and worked like a charm, after installing it I've edited my composer.json to run this language on post-root-package-install script and php artisan lang:update on post-update-cmd script.

Today I needed to install Pest, after the package installation, the update failed when reaching the Italian language with this error:


   INFO  LaravelLang\Attributes\Plugin.  

  Collect source .......................................................................................................................... 4ms DONE
  Collecting en ........................................................................................................................... 2ms DONE

   ArgumentCountError 

  Too few arguments to function it(), 0 passed in D:\git\sms-crm\vendor\dragon-code\support\src\Instances\Call.php on line 181 and at least 1 expected

  at D:\git\sms-crm\vendor\pestphp\pest\src\Functions.php:110
    106▕      * a closure that contains the test expectations.
    107▕      *
    108▕      * @return TestCall|TestCase|mixed
    109▕      */
  ➜ 110▕     function it(string $description, Closure $closure = null): TestCall
    111▕     {
    112▕         $description = sprintf('it %s', $description);
    113▕
    114▕         return test($description, $closure);

  1   D:\git\sms-crm\vendor\dragon-code\support\src\Instances\Call.php:181
      it()

  2   D:\git\sms-crm\vendor\dragon-code\support\src\Facades\Facade.php:29
      DragonCode\Support\Instances\Call::value("it")

This error is thrown every time the command php artisan lang:update is executed.

Steps To Reproduce:

  1. Install Laravel Lang as dev dependency;
  2. Install Laravel Lang Publisher as dev dependency
  3. Add Italian language with php artisan lang:add it;
  4. Install Pest as dev dependecy;
  5. Run php artisan lang:update.
andrey-helldar commented 2 years ago

The bug has been fixed and version 14.3.1 has been released.

Thank you for issue!