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

configuration & php artisan config:cache : bug #290

Closed
Grummfy opened this issue Aug 16, 2017 · 8 comments
Closed

configuration & php artisan config:cache : bug #290

Grummfy opened this issue Aug 16, 2017 · 8 comments
Labels
duplicate A repeated issue or entry

Comments

@Grummfy
Copy link

Grummfy commented Aug 16, 2017

Q A
Bug? no (for me laravel is bad on this) & yes (because no choice)
New Feature? no
Framework Laravel (Lumen?)
Framework version 5.4
Package version 4.1
PHP version *

Actual Behaviour

When I use php artisan config:cache, the app crashed.

Expected Behaviour

When I use php artisan config:cache, i would like my app still running.

Steps to Reproduce

install the package with the config file, and run php artisan config:cache

Possible Solutions

Ask them to make closure usable with laravel config?
Until that
implements a OwenIt\Auditing\Contracts\UserResolver with the same content as the closure

More information: laravel/framework#9625
I totally disagree with the comment that config with closure is bad, but for now there is no good solution for it.

@quetzyg
Copy link
Contributor

quetzyg commented Aug 16, 2017

What exactly is your point with this issue?

@Grummfy
Copy link
Author

Grummfy commented Aug 16, 2017

well because by default the configuration file came with a closure, you can't cache the config (make the app crash). So just update the default config with a default implementation of the resolver in a class.

@quetzyg
Copy link
Contributor

quetzyg commented Aug 16, 2017

While having a closure in the configuration won't work once you try to cache, it makes working with the package a bit quicker, having one less thing to worry about at the beginning. Also, the issue is documented in the troubleshooting and settings sections, along with a few issues here on GitHub (#213, #234, #237, #250, #284).

I'll keep this one open, to remind me to add a comment about it in the configuration file.

@Grummfy
Copy link
Author

Grummfy commented Aug 16, 2017

well I forget to check the troubleshooting guide ;)
too fast post this issue

@quetzyg quetzyg added the duplicate A repeated issue or entry label Aug 16, 2017
@mikebronner
Copy link
Contributor

I would like to support the idea that this should be fixed. The configuration file should not cause artifacts or errors working with default Laravel functionality.

@quetzyg
Copy link
Contributor

quetzyg commented Sep 17, 2017

A Closure is no longer set as the default resolver in the configuration.

@mike23v
Copy link

mike23v commented Sep 26, 2017

Hi @quetzyg,
I'm having the following error Illuminate\Database\Query\Builder::check() since you removed the Closure as a default resolver in the configuration or in config/audit.php. Can you please help me on this.? Thanks

@quetzyg
Copy link
Contributor

quetzyg commented Sep 26, 2017

@mike23v, the Illuminate\Database\Query\Builder::check() issue is because you're doing it wrong. I have already addressed that in the issue you opened (#316).

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

4 participants