Skip to content

Conversation

jasonmccreary
Copy link
Collaborator

This new blueprint:trace command allows developers to load existing models into Blueprint to reference when building new components. It also automatically tracks new models generated by blueprint:build

The combination makes Blueprint more beneficial for generating code within existing applications. It also has use cases outside of generating new code, including:

  • Consolidating many migrations into a smaller set of create migrations which may improve build times.
  • Modernizing migration syntax to use new shorthands for cleaner code.
  • Regenerating casts, dates, or @property code for Models

Newly definite models will also take precedence over an existing model. This way it is easy to regenerated a model with Blueprint.

This was referenced Feb 23, 2020
@axit-joost
Copy link
Contributor

Did this:

composer require --dev laravel-shift/blueprint=dev-trace

Got this:

[... snip...]
  - Removing laravel-shift/blueprint (v1.3.1)
  - Installing laravel-shift/blueprint (dev-trace 54d1d1b): Cloning 54d1d1b36f from cache
doctrine/cache suggests installing alcaeus/mongo-php-adapter (Required to use legacy MongoDB driver)
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   Symfony\Component\Debug\Exception\FatalThrowableError  : Argument 1 passed to Blueprint\Commands\BlueprintCommand::__construct() must be an instance of Illuminate\Contracts\Filesystem\Filesystem, instance of Illuminate\Filesystem\Filesystem given, called in /Users/joostjacobs/Code/socialite/vendor/laravel-shift/blueprint/src/BlueprintServiceProvider.php on line 45

  at /Users/joostjacobs/Code/socialite/vendor/laravel-shift/blueprint/src/Commands/BlueprintCommand.php:35
    31|     /**
    32|      * @param Filesystem $files
    33|      * @param \Illuminate\Contracts\View\Factory $view
    34|      */
  > 35|     public function __construct(Filesystem $files)
    36|     {
    37|         parent::__construct();
    38|
    39|         $this->files = $files;

  Exception trace:

  1   Blueprint\Commands\BlueprintCommand::__construct(Object(Illuminate\Filesystem\Filesystem))
      /Users/joostjacobs/Code/socialite/vendor/laravel-shift/blueprint/src/BlueprintServiceProvider.php:45

  2   Blueprint\BlueprintServiceProvider::Blueprint\{closure}(Object(Illuminate\Foundation\Application), [])
      /Users/joostjacobs/Code/socialite/vendor/laravel/framework/src/Illuminate/Container/Container.php:799

  Please use the argument -v to see more details.
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

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

I get this for all the Commands, and am able to fix it by changing the imports from

use Illuminate\Contracts\Filesystem\Filesystem;

To:

use Illuminate\Filesystem\Filesystem;

@jasonmccreary
Copy link
Collaborator Author

Weird. I'll take a look at the proper import...

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

Successfully merging this pull request may close these issues.

2 participants