-
-
Notifications
You must be signed in to change notification settings - Fork 318
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
Fixes #1506 #1516
Fixes #1506 #1516
Conversation
8699313
to
29d2c8f
Compare
Codecov Report
Additional details and impacted files |
You could check the existence of |
I know, I could, but I actually don't feel like doing it. What I meant is, there is no option to do it inside Composer using the means offered by Composer. First of all, it would require just another script and I feel like we already have too many scripts (in too many different script languages) and I don't want to add another one onto that pile. Secondly, using the existence of a particular file which "accidentally" happens to exist as a development dependency as an indicator whether Composer is in development mode or not feels kind of nasty workaround. In particular, it feels like something which might break at some point and then nobody knows why. So, yes I wanted to fix #1506 with as little complications as possible. I don't mind if this PR gets dropped and #1506 stays open or gets closed as "won't fix". In particular, as the users brought themselves into that situation in the first place. I also don't mind if someone extends this PR and fixes #1506 in a better way. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (untested).
At least the |
Actually,
inside our own console command. Checking for compiled views seems to a little bit more complicated as there does not seem to be a single file, but at least one file for each compiled view. |
@ildyria and @kamil4: You have already approved the PR but I would like to ask you to re-review it again as it has changed significantly. As suggested by @kamil4 in #1516 (comment) and discussed in #1516 (comment) I decided to improve the original Laravel command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Co-authored-by: Kamil Iskra <kamil.01482@iskra.name>
Fixes #1506.
Occasionally, updating Lychee fails because users explicitly cached the Lychee/Laravel configuration, forget about it and after a package update strange things start to happen, because the Laravel caches still contain outdated configurations or source files.
This PR prevent this from happening by running
artisan optimize --clever --dont-ask=assume-no
during update.This PR also puts the original
optimize
command provided by the framework on steroids. The extendedoptimize
command allows to only build a cache if the user has explicitly chosen to do so in the past. From the comment above the new command: