PHPackages                             doekos/shipkit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. doekos/shipkit

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

doekos/shipkit
==============

A Composer package that gives you tools to ship faster: make:command generator, configurable bootstrapping, and more.

1.1.0(5mo ago)063MITPHPPHP &gt;=8.4

Since Oct 21Pushed 5mo agoCompare

[ Source](https://github.com/Doekos/ShipKit)[ Packagist](https://packagist.org/packages/doekos/shipkit)[ RSS](/packages/doekos-shipkit/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (8)Versions (9)Used By (0)

ShipKit
=======

[](#shipkit)

ShipKit is a small helper package to help you ship Laravel apps faster and more consistently. It provides:

- Curated configuration toggles applied at boot (safe-by-default production settings)
- Artisan generators for Actions, DTOs, Pipes, Pipelines, and Services with opinionated stubs
- Simple commands to publish Pint, PHPStan, and Rector config files
- A command to append useful Composer test scripts to your project
- Publishable stubs and config so you can customize everything to your taste

Requirements
------------

[](#requirements)

- PHP: &gt;= 8.4
- Laravel: 12.x (auto-discovered service provider)
- PHPStan (optional)
- Rector (optional)

Installation
------------

[](#installation)

Install via Composer:

```
composer require doekos/shipkit --dev
```

That’s it. The service provider is auto-discovered.

If you want to customize defaults:

### Publish config/shipkit.php

[](#publish-configshipkitphp)

```
php artisan vendor:publish --tag=shipkit-config
```

### Publish /stubs used by generators

[](#publish-stubs-used-by-generators)

```
php artisan vendor:publish --tag=shipkit-stubs
```

What ShipKit configures for you
-------------------------------

[](#what-shipkit-configures-for-you)

These “configurables” run automatically during application boot. You can enable/disable each one via config/shipkit.php.

- Prohibit destructive database commands (enabled by default)

    - Prevents destructive DB commands depending on environment.
    - Toggle: Shipkit\\Configurables\\ProhibitDestructiveCommands::class =&gt; true
- Strict Eloquent mode in non-production (enabled by default)

    - Calls Model::shouldBeStrict() outside production to catch lazy loading, silently discarded attributes, and access to missing attributes.
    - Toggle: Shipkit\\Configurables\\ShouldBeStrict::class =&gt; true
- Unguard Eloquent models (disabled by default)

    - Calls Model::unguard() to allow mass assignment for all models.
    - Toggle: Shipkit\\Configurables\\Unguard::class =&gt; false
- Make Action generator availability (enabled by default)

    - Controls whether the make:action command is registered.
    - Toggle: Shipkit\\Configurables\\MakeAction::class =&gt; true
- Modular approach for generators (disabled by default)

    - Enables the optional module-aware directory structure and requires the --module option on all generator commands.
    - Toggle: Shipkit\\Configurables\\ModularApproach::class =&gt; false

Update the booleans in config/shipkit.php to suit your needs.

Artisan Generators
------------------

[](#artisan-generators)

ShipKit adds a couple of handy generators that use publishable stubs. All generator commands support an optional --module flag when the Modular Approach is enabled (see the next section).

### make:action

[](#makeaction)

Create an Action class under app/Actions. The name is normalized to end with "Action".

### app/Actions/CreateUserAction.php

[](#appactionscreateuseractionphp)

```
php artisan make:action CreateUser
```

Default stub contents wrap handle() in a DB transaction. You can customize by publishing stubs and editing stubs/action.stub.

### make:dto

[](#makedto)

Create a DTO class under app/DTOs. The name is normalized to end with "DTO".

### app/DTOs/UserDTO.php

[](#appdtosuserdtophp)

```
php artisan make:dto User
```

The default stub provides a readonly class with a promoted constructor. Customize via stubs/dto.stub after publishing stubs.

### make:pipe

[](#makepipe)

Create a Pipe class under app/Pipes. The name is normalized to end with "Pipe".

### app/Pipes/SanitizeInputPipe.php

[](#apppipessanitizeinputpipephp)

```
php artisan make:pipe SanitizeInput
```

The default stub exposes a handle(mixed $payload, Closure $next): mixed method and forwards the payload using return $next($payload). Customize via stubs/pipe.stub.

### make:pipeline

[](#makepipeline)

Create a Pipeline class under app/Pipelines. The name is normalized to end with "Pipeline".

### app/Pipelines/ProcessOrderPipeline.php

[](#apppipelinesprocessorderpipelinephp)

```
php artisan make:pipeline ProcessOrder
```

The default stub includes a private array $pipes = \[\] and injects Illuminate\\Pipeline\\Pipeline using constructor property promotion. The handle(mixed $payload): mixed method sends the payload through the defined pipes and returns the result. Customize via stubs/pipeline.stub.

### make:service

[](#makeservice)

Create a Service class under app/Services. The name is normalized to end with "Service".

### app/Services/BillingService.php

[](#appservicesbillingservicephp)

```
php artisan make:service Billing
```

The default stub includes a handle(): void method. Customize via stubs/service.stub.

Config File Publishers
----------------------

[](#config-file-publishers)

ShipKit can drop in sensible defaults for common tooling. Each command supports:

- --force to skip the interactive confirm prompt
- --backup to create a .backup file if the destination exists

### shipkit:pint

[](#shipkitpint)

Publish pint.json to the project root.

```
php artisan shipkit:pint --force
```

### shipkit:phpstan

[](#shipkitphpstan)

Publish phpstan.neon.dist to the project root.

```
php artisan shipkit:phpstan --force
```

### shipkit:rector

[](#shipkitrector)

Publish rector.php to the project root.

```
php artisan shipkit:rector --force
```

### shipkit:composer

[](#shipkitcomposer)

Append test and fix scripts to your composer.json.

```
php artisan shipkit:composer --force
```

This merges the "scripts" section from ShipKit’s stub into your existing composer.json without removing anything you already have.

Customizing Stubs
-----------------

[](#customizing-stubs)

Publish the stubs once and tailor them to your project:

```
php artisan vendor:publish --tag=shipkit-stubs
```

This creates a stubs/ directory in your project with at least:

- stubs/action.stub (used by make:action)
- stubs/dto.stub (used by make:dto)
- stubs/pipe.stub (used by make:pipe)
- stubs/pipeline.stub (used by make:pipeline)
- stubs/service.stub (used by make:service)

When present, your local stubs are always preferred over the package defaults.

Testing and QA scripts
----------------------

[](#testing-and-qa-scripts)

If you use shipkit:composer, you’ll get a convenient set of scripts in composer.json, for example:

- composer test — runs unit tests, Pint (test mode), PHPStan, and Rector (dry-run)
- composer fix — runs Pint and Rector to auto-fix styling and refactors

Publishing config
-----------------

[](#publishing-config)

To toggle configurables:

```
php artisan vendor:publish --tag=shipkit-config
```

Modular Approach for Generators
-------------------------------

[](#modular-approach-for-generators)

ShipKit supports an optional modular directory structure for all generator commands (Action, DTO, Pipe, Pipeline, Service).

- Enable it by setting the following in config/shipkit.php:
    - Shipkit\\Configurables\\ModularApproach::class =&gt; true
- When enabled:
    - You must pass --module= to all make:action, make:dto, make:pipe, make:pipeline, and make:service commands.
    - Classes are generated under App\\Modules\\\\ and stored at app/Modules///.php.
    - The is normalized to StudlyCase (e.g., user\_management =&gt; UserManagement).
- When disabled (default):
    - The --module option is not allowed and the command will exit with an error if provided.
    - Classes are generated under the conventional namespaces (e.g., App\\Actions, App\\DTOs, etc.).

### Examples

[](#examples)

```
# Modular enabled (set Shipkit\Configurables\ModularApproach::class => true in config/shipkit.php)
php artisan make:action CreateUser --module=UserManagement
# => App\Modules\UserManagement\Actions\CreateUserAction
#    app/Modules/UserManagement/Actions/CreateUserAction.php

php artisan make:dto User --module=Billing
# => App\Modules\Billing\DTOs\UserDTO
#    app/Modules/Billing/DTOs/UserDTO.php
```

Behavioral safeguards:

- If modular is enabled but you omit --module, the command exits with an error: "The --module option is required when modular approach is enabled."
- If modular is disabled and you pass --module, the command exits with an error: "Modular approach is disabled; remove the --module option."

Your published stubs (via shipkit-stubs) are still respected regardless of modular settings.

Contributing
------------

[](#contributing)

PRs and issues are welcome. Please run the provided QA scripts (composer test and composer fix) before submitting.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance72

Regular maintenance activity

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~12 days

Total

5

Last Release

159d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bcb83de4d2cd1a3c64ba7bb28b283a43c0e40aac5d5751fd7ec2bdbde7f2e5d6?d=identicon)[Doekos](/maintainers/Doekos)

---

Top Contributors

[![Doekos](https://avatars.githubusercontent.com/u/10770165?v=4)](https://github.com/Doekos "Doekos (10 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/doekos-shipkit/health.svg)

```
[![Health](https://phpackages.com/badges/doekos-shipkit/health.svg)](https://phpackages.com/packages/doekos-shipkit)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

20917.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9346.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
