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

OptimizeCommand is back #25498

Closed
bojcheski opened this issue Sep 7, 2018 · 5 comments
Closed

OptimizeCommand is back #25498

bojcheski opened this issue Sep 7, 2018 · 5 comments

Comments

@bojcheski
Copy link

bojcheski commented Sep 7, 2018

Laravel Optimize Command is back, and causing some problems (if called, it tries to cache routes and the ones that use Closures throw an LogicException (src/Illuminate/Routing/Route.php:880) )

#20851

@dwightwatson
Copy link
Contributor

The old one was gone for a good 7 months before (and deprecated 2 months before that) before the new command was introduced. Surely it wouldn't have been in anyone's deployment scripts and now suddenly causing an issue all of sudden.

The new one just calls the caching commands in one go - for config and routes. If your routing isn't compatible with the route cache then just don't use the optimise command.

@devcircus
Copy link
Contributor

The documentation states that you can't cache routes that utilize closures. So if you're using closure based routes, you'll get an error if you attempt to cache.

@bojcheski
Copy link
Author

It is not a problem for me not using it. As a matter of fact I don't use it and I don't need it. I somehow installed some package that wasn't really updated and was using that command, and noticed the LogicException throwing. Digging it deeper seems the Optimize command was not included in the 5.7.1 tag, and came back in 5.7.2 tag, and that was the only reason I opened this issue, not that I need something get fixed

@X-Coder264
Copy link
Contributor

From what I see the optimize command is included in all 5.7.x tags (as it was PRed back in March).

5.7.0
5.7.1
5.7.2

@laurencei
Copy link
Contributor

Hi there,

Welcome to Laravel and we are glad to have you as part of the community.

Unfortunately this GitHub area is not for ideas, suggestions etc. This is only for issues/bugs with the framework code itself.

I will be closing your ticket here. You are able to open a ticket at https://github.com/laravel/ideas

Alternatively you are able to open a PR using the Contributions guidelines: https://laravel.com/docs/5.7/contributions#which-branch

If you feel I've closed this issue in error, please provide more information about how this is a framework issue, and I'll reopen the ticket.

Thanks in advance.

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