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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

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

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 artisan is 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:listen script injected by the plugin is the ad-hoc tool (pass queues via --). A named override like queue:all above 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:

  1. vendor/bin/artisan — symlink placed by laravel/framework
  2. php 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

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.


All versions of composer-scripts with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
composer/composer Version ^2.0
composer-plugin-api Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package masgeek/composer-scripts contains the following files

Loading the files please wait ...