calebporzio / laravel-frontend-preset

My personal frontend preset for new laravel applications.
31 stars 5 forks source link

[BUG] Class 'Illuminate\Foundation\Console\PresetCommand' not found #2

Open YannickYayo opened 4 years ago

YannickYayo commented 4 years ago

Hi, i'm maintaining my own preset too, and i have hard time supporting Laravel 7.

I tried your preset with a fresh Laravel 7 app, and seems like you have the same issue : Class 'Illuminate\Foundation\Console\PresetCommand' not found

It seems like this command has been removed from Laravel 7 :(

YannickYayo commented 4 years ago

See : https://github.com/laravel/framework/commit/e658f7e0fe3212919b837fbd0eb25c2ddaa979e7#diff-d186675bb15edec3fc16c34f7b2d8fea

martindilling commented 4 years ago

See the commit name you linked to "remove preset commands that are now in laravel/ui" :)

https://github.com/laravel/ui

tanthammar commented 4 years ago

Have the same issue. Don't find anything on the links provided by @martindilling or @YannickYayo . Fresh Laravel 7 Error in composer

composer require calebporzio/laravel-frontend-preset
Using version ^0.1.3 for calebporzio/laravel-frontend-preset
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing calebporzio/laravel-frontend-preset (v0.1.3): Downloading (100%)         
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   Error 

  Class 'Illuminate\Foundation\Console\PresetCommand' not found

  at vendor/calebporzio/laravel-frontend-preset/src/PresetServiceProvider.php:12
     8| class PresetServiceProvider extends ServiceProvider
     9| {
    10|     public function boot()
    11|     {
  > 12|         PresetCommand::macro('calebporzio', function ($command) {
    13|             Preset::install();
    14| 
    15|             $command->info('Preset installed. To finish setup, run:');
    16|             $command->info('npm install && node_modules/.bin/tailwind init && npm run dev');

      +8 vendor frames 
  9   [internal]:0
      Illuminate\Foundation\Application::Illuminate\Foundation\{closure}(Object(CalebPorzio\LaravelPreset\PresetServiceProvider))

      +5 vendor frames 
  15  artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

Installation failed, reverting ./composer.json to its original content.
martindilling commented 4 years ago

Yea I can see the command is now Laravel\Ui\UiCommand. On the commute home, but if no one else do it, I'll try to create a pull request tonight or tomorrow morning (gmt) ;)

YannickYayo commented 4 years ago

Nice, if you need help, i have finally upgraded my own preset to fully support Laravel 7 and the laravel/ui package at : https://github.com/YannickYayo/laravel-preset-ttall

martindilling commented 4 years ago

Hmm, making it work with laravel/ui the easy way, would break support for older versions. So I think @calebporzio should take a look and decide which way he want to take the package :)