jeffersongoncalves/laravel-cnpj
A Laravel package for working with CNPJ, the Brazilian company registration number. It offers validation, formatting, and generation helpers, plus a Laravel validation rule to sanitize input, apply the standard mask, and create valid CNPJ values for forms, tests, and seed data.
This release (1.0.2) changes the distribution mechanism of the package's migration from a directly-shipped migration file to a publishable .stub, aligning with the de facto Laravel package convention (Spatie/Orchestra-style). For a TPM, the important read is that this is a packaging-convention change, not a functional change: the publish command and tag (cnpj-migrations) are unchanged, so consumer-facing behavior is preserved.
.stub files published via vendor:publish is the idiomatic Laravel pattern. It prevents the package's migration from colliding with the host application's migration namespace and puts schema ownership in the consuming app, which is exactly where Laravel expects it. A package that persists CNPJ records (evidenced by create_cnpj_table) touches business-critical identity data, so keeping schema under the app's control is the right call.composer require → php artisan vendor:publish --tag="cnpj-migrations" → php artisan migrate flow. The unchanged tag means existing docs, CI scripts, and deployment runbooks remain valid. No config or API surface change is implied.create_cnpj_table.php from the vendor path, or a test asserting on migration filenames) will silently break. Risk is otherwise bounded: the CNPJ domain itself (14-digit identifier, mod-11 check digits, alphanumeric CNPJ transition in Brazil) is well-specified, but the package's correctness on validation/formatting and its handling of the new alphanumeric CNPJ format are unverified from this note alone.cnpj), a formatter/caster, an Eloquent model, or all three? The assessment's integration effort depends heavily on this.cnpj table a persistence store for application-owned CNPJ records, or a reference/lookup table shipped with seed data? This determines data-ownership and LGPD exposure.illuminate/support constrained appropriately?vendor:publish for third-party packages. It is not a fit for Lumen-without-facades setups, non-Laravel PHP applications, or teams that manage schema exclusively through an external migration tool (Flyway, Liquibase, Doctrine) — the stub must be published and version-controlled into the app's database/migrations directory.cnpj-migrations tag, review the published stub, then php artisan migrate. Because it is now a stub, the team should treat the published file as application-owned source, review it in PR, and commit it — not regenerate it on every deploy. For existing 1.0.x consumers, there is no action: their previously published migration remains in place and the rename is inert. Teams should not re-publish over an existing migration; vendor:publish will prompt before overwriting.composer.json before approval.vendor:publish on upgrade with --force clobbers the app-owned migration; guard against this in deploy scripts.create_cnpj_table.php in the vendor path breaks after this release.How can I help you explore Laravel packages today?