ulobby / NeoEloquent

An extension of Laravel Elqouent that supports Neo4j, a native graph database
MIT License
41 stars 17 forks source link

Generating Migrations broken for Laravel 9 #53

Closed harris21 closed 9 months ago

harris21 commented 1 year ago

Description:

In Laravel 9, the populateStub() function that is used for generating new Neo4J migrations, doesn't work.

Steps To Reproduce:

  1. Try running php artisan neo4j:make:migration NameOfMigration
  2. Observe

Expected result

Actual result

Undefined variable $name

at vendor/ulobby/neoeloquent/src/Migrations/MigrationCreator.php:22

     18▕     protected function populateStub($stub, $label)
     19▕     {
     20▕         $stub = str_replace(
     21▕             ['DummyClass', '{{ class }}', '{{class}}'],
  ➜  22▕             $this->getClassName($name),
     23▕             $stub
     24▕         );
     25▕
     26▕         // Here we will replace the label place-holders with the label specified by

      +17 vendor frames
  18  artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))