ytake / Laravel-Aspect

aspect oriented programming Package for laravel framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After update to 5.0 ErrorException : Undefined index: force_compile

4n70w4 opened this issue · comments

composer require ytake/laravel-aspect:5.0
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
    1/1:        https://codeload.github.com/ytake/Laravel-Aspect/legacy.zip/b949ca4501fa0f03e42e8a8d13c6bfbc637856e6
    Finished: success: 1, skipped: 0, failure: 0, total: 1
Package operations: 0 installs, 1 update, 0 removals
  - Updating ytake/laravel-aspect (4.0.0 => 5.0.0): Loading from cache
Writing lock file
Generating optimized autoload files
Processing patches configuration
Nothing to patch
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   ErrorException  : Undefined index: force_compile

  at /var/www/app/vendor/ytake/laravel-aspect/src/RayAspectKernel.php:148
    144|      */
    145|     protected function makeCompileDir()
    146|     {
    147|         $this->makeDirectories(strval($this->configure['compile_dir']), 0775);
  > 148|         $this->forceCompile = (bool)$this->configure['force_compile'];
    149|     }
    150|
    151|     /**
    152|      * make aspect cache directory

  Exception trace:

  1   Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("Undefined index: force_compile", "/var/www/app/vendor/ytake/laravel-aspect/src/RayAspectKernel.php", [])
      /var/www/app/vendor/ytake/laravel-aspect/src/RayAspectKernel.php:148

  2   Ytake\LaravelAspect\RayAspectKernel::makeCompileDir()
      /var/www/app/vendor/ytake/laravel-aspect/src/RayAspectKernel.php:84

  Please use the argument -v to see more details.
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

Installation failed, reverting ./composer.json to its original content.

@izayoi256 any ideas?

commented

will take a look later. add ?? false and it should work.

Don't fixed. After update version from 4 to 5 the same error.

May be you mean:

$this->forceCompile = (bool) ($this->configure['force_compile'] ?? false);

insead:

$this->forceCompile = (bool)$this->configure['force_compile'] ?? false;