Skip to content

Config is no longer serializable after installing this package #11

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

Closed
admench opened this issue Apr 8, 2021 · 4 comments
Closed

Config is no longer serializable after installing this package #11

admench opened this issue Apr 8, 2021 · 4 comments

Comments

@admench
Copy link

admench commented Apr 8, 2021

Thanks for such a great package. It works a charm.

However I cannot run php artisan config:cache when this is installed, I get this issue:

LogicException 

Your configuration files are not serializable.

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

  1   bootstrap/cache/config.php:734
      Error::("Call to undefined method BeyondCode\LaravelMaskedDumper\DumpSchema::__set_state()")

      [2m+14 vendor frames [22m
  16  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()

Any tips to overcome this would be greatly appreciated.

Using v1.0.0 on Laravel 7.30.4

@ziming
Copy link

ziming commented Apr 28, 2021

Having the same issue here. On laravel 8 and moved the faker package to the require key of composer.json too.

@butcherman
Copy link

The issue is that the package uses functions in the config file. You cannot cache a file that has logic in it.

@kswilliames
Copy link
Contributor

Resolved in #15

@bennycive
Copy link

Hello, i want the solution for this 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:635
Error::("Call to undefined method Closure::__set_state()")
2 vendor\laravel\framework\src\Illuminate\Foundation\Console\ConfigCacheCommand.php:69

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants