mostafaznv / larupload

Larupload is an ORM based file uploader for laravel to upload image, video, audio and other known files.
https://mostafaznv.gitbook.io/larupload/
MIT License
45 stars 5 forks source link

Cachable config #12

Closed mbardelmeijer closed 1 year ago

mbardelmeijer commented 1 year ago

We use mostafaznv/nova-ckeditor which has worked great. We've recently ran into an issue where the php artisan optimize command fails as the config isn't serializable, which seems related to https://github.com/mostafaznv/larupload/blob/master/config/config.php#L158

php artisan optimize

   INFO  Caching the framework bootstrap files.

  config ................................................................................................................................. 35ms FAIL

   LogicException

  Your configuration files are not serializable.

  at vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php:73
     69▕             require $configPath;
     70▕         } catch (Throwable $e) {
     71▕             $this->files->delete($configPath);
     72▕
  ➜  73▕             throw new LogicException('Your configuration files are not serializable.', 0, $e);
     74▕         }
     75▕
     76▕         $this->components->info('Configuration cached successfully.');
     77▕     }

  1   bootstrap/cache/config.php:1718
      Error::("Call to undefined method Mostafaznv\Larupload\DTOs\Style\ImageStyle::__set_state()")
      +29 vendor frames

  31  artisan:35
      Illuminate\Foundation\Console\Kernel::handle()
mostafaznv commented 1 year ago

Hi @mbardelmeijer Thanks for the report. I will fix it today.

mostafaznv commented 1 year ago

Please run composer update. It could fix the issue.

mbardelmeijer commented 1 year ago

Thanks for the fix! 🚀