laravel-shift / blueprint

A code generation tool for Laravel developers.
MIT License
2.82k stars 270 forks source link

Indicate where the problem in the YAML file is #693

Closed esurov closed 1 month ago

esurov commented 1 month ago

Synopsis:

I tried to generate migrations for the existing database. So I used drawsql.app website to reverse engineer the DB structure and generate the blueprint YAML file.

Then when I try to use blueprint:build it gives me always the same error:

   TypeError

  Blueprint\Models\Column::__construct(): Argument #4 ($attributes) must be of type array, string given, called in /tmp/innovation/vendor/laravel-shift/blueprint/src/Lexers/ModelLexer.php on line 261

It's really hard to understand what the actual problem is.

Proposed Syntax:

When I run the blueprint:build if there's a problem with the YAML file I'd like to know in which line.

jasonmccreary commented 1 month ago

This is a bug, not a feature enhancement. Please include the YAML that generates this error.