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

Must not be accessed before initialization #100

Closed
napruzzese opened this issue Jan 22, 2024 · 2 comments
Closed

Must not be accessed before initialization #100

napruzzese opened this issue Jan 22, 2024 · 2 comments

Comments

@napruzzese
Copy link

napruzzese commented Jan 22, 2024

When a person try to create Model, Enum etc for a Domain that not works!

php artisan beyond:make:enum Users/UserStatusEnum

 ┌ On which domain do you want to add your Enum ────────────────┐
 │ Users                                                        │
 └──────────────────────────────────────────────────────────────┘


   Error 

  Typed property AkrilliA\LaravelBeyond\NameResolver::$directory must not be accessed before initialization

  at vendor/akrillia/laravel-beyond/src/NameResolver.php:90
     86▕         $this->namespace = sprintf(
     87▕             $this->command->getNamespaceTemplate().'%s',
     88▕             $this->appOrDomain,
     89▕             $this->command->getType()->getNamespace(),
  ➜  90▕             $this->directory ? '\\'.$this->directory : '',
     91▕         );
     92▕ 
     93▕         $this->path = sprintf(
     94▕             '%s/'.$this->command->getFileNameTemplate(),

      +15 vendor frames 

  16  artisan:35
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

When u make php artisan beyond:make:model Users/User may not work, when u try php artisan beyond:make:model Users.User it works!

@alexanderkroneis
Copy link
Collaborator

We‘ll investigate asap, thanks for reporting!

@regnerisch
Copy link
Collaborator

Fixed in v7.0.0-beta.8

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

No branches or pull requests

3 participants