Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi !
As i explained in issue Bug in ThemeGeneratorCommand : title_case #40, the method title_case is not available since 5.7.
I have changed the method to Str::title.
There is another bug : symlink. I have used another name than "Themes", and i had a message error :
symlink(): File exists
Because, it is missing a little condition in :
if (!File::exists(public_path('Themes')) && config('theme.symlink') && File::exists(config('theme.theme_path'))) {
---> As i used another name, with this condition, it checked if "Themes" exists in public path. In my cas, it doesn't exist but it is already symlink with another name. So, on every boot, this class try to symlink to path which is already exist.
I have added a "&& !File::exists(config('theme.symlink_path'))" in this condition.
$themePath = str_replace(base_path('public') . DIRECTORY_SEPARATOR, '', $this->config[ 'theme.symlink_path' ]) . DIRECTORY_SEPARATOR.$themeName.DIRECTORY_SEPARATOR;;
It is now worked with my project ( i use Laravel Framework 7.9.2). (Sorry for multiple commits. It is my first time...)
Best regards.