PHPackages                             sebsept/ps\_dev\_base - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. sebsept/ps\_dev\_base

AbandonedArchivedComposer-plugin[Testing &amp; Quality](/categories/testing)

sebsept/ps\_dev\_base
=====================

Tools for quality Prestashop Module development.

3.2.0(3y ago)9354[10 issues](https://github.com/SebSept/ps_dev_base/issues)[2 PRs](https://github.com/SebSept/ps_dev_base/pulls)AFL-3.0PHPPHP &gt;=7.2.5

Since Apr 29Pushed 3y ago1 watchersCompare

[ Source](https://github.com/SebSept/ps_dev_base)[ Packagist](https://packagist.org/packages/sebsept/ps_dev_base)[ Fund](https://ko-fi.com/sebsept)[ RSS](/packages/sebsept-ps-dev-base/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (7)Dependencies (3)Versions (11)Used By (0)

Prestashop Dev Base
===================

[](#prestashop-dev-base)

This package provides **tools for [Prestashop](https://github.com/prestashop/prestashop) module development**.
It's made to **remove the burden of intallation and configuration of essential development tools**.

[![code quality](https://github.com/SebSept/ps_dev_base/actions/workflows/phpstan_and_style.yml/badge.svg)](https://github.com/SebSept/ps_dev_base/actions/workflows/phpstan_and_style.yml/badge.svg)

Quik start :

```
composer require --dev sebsept/ps_dev_base
composer list psdt
```

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

[](#requirements)

- Have composer 2 installed (not composer 1.x). If you do not have composer, it's time to [start learning it](https://getcomposer.org/).
- Your module must require php &gt;= 7.2.5

For easier use, I highly suggest to use command line autocompletion for composer.
There's a couple options available, [this one](https://github.com/bamarni/symfony-console-autocomplete) is [recommanded by composer](https://getcomposer.org/doc/03-cli.md#command-line-completion).

Featured tools
--------------

[](#featured-tools)

- Code formating : [php-cs-fixer](https://github.com/FriendsOfPhp/PHP-CS-Fixer) configured using prestashop standard, ready to use out of the box.
- Code analysis : [phpstan](https://phpstan.org/) autodetect PrestaShop root directory or asks (nothing more to do).
- `fill-indexes` command, to add required index.php files. (see below for details)
- git pre-commit hook installer (details below)

More tools will come ...

How does it work ?
------------------

[](#how-does-it-work-)

This package is composer plugin, it adds new commmands to composer command line tool.
These commands are under the namespace `psdt` (PrestaShop Developement Tools).

The first time a command is run, a composer script is also added. For example, the php-cs-fixer can be invoked with `composer psdt:php-cs-fixer`.
You can even take an additionnal step by [defining an alias](https://duckduckgo.com/?q=linux+alias&t=github&ia=web).

Provided commands
-----------------

[](#provided-commands)

- [psdt:php-cs-fixer](#fill-indexes)
- [psdt:phpstan](#phpstan)
- [psdt:fill-indexes](#fill-indexes)
- [psdt:pre-commit](#git-pre-commit-hook-installer) (not supported on Windows yet)

### php-cs-fixer

[](#php-cs-fixer)

`composer psdt:php-cs-fixer [--reconfigure]`

Formats php files for complying with the Prestashop standards. This allows consistent code base.

Provided by [PrestaShop/php-dev-tools/](https://github.com/PrestaShop/php-dev-tools/).
Autoinstallation provided by this package.

Allows complying with the [Prestashop standards](https://devdocs.prestashop.com/1.7/development/coding-standards/).

On the first run (or when `--reconfigure` option is used):

- the *PrestaShop/php-dev-tools* package will be installed if needed.
- *.php\_cs* file will be (re)created with the Prestashop standard styles. (Destructive operation, get your files under version control!)
- the composer script *php-cs-fixer* will be added. So you can invoke this command with `composer php-cs-fixer`

The next runs will run the fixer. All files will be formated according to the Prestashop standard.

### phpstan

[](#phpstan)

`composer psdt:phpstan [--reconfigure]`

Run phpstan configured with [Prestashop standards](https://devdocs.prestashop.com/1.7/development/coding-standards/) against a PrestaShop installation.

Provided by [PrestaShop/php-dev-tools/](https://github.com/PrestaShop/php-dev-tools/).
Autoinstallation provided by this package.

The first run or `composer psdt:phpstan --reconfigure` do :

- package `prestashop/prestashop-dev-tools` will be installed (if needed)
- creates/overrides the phpstan.neon configuration with Prestashop standards.
- guess the \_PS\_ROOT\_DIR\_ and asks for confirmation (or you can provide another path) (this path is needed for analyse)
- install a composer script `phpstan`

The next runs will trigger `composer psdt:phpstan`

### fill-indexes

[](#fill-indexes)

`composer psdt:fill-indexes [--check-only]`

Add the missing index.php files on each folder. Existing index.php files are not overriden.

`--check-only` option only list the missing index.php files without adding them.
This option is usefull for running in the git's pre-commit hook.

This is a security requirement of Prestashop to avoid the contents to be listed.

More information [on the official documentation](https://devdocs.prestashop.com/1.7/modules/sell/techvalidation-checklist/#a-file-indexphp-exists-in-each-folder).

I can't include [prestashop/autoindex](https://github.com/PrestaShopCorp/autoindex) because [it targets php 5.6](https://github.com/PrestaShopCorp/autoindex/blob/92e10242f94a99163dece280f6bd7b7c2b79c158/composer.json#L23) and has other issues.
My replacement is simpler and doesn't require additionnal dependencies.

### Git Pre-commit hook installer

[](#git-pre-commit-hook-installer)

`composer psdt:pre-commit [--reconfigure]`

- `precommit.sh` file is added
- symlink it to `.git/hooks/pre-commit` is created
- symlink is made executable
- composer script `pre-commit` is added

Before a commit is performed the composer script `pre-commit` will be triggered and must succeed (return 0), otherwise the commit is aborted.

The commands in composer `pre-commit` script hook are provided by command implementing the `PreCommitRegistrableCommand` interface.
This is currently `phpstan`, `php-cs-fixer` and `fill-indexes`

You can tweak the script by just editing the composer script.
You can run the `composer psdt:pre-commit` (or `composer run-script pre-commit`) to predict if commit will fail or not.

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

[](#installation)

`composer require --dev sebsept/ps_dev_base`

Under the hood / Credits
------------------------

[](#under-the-hood--credits)

[php-cs-fixer](https://github.com/FriendsOfPhp/PHP-CS-Fixer) and [phpstan](https://phpstan.org/) configuration and bootstraping are provided by [PrestaShop/php-dev-tools/](https://github.com/PrestaShop/php-dev-tools/).
Repository actions are made by [github workflows](https://docs.github.com/en/free-pro-team@latest/actions).

What's next ?
-------------

[](#whats-next-)

See is issues in this GitHub repository.

Development notes (for this package)
------------------------------------

[](#development-notes-for-this-package)

Install the precommit hook with `ln -s $(pwd)/precommit.sh .git/hooks/pre-commit` (works on linux). Ensure to also make the file executable `chmod +x precommit.sh`.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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 ~79 days

Recently: every ~132 days

Total

8

Last Release

1338d ago

Major Versions

2.3.0 → 3.0.02021-05-25

v2.x-dev → 3.1.02022-04-11

### Community

Maintainers

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

---

Top Contributors

[![SebSept](https://avatars.githubusercontent.com/u/2592502?v=4)](https://github.com/SebSept "SebSept (130 commits)")

---

Tags

autoindexcomposerphp-cs-fixerphpstanprestashopprestashop-devprestashop-standards

### Embed Badge

![Health badge](/badges/sebsept-ps-dev-base/health.svg)

```
[![Health](https://phpackages.com/badges/sebsept-ps-dev-base/health.svg)](https://phpackages.com/packages/sebsept-ps-dev-base)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.5k55.4M8.5k](/packages/larastan-larastan)[phpstan/phpstan-symfony

Symfony Framework extensions and rules for PHPStan

79475.7M2.2k](/packages/phpstan-phpstan-symfony)[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k16.7M1.0k](/packages/phpro-grumphp)[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

67272.8M1.4k](/packages/phpstan-phpstan-doctrine)[shipmonk/dead-code-detector

Dead code detector to find unused PHP code via PHPStan extension. Can automatically remove dead PHP code. Supports libraries like Symfony, Doctrine, PHPUnit etc. Detects dead cycles. Can detect dead code that is tested.

4853.5M92](/packages/shipmonk-dead-code-detector)[tomasvotruba/cognitive-complexity

PHPStan rules to measure cognitive complexity of your classes and methods

1635.6M291](/packages/tomasvotruba-cognitive-complexity)

PHPackages © 2026

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