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

Laravel 11 support #199

Closed
julianovmartins opened this issue Mar 27, 2024 · 3 comments · Fixed by #200
Closed

Laravel 11 support #199

julianovmartins opened this issue Mar 27, 2024 · 3 comments · Fixed by #200

Comments

@julianovmartins
Copy link

Some files, such as Kernel.php, are no longer available in Laravel 11.

Environment:

  • Laravel-Code-Generator Version: 3.0.1
  • Laravel Version: 11.0.8

Description:

When I execute the command create:mapped-resources, only the first file (the model) is made, and then the Exception below occurs.

Scaffolding web-based resources for menu...
A model was crafted successfully.

   Illuminate\Contracts\Container\BindingResolutionException 

  Target class [\App\Http\Kernel] does not exist.

  at vendor/laravel/framework/src/Illuminate/Container/Container.php:906
    902▕ 
    903▕         try {
    904▕             $reflector = new ReflectionClass($concrete);
    905▕         } catch (ReflectionException $e) {
  ➜ 906▕             throw new BindingResolutionException("Target class [$concrete] does not exist.", 0, $e);
    907▕         }
    908▕ 
    909▕         // If the type is not instantiable, the developer is attempting to resolve
    910▕         // an abstract type such as an Interface or Abstract Class and there is

      +47 vendor frames 

  48  artisan:13
      Illuminate\Foundation\Application::handleCommand(Object(Symfony\Component\Console\Input\ArgvInput))

Steps/Commands To Reproduce:

By command:

php artisan create:mapped-resources

Note: All JSON files were previously created without any problems.

@MikeAlhayek
Copy link
Collaborator

@julianovmartins Are you trying to create a form-request? If so, does it work without a form-request?

@julianovmartins
Copy link
Author

@MikeAlhayek, thanks for answering.

Without or with a form-request, the exception occur, for example:

php artisan create:scaffold Menu

php artisan create:scaffold Menu --with-form-request
Captura de Tela 2024-03-27 às 13 55 48

@MikeAlhayek
Copy link
Collaborator

Thank you. This is fixed and 3.0.2 was released!

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

Successfully merging a pull request may close this issue.

2 participants