antiseptikk / dev-kit
Battle-tested dev-kit.
Installs: 1 877
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.1
- slevomat/coding-standard: ^8.0
- symplify/easy-coding-standard: ^11.0
README
PHP dev-kit
Installation
-
Install this package:
$ composer require --dev antiseptikk/dev-kit
-
Create a file named
ecs.php
in the root directory of your project.<?php declare(strict_types=1); use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symplify\EasyCodingStandard\ValueObject\Option; return static function (ContainerConfigurator $containerConfigurator): void { $containerConfigurator->import(__DIR__.'/vendor/antiseptikk/dev-kit/ecs.php'); $parameters = $containerConfigurator->parameters(); $parameters->set(Option::LINE_ENDING, "\n"); };
-
[v2] Creates a file named
psalm.xml
in the root directory of your project.<?xml version="1.0"?> <psalm errorLevel="1" resolveFromConfigFile="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" > <projectFiles> <directory name="src" /> <ignoreFiles> <directory name="vendor" /> </ignoreFiles> </projectFiles> </psalm>
Usage
** [v2] Static Analysis**
-
Psalm
vendor/bin/psalm
-
PHPStan
vendor/bin/phpstan analyse src
By default, PHPStan runs only the most basic checks. Head to Rule Levels to learn how to turn on stricter checks.
Coding Standard
vendor/bin/ecs check src