- What is cleaniquecoders/blueprint-macro used for?
- It is a Laravel package that registers reusable macros on Laravel's Blueprint schema builder, giving you shorthand for common column and table definitions. You use it inside migration files to cut boilerplate when defining schema and generating models. It is a dev-time helper only and does not add runtime services, middleware, or queue hooks.
- How do I install cleaniquecoders/blueprint-macro?
- Install it with Composer using composer require cleaniquecoders/blueprint-macro. Then confirm the resolved version against your app's Laravel and PHP constraints with composer why-not cleaniquecoders/blueprint-macro. Check the package README for any service provider or config publishing step, since macro packages sometimes require explicit registration.
- Which Laravel and PHP versions does blueprint-macro 5.4.0 support?
- Version 5.4.0 adds illuminate/* ^13.0 constraints and was released with a CI workflow described as Laravel 12 on PHP 8.4 and 8.3. That means the tested matrix is narrower than the claimed Laravel 13 support. Check the exact illuminate/support and illuminate/database ranges in composer.json and confirm whether the minimum Laravel or PHP floor was raised versus 5.3.0.
- How do I use the Blueprint macros in a migration?
- Import Blueprint in your migration and call the macro methods the package registers on the schema builder, just as you would call native column methods. Macro registration happens through Laravel's Macroable trait, so the methods appear on Blueprint once the package is loaded. Refer to the README for the exact macro names and signatures before relying on them.
- Does cleaniquecoders/blueprint-macro support Laravel 13?
- 5.4.0 adds illuminate/* ^13.0 constraints, but that likely targets a pre-stable Laravel 13 release rather than a final GA tag. The CI matrix as described covers Laravel 12 on PHP 8.4 and 8.3, so Laravel 13 may not actually be exercised in tests. Verify the constraint range and whether CI tests against a stable tag or dev-master before treating it as production-supported.
- Is upgrading from blueprint-macro 5.3.0 to 5.4.0 a breaking change?
- The release is described as additive: widened framework constraints plus PHPUnit 12, Pest 4, and CI tooling updates, with no announced deprecations or removals. However, you should diff composer.json to confirm that the minor bump did not silently raise the minimum Laravel or PHP version, which would be a breaking change in a minor release. Run composer why-not against your lockfile to confirm resolution before committing.
- Does blueprint-macro affect model generation or only migrations?
- The package registers macros against Laravel's Blueprint builder, which is used when generating migrations and the schema those migrations define. Its value is terse schema sugar and boilerplate reduction for column and table patterns. Any model-generation benefits come through that schema layer, not through runtime model behavior.
- Is it safe to use blueprint-macro in production?
- It is a dev-time package confined to migration files, so its blast radius is small and nothing in the request lifecycle depends on it. The main risk is compatibility: the macros rely on Laravel's Macroable API and Blueprint methods, which Laravel does not contractually guarantee across majors. Adopt it in non-production first and roll forward on a normal cadence.
- What is the test and CI setup for blueprint-macro 5.4.0?
- 5.4.0 adds PHPUnit 12 compatibility, Pest 4 support, a modernized phpunit.xml.dist, and a standardized CI workflow described as Laravel 12 with PHP 8.4 and 8.3. Older supported Laravel and PHP versions may not appear in that matrix. If you fork or vendor the package's CI config, expect static-analysis strictness changes from the larastan and PHPStan plugin bumps.
- What are alternatives to blueprint-macro for reducing migration boilerplate?
- You can write plain Blueprint calls, build your own macros in a service provider, or use any package that adds schema helpers on top of Blueprint. The tradeoff with any macro package is the same: convenience now versus coupling to Laravel internals that can shift between majors. If you need long-term stability, a small in-house macro set you control is often the safer choice.