laravel-shift/blueprint

Ability to add declare(strict_types=1) to all generated files

arnonm opened this issue · 2 comments

Synopsis:

Central method to add declare(strict_types=1) to all files generated

Proposed Syntax:

Add a flag in the config: blueprint.strict_types - default as false

Expected Behavior:

When set to false - no change
When set to true - all files have the strict_types line added after php tag and before namespace

I'm open to a strict_types option set to false by default. Feel free to start a PR. Otherwise, I'll get around to it in the coming weeks.

In the meantime, there is a new task to "Declare strict types" in the Shift Workbench.

Revisiting this, between the ability to customize the stubs and the free task in the Shift Workbench, there are ways to do this without needing to build more custom options.

As such, I'm closing this issue. However, if you (or someone reading this in the future) wants to submit a PR, I'm glad to review it.