Laravel-5-Generators-Extended: Doesn't work with (yet-to-be-released) Laravel 5.4

PHP Fatal error:  Trait 'Illuminate\Console\AppNamespaceDetectorTrait' not found in /Users/Mike/Code/Laravel/moodeebee.com/vendor/laracasts/generators/src/Commands/MigrationMakeCommand.php on line 16

[Symfony\Component\Debug\Exception\FatalErrorException]
  Trait 'Illuminate\Console\AppNamespaceDetectorTrait' not found

I forked the repository and updated the namespace detector trait classname from AppNamespaceDetectorTrait to DetectsApplicationNamespace and although that surpasses the errors, the files that are generated don’t have the correct class name.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 30
  • Comments: 31 (4 by maintainers)

Most upvoted comments

“laracasts/generators”: “dev-master” worked for me.

@AbdelilahLbardi , try:

"require": {
        "laracasts/generators": "dev-master as 1.1.4"
},

Cheers!

Yeah this affected me when updating Laravel to 5.4 which is out now.

Go fix this!

I changed this codes in the composer.json and fixed all issue “require”: { “laracasts/generators”: “dev-master as 1.1.4” }, Thanks everyone.

@JeffreyWay , any suggestion what we should do? 5.4 has been out for the last month and any new laravel installs automatically use it, so this isn’t working. =( Seems like dev-master works but it just needs to be merged into master.

Saving a step when installing Backpack wouldn’t be a luxury… The fix is merged and awaiting for 3 months, all you have to do now is to tag a release. Please.

Yep, same here.

This just bit me, too.

app.php

‘env’ => env(‘APP_ENV’, ‘development’),

and

AppServiceProvider.php

if ($this->app->environment() == ‘development’) { $this->app->register(‘Laracasts\Generators\GeneratorsServiceProvider’); }

With the exactly same problem i used this: “require-dev”: { “fzaninotto/faker”: “~1.4”, “laracasts/generators”: “dev-master”, “mockery/mockery”: “0.9.*”, “phpunit/phpunit”: “~5.7” }, This is a vanilla instalation with generators Then composer update and the register code in the provider… And the problem was solved automaticaly. Try with a fresh install to see if the problem have a solution like this and then try clean your current instalation. Without your fork maybe or other namespace possibly altered in the process.