Download the PHP package masgeek/composer-scripts without Composer
On this page you can find all versions of the php package masgeek/composer-scripts. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download masgeek/composer-scripts
More information about masgeek/composer-scripts
Files in masgeek/composer-scripts
Package composer-scripts
Short Description Reusable Composer script callbacks for PHP projects — testing, linting, IDE helpers, and dev server. Framework-agnostic.
License MIT
Homepage https://munywele.co.ke
Informations about the package composer-scripts
masgeek/composer-scripts
Reusable Composer script callbacks for PHP projects — testing, linting, IDE helpers, model generation, dev server, and queue management. Works with Laravel, Symfony, or plain PHP. No framework dependency.
Table of Contents
- Installation
- How it works
- All available scripts
- Passing arguments
- Overriding a script
- Manual wiring
- Scripts reference
- Testing
- Code Quality
- IDE Helper
- Dev Server & Queue
- Dependency Analysis
- Non-Laravel projects
- Extending the package
- Requirements
Installation
Allow the plugin once in your composer.json:
Run composer install — every script listed below is immediately available with no further configuration.
How it works
This package is a Composer plugin. Plugin::activate() is called before any script runs and injects all default callbacks into the root package at runtime. Nothing is written to disk.
Your definitions always win. If a script name already exists in your composer.json, the plugin skips it entirely. You can override any default or add project-specific steps without touching the package.
All available scripts
Quick-reference of every script injected by the plugin.
| Script | Class::method | Notes |
|---|---|---|
test |
Testing::run |
config:clear + pest --bail |
test:unit |
Testing::unit |
pest tests/Unit |
test:feature |
Testing::feature |
pest tests/Feature |
test:controllers |
Testing::controllers |
pest tests/Feature/Http/Controllers |
test:services |
Testing::services |
pest tests/Unit/Services |
test:retry |
Testing::retry |
pest --retry --bail |
test:dirty |
Testing::dirty |
pest --dirty |
test:ci |
Testing::ci |
pest (no bail, all failures reported) |
test:file |
Testing::file |
bare pest, no flags — IDE runner friendly |
test:parallel |
Testing::parallel |
artisan test --parallel ¹ |
pest:test |
Testing::file |
alias for test:file |
pest:coverage |
Testing::coverage |
pest --coverage |
pest:coverage:xml |
Testing::coverageXml |
Clover XML → storage/coverage/coverage.xml |
pest:coverage-xml |
Testing::coverageXml |
alias (dash form) |
pint:fix |
CodeQuality::pintFix |
pint --dirty |
pint:fix:all |
CodeQuality::pintFixAll |
pint (all files) |
pint:check |
CodeQuality::pintCheck |
pint --test |
pint:repair |
CodeQuality::pintRepair |
pint --repair |
lint:fix |
CodeQuality::pintFix |
alias for pint:fix |
lint:fix-all |
CodeQuality::pintFixAll |
alias for pint:fix:all (dash form) |
lint:analyse |
CodeQuality::analyse |
phpstan analyse --memory-limit=256M |
lint:check |
CodeQuality::check |
alias for lint:analyse |
lint:all |
CodeQuality::all |
pint:check then lint:analyse |
sonar |
CodeQuality::sonar |
sonar-scanner |
meta:helper |
IdeHelper::generate |
artisan ide-helper:generate ¹ |
meta:ide |
IdeHelper::meta |
artisan ide-helper:meta ¹ |
meta:models |
IdeHelper::models |
artisan ide-helper:models --write ¹ |
meta:all |
IdeHelper::all |
all three ide-helper commands ¹ |
model:gen |
IdeHelper::modelGen |
code:models → ide-helper:models → pint --dirty ¹ |
dev |
DevServer::serve |
artisan serve or php -S (DEV_PORT env var) |
dev:all |
DevServer::serveAll |
server + queue + Vite via npx concurrently |
queue:listen |
DevServer::queueListen |
artisan queue:listen --timeout=0 ¹ |
check-deps |
Deps::checkUnused |
composer-unused |
scripts |
(alias) | composer run-script --list |
¹ Gracefully skips with a warning when
artisanis not found — safe on non-Laravel projects.
Discovering available scripts
After installing the package, run either of these to see every script available in your project — both those you defined and those injected by the plugin:
Scripts defined in your own composer.json show a description; plugin-injected ones appear without one:
To add descriptions to plugin scripts (useful for team documentation), define the script
name in your composer.json with a scripts-descriptions entry:
Passing arguments
Every command forwards extra arguments passed after -- to the underlying tool.
Overriding a script
Define the script name in your composer.json and the plugin leaves it alone. Use this to:
Add steps before or after the default:
Change the port for the dev server:
Hardcode a project-specific queue list so you never have to type it:
The
queue:listenscript injected by the plugin is the ad-hoc tool (pass queues via--). A named override likequeue:allabove is the convenience alias for your fixed production stack.
Replace entirely with a plain shell command:
Manual wiring (opt-out of auto-discovery)
If you prefer explicit control, copy the entries you need from scripts.json into your composer.json. The class callbacks work identically whether discovered by the plugin or wired manually.
Scripts reference
Testing (Masgeek\ComposerScripts\Testing)
Requires pestphp/pest.
test clears the Laravel config cache before running (no-op on non-Laravel projects).
test:parallel uses artisan test --parallel and gracefully skips if artisan is absent.
Code Quality (Masgeek\ComposerScripts\CodeQuality)
Requires laravel/pint for formatting and
phpstan/phpstan for static analysis. Each tool is only
required when its specific command runs.
IDE Helper (Masgeek\ComposerScripts\IdeHelper)
Requires barryvdh/laravel-ide-helper.
All commands gracefully skip with a warning when artisan is not found.
model:gen — three-step workflow
Replaces the common inline chain:
Step 1 requires a package that registers code:models
(e.g. masgeek/reliese-laravel-model-gen).
Steps 2 and 3 gracefully skip if the binaries are absent.
Dev Server & Queue (Masgeek\ComposerScripts\DevServer)
All three commands automatically disable the Composer process timeout so long-running processes are never killed after the default 300-second limit.
Port configuration
DEV_PORT controls the port for both dev and dev:all. Set it in .env for a permanent project default:
Project-specific queue shortcut
queue:listen is the generic tool — pass any queues at runtime. For a fixed production
stack, define a named override in your composer.json so you never have to type the list:
Then just run composer queue:all.
Dependency Analysis (Masgeek\ComposerScripts\Deps)
Requires icanhazstring/composer-unused.
Non-Laravel projects
Commands that call artisan go through Support\Artisan, which resolves the binary:
vendor/bin/artisan— symlink placed bylaravel/frameworkphp artisan— script in the project root
If neither exists the command prints a warning and exits cleanly (code 0), so the Composer script chain is never broken:
Commands that gracefully skip: meta:helper, meta:ide, meta:models, meta:all,
model:gen, test:parallel, queue:listen.
Commands that work without artisan: all pint:*, lint:*, test:* (pest), sonar, check-deps.
Forcing a hard failure — call Artisan::require() in your own script class when
you want an error instead of a silent skip:
Extending the package
Compose package callbacks with project-specific steps in any scripts array:
Requirements
- PHP 8.2+
- Composer 2.x
No framework dependency — works with Laravel, Symfony, or plain PHP projects.
Each script only requires its own tool (pest, pint, phpstan, sonar-scanner, etc.)
and only when that specific script is run.