oscarafdev/migrations-generator

can't install it on Laravel Framework 5.8.37

Closed this issue · 7 comments

Trying to run:
composer require oscarafdev/migrations-generator 2.0.19

and I've got this:

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - oscarafdev/migrations-generator 2.0.19 requires oscarafdev/laravel-4-generators ~3.1.5 -> satisfiable by oscarafdev/laravel-4-generators[3.1.5].
    - Installation request for oscarafdev/migrations-generator 2.0.19 -> satisfiable by oscarafdev/migrations-generator[2.0.19].
    - Conclusion: remove laravel/framework v5.8.37
    - Conclusion: don't install laravel/framework v5.8.37
    - oscarafdev/laravel-4-generators 3.1.5 requires illuminate/support ^6.0 || ^7.0 -> satisfiable by illuminate/support[6.x-dev, 7.x-dev, v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.1.0, v6.10.0, v6.11.0, v6.12.0, v6.13.0, v6.13.1, v6.14.0, v6.15.0, v6.15.1, v6.16.0, v6.17.0, v6.17.1, v6.18.0, v6.18.1, v6.18.10, v6.18.11, v6.18.12, v6.18.13, v6.18.14, v6.18.2, v6.18.3, v6.18.4, v6.18.5, v6.18.6, v6.18.7, v6.18.8, v6.18.9, v6.2.0, v6.3.0, v6.4.1, v6.5.0, v6.5.1, v6.5.2, v6.6.0, v6.6.1, v6.6.2, v6.7.0, v6.8.0, v7.0.0, v7.0.1, v7.0.2, v7.0.3, v7.0.4, v7.0.5, v7.0.6, v7.0.7, v7.0.8, v7.1.0, v7.1.1, v7.1.2, v7.1.3, v7.10.0, v7.10.1, v7.10.2, v7.10.3, v7.11.0, v7.2.0, v7.2.1, v7.2.2, v7.3.0, v7.4.0, v7.5.0, v7.5.1, v7.5.2, v7.6.0, v7.6.1, v7.6.2, v7.7.0, v7.7.1, v7.8.0, v7.8.1, v7.9.0, v7.9.1, v7.9.2].
    - don't install illuminate/support 6.x-dev|don't install laravel/framework v5.8.37
    - don't install illuminate/support 7.x-dev|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.0.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.0.1|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.0.2|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.0.3|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.0.4|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.1.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.10.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.11.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.12.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.13.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.13.1|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.14.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.15.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.15.1|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.16.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.17.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.17.1|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.18.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.18.1|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.18.10|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.18.11|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.18.12|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.18.13|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.18.14|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.18.2|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.18.3|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.18.4|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.18.5|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.18.6|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.18.7|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.18.8|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.18.9|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.2.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.3.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.4.1|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.5.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.5.1|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.5.2|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.6.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.6.1|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.6.2|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.7.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v6.8.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.0.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.0.1|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.0.2|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.0.3|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.0.4|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.0.5|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.0.6|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.0.7|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.0.8|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.1.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.1.1|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.1.2|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.1.3|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.10.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.10.1|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.10.2|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.10.3|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.11.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.2.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.2.1|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.2.2|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.3.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.4.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.5.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.5.1|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.5.2|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.6.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.6.1|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.6.2|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.7.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.7.1|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.8.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.8.1|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.9.0|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.9.1|don't install laravel/framework v5.8.37
    - don't install illuminate/support v7.9.2|don't install laravel/framework v5.8.37
    - Installation request for laravel/framework (locked at v5.8.37, required as 5.8.*) -> satisfiable by laravel/framework[v5.8.37].


Installation failed, reverting ./composer.json to its original content.

I have added a version with support to laravel 5, try to install it

Thanks a lot for your help,
I tried this new version but unfortunately I've got this:


> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   Symfony\Component\Debug\Exception\FatalErrorException  : Declaration of Way\Generators\Commands\ModelGeneratorCommand::getTemplateData() must be compatible with Way\Generators\Commands\GeneratorCommand::getTemplateData(): array

  at C:\project01\vendor\oscarafdev\laravel-4-generators\src\Way\Generators\Commands\ModelGeneratorCommand.php:69
    65|             ['modelName', InputArgument::REQUIRED, 'The name of the desired Eloquent model']
    66|         ];
    67|     }
    68|
  > 69| }
    70|


   Whoops\Exception\ErrorException  : Declaration of Way\Generators\Commands\ModelGeneratorCommand::getTemplateData() must be compatible with Way\Generators\Commands\GeneratorCommand::getTemplateData(): array

  at C:\project01\vendor\oscarafdev\laravel-4-generators\src\Way\Generators\Commands\ModelGeneratorCommand.php:69
    65|             ['modelName', InputArgument::REQUIRED, 'The name of the desired Eloquent model']
    66|         ];
    67|     }
    68|
  > 69| }
    70|

  Exception trace:

  1   Whoops\Run::handleError("Declaration of Way\Generators\Commands\ModelGeneratorCommand::getTemplateData() must be compatible with Way\Generators\Commands\GeneratorCommand::getTemplateData(): array", "C:\project01\vendor\oscarafdev\laravel-4-generators\src\Way\Generators\Commands\ModelGeneratorCommand.php")
      C:\project01\vendor\filp\whoops\src\Whoops\Run.php:408

  2   Whoops\Run::handleShutdown()
      [internal]:0
PHP Fatal error:  Declaration of Way\Generators\Commands\ModelGeneratorCommand::getTemplateData() must be compatible with Way\Generators\Commands\GeneratorCommand::getTemplateData(): array in C:\project01\vendor\oscarafdev\laravel-4-generators\src\Way\Generators\Commands\ModelGeneratorCommand.php on line 69

What version of PHP are you using?

What version of PHP are you using?

PHP 7.2.10

I don't know the cause of this error, have you been able to fix it?

I don't know the cause of this error, have you been able to fix it?

No :(

The postAutoloadDump errors are due to PHP 7.2: Method signature compatibility strictly enforced.
Have been able to get it running by type hinting the returns of the generator methods