tm/tooly-composer-script
Tooly Composer Script integrates Tooly with Composer to simplify running common Laravel/PHP development tasks. Define reusable scripts in composer.json for testing, linting, static analysis, and other tooling, then run them consistently in local workflows and CI.
php -d phar.readonly=0 build.php plus archive/cleanup logic in CI, or adopting a heavier toolchain. This is the "buy a small, opinionated wrapper" option: declarative PHAR definition living in composer.json, invoked through standard composer script hooks so it composes with whatever CI you already run. The decision it informs is whether the release pipeline is code you own and maintain or configuration you declare.git clone && composer install?" Quantify with support-ticket volume and onboarding time for new engineers or integrators. If the CLI is a paid/partner-facing deliverable, distribution polish is a differentiator; if it is five internal users, it is not.require for a customer-facing Laravel application, and it has no bearing on feature-level product decisions. Treat it as infrastructure for the delivery of tooling, not as a capability you build features on top of.Reasonable fit when all of the following hold:
composer require --dev tm/tooly-composer-script:<exact>) and accept that you may need to fork or patch it.tooly conventions for declaring PHAR contents in extra.Look elsewhere — or do not adopt — when:
For executives — one paragraph. This is a small, free (MIT), single-purpose build utility that automates packaging a PHP command-line tool into one distributable file. It is not a customer-facing component, carries no licensing cost, and touches only the release process. The strategic question it serves is whether we ship our CLI as a one-file download — which measurably reduces install friction and support load — or require users to manage a PHP toolchain themselves. My recommendation remains a timeboxed spike, not adoption: there was one release in 2019, then nothing until a single checksum bugfix, and the package still has no downstream users. A lone patch is not a maintenance commitment. We should prove it works on our PHP and Composer versions before it enters the pipeline, and we should be prepared to replace it with maintained tooling or a ~2-day in-house script. Worst case the spike costs a few days and produces a decision document; it does not put production at risk.
For engineering — the practical case. A PHAR build is fiddly: phar.readonly, file manifests, excluding dev dependencies and tests, deterministic output, versioning. This package makes that declarative — the archive definition lives in composer.json and runs as a Composer script, so it slots into existing CI with no new orchestration. The trade-off is explicit: we inherit an unmaintained dependency that just shipped its first change in years, and that change is a checksum fix — meaning artifact integrity metadata produced by older versions was unreliable. So gate it — pin the exact version, keep the packaging step behind a single script target so it is swappable, add a smoke test that executes the built PHAR and asserts exit codes and --version, and explicitly assert the PHAR checksum/signature in that test rather than trusting it. Set a review date. If the spike fails on PHP 8 or Composer 2, the fallback is a small owned build script; size that as the true cost of this decision, because that is what we are really choosing between. Do not put this in require; it is require-dev only, and it should never ship inside the artifact it builds.
How can I help you explore Laravel packages today?