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

Call to undefined method Closure::__set_state() #284

Closed
terrylow opened this issue Aug 4, 2017 · 2 comments
Closed

Call to undefined method Closure::__set_state() #284

terrylow opened this issue Aug 4, 2017 · 2 comments
Labels
duplicate A repeated issue or entry

Comments

@terrylow
Copy link

terrylow commented Aug 4, 2017

Q A
Bug? yes
New Feature? no
Framework Laravel
Framework version 5.4.32
Package version 4.1.2
PHP version 7.1.7

Actual Behaviour

Received this exception from terminal Call to undefined method Closure::__set_state()

and these from page
Fatal error: Uncaught ReflectionException: Class config does not exist in /home/vagrant/code/calibration/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 752

ReflectionException: Class config does not exist in /home/vagrant/code/calibration/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 752

Once received this error, required to remove /bootstrap/cache/config.php file in order to recover from the errors.

Steps to Reproduce

issue a php artisan config:cache command

After some debug, it seem https://github.com/owen-it/laravel-auditing/blob/4.1/config/audit.php#L42-L44 is trigger the errors, once the config is cached, resolver turn into the following

      Closure::__set_state(array(
      )),
@terrylow
Copy link
Author

terrylow commented Aug 4, 2017

@nerijunior it is not working here, get a runtime exception A facade root has not been set.

at the time we issue command from commandline, no user is authenticated, maybe thats why the cached config is empty

@quetzyg
Copy link
Contributor

quetzyg commented Aug 5, 2017

There's at least four previous tickets about this (#213, #234, #237, #250) and two separate entries in the documentation about the User resolver here and in the troubleshooting section.

@quetzyg quetzyg closed this as completed Aug 5, 2017
@quetzyg quetzyg added the duplicate A repeated issue or entry label Aug 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate A repeated issue or entry
Projects
None yet
Development

No branches or pull requests

2 participants