PHPackages                             larastrict/conventions - 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. larastrict/conventions

ActivePackage

larastrict/conventions
======================

LaraStrict conventions for your Laravel apps - PHPStan, Easy Coding Standard, RectorPHP and appropriate rules.

v1.0.3(1y ago)0412[2 issues](https://github.com/larastrict/conventions/issues)MITPHPPHP &gt;=8.1

Since Apr 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/larastrict/conventions)[ Packagist](https://packagist.org/packages/larastrict/conventions)[ RSS](/packages/larastrict-conventions/feed)WikiDiscussions main Synced 1mo ago

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

LaraStrict conventions for your Laravel apps
============================================

[](#larastrict-conventions-for-your-laravel-apps)

[![.github/banner.webp](.github/banner.webp)](.github/banner.webp)

Enhance the robustness and consistency of your Laravel applications with LaraStrict conventions. This package integrates essential tools like PHPStan, Easy Coding Standard, RectorPHP, and tailored rules to streamline your development process.

This package extends the [StrictPHP conventions](https://github.com/strictphp/conventions).

Key Features
------------

[](#key-features)

This package bundles a selection of powerful tools and configurations to support your development workflow:

- **PHPStan Configuration and Custom Rules**: Integrates [PHPStan](https://phpstan.org), with pre-defined configurations and rules tailored for our projects.
- **Easy Coding Standard Configuration**: Utilizes [Easy Coding Standard](https://github.com/symplify/coding-standard)for enforcing consistent coding styles and practices.
- **PHPUnit 10/11 Support**: Ensures compatibility with [PHPUnit](https://phpunit.de) to facilitate comprehensive testing.
- **RectorPHP Configuration**: Provides configurations for [RectorPHP](https://getrector.org) for better code quality.
- **Extended PHPStan Packages**: Includes additional packages to augment PHPStan's capabilities. For more details, see the included `composer.json` file.

Prerequisites
-------------

[](#prerequisites)

Before installation, ensure your environment meets these requirements:

- PHP version 8.1 or higher (based on your Laravel version).
- Composer
- Laravel 10+
- Enabled [Extension installer for PHPStan](https://github.com/phpstan/extension-installer), which is automatically installed by our package to allow extension discovery.

**Only latest major version of this package is maintained.**

VersionPHPUnitPHPLaravel1.x10/118.2+10+0.x98.1+9Installation
------------

[](#installation)

To integrate LaraStrict Conventions into your project, run the following command in your terminal:

```
composer require larastrict/conventions --dev
```

This installs the package as a development dependency. During installation, you'll be prompted to confirm the installation of the plugin:

> Do you trust "phpstan/extension-installer" to execute code and wish to enable it now? (yes/no) \[y\]:

Type `y` to use all provided extensions.

Getting Started
---------------

[](#getting-started)

After installation, you can tailor the provided configurations to meet your project's requirements.

### Setting Up Easy Coding Standard

[](#setting-up-easy-coding-standard)

To use Easy Coding Standard, create or update an `ecs.php` file at your project's root with the following setup:

```
