o1y/statamic-flexible-width
A Statamic addon that gives editors flexible width controls for content blocks and grid layouts. Configure breakpoints and width options, then let authors pick spans directly inside Bard, Replicator, or Grid fields—no custom CSS required.
composer.json constraints before touching anything: if you are still on Statamic 5, stay on ^1.0 — there is no dual-support branch in 2.x, so the addon and the CMS must be upgraded as a pair.statamic/cms to ^6.0 first, resolve the app, then require the addon at ^2.0. Doing it in one composer require tends to leave you debugging constraint conflicts rather than the addon itself.composer require vendor/package:^2.0, then php artisan vendor:publish --tag=<addon>-config (or --provider="Vendor\Addon\ServiceProvider" if the addon doesn't tag its publishes) and php artisan migrate if it ships tables.extra.statamic block in the package's composer.json. If the addon's settings screen or fieldtype doesn't appear in the CP, run php artisan vendor:publish --tag=statamic / php artisan statamic:stache:clear and composer dump-autoload -o before assuming the install failed.config/<addon>.php (it documents every knob you'll actually touch), then its src/ServiceProvider.php — the register()/boot() methods tell you exactly what it registers: fieldtypes, tags, modifiers, widgets, nav items, listeners, or routes. That file is your map of the feature surface..env (the addon's config file typically reads them via env()), so per-environment behaviour doesn't require a deploy-time code change. Re-publish after upgrades to diff the config for new keys.Entry::saved / the addon's documented events and clear the relevant keys manually — this is the single most common production surprise.Statamic::fake(), Entry::make()) so your feature tests exercise the addon's real augmentation path instead of mocking it. Add a smoke test that boots the addon and asserts its fieldtype/tag is registered — that catches broken discovery on future major bumps immediately.composer require without a constraint can resolve the addon to 1.x on a Statamic 6 app (or vice versa) in transitive-dependency-heavy installs. Pin ^2.0 explicitly and commit the lock file.php artisan config:clear → php artisan cache:clear → php artisan statamic:stache:clear → php artisan view:clear. A stale Stache index after an upgrade looks exactly like a broken addon and wastes the most debugging time.php artisan config:cache will not pick up keys added in 2.0.0 unless the published config file was refreshed. Diff your published config against the package's before caching.php artisan about (or statamic:addons) rather than dumping the container — it shows which addons Statamic actually loaded and is faster to read than a stack trace.How can I help you explore Laravel packages today?