Download the PHP package strictphp/conventions without Composer
On this page you can find all versions of the php package strictphp/conventions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download strictphp/conventions
More information about strictphp/conventions
Files in strictphp/conventions
Package conventions
Short Description Our code conventions forced by PHPStan, Easy Coding Standard, RectorPHP and appropriate custom rules and configs.
License MIT
Informations about the package conventions
StrictPHP Conventions
Welcome to StrictPHP Conventions, a Composer package designed to standardize PHP code across various our projects. This package is an assembly of tools and configurations to enhance code quality, maintainability, and adherence to best practices. It's crafted with care for developers seeking consistency and excellence in their projects, and we encourage its adoption. Pull Requests are welcome!
Features Included
This package bundles a selection of powerful tools and configurations to support your development workflow:
- PHPStan Configuration and Custom Rules: Integrates PHPStan, with pre-defined configurations and rules tailored for our projects.
- Easy Coding Standard Configuration: Utilizes Easy Coding Standard for enforcing consistent coding styles and practices.
- PHPUnit 10/11 Support: Ensures compatibility with PHPUnit to facilitate comprehensive testing.
- RectorPHP Configuration: Provides configurations for RectorPHP for better code quality.
- Extended PHPStan Packages: Includes additional packages to augment PHPStan's capabilities. For more details, see
the included
composer.json
file.
For Laravel use LaraStrict conventions.
Prerequisites
Before installing, please ensure your environment meets the following requirements:
- PHP version 8.1 or higher.
- Composer
- Enabled Extension installer for PHPStan - it is installed by our package to allow extension discovery.
Only latest major version of this package is maintained.
Version | PHPUnit | PHP |
---|---|---|
1.x | 10/11 | 8.1+ |
0.x | 9 | 8.1+ |
Installation
To incorporate StrictPHP Conventions into your project, simply run the following command in your terminal:
This will install the package as a development dependency. You will be asked 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 the extensions provided by the package.
Getting Started
After installation, you can extend the provided configurations to suit your project's specific needs.
Setting Up Easy Coding Standard
To use the Easy Coding Standard, create an ecs.php
file at your project's root with this setup or update your
configuration:
Configuring RectorPHP
For integrating RectorPHP, add a rector.php
file in your project's root with the following configuration or update
your configuration :
Integrating PHPStan
It is required you to use phpstan extension installer to install the required extensions. This is recommended setup:
Acknowledgement
This project owes its existence to the generous support of several other impactful projects:
- Canvastera - Empowering users to craft multimedia posters and share them worldwide. ( EDU/Hobby)
- Azzurro Travel Agency - Specializing in holidays in Italy.
- Redtag Studio - Crafting digital products for your enjoyment.
Explore more of our open-source initiatives:
- Larastrict - Enhancing the Laravel Framework with a suite of convenient tools and packages.
- StrictPHP - Enabling strictness in PHP projects through a curated set of packages and conventions, fostering the development of robust production-grade applications.
- WrkFlow - Streamlining development workflows with a comprehensive set of tools designed to boost efficiency.
License
Open-source software licensed under the MIT License. Feel free to use and modify it according to your needs.
All versions of conventions with dependencies
phpstan/phpstan Version ^1.10.66 || ^2.0
phpstan/phpstan-deprecation-rules Version ^1.1.4 || ^2.0
phpstan/phpstan-phpunit Version ^v1.3.16 || ^2.0
phpstan/phpdoc-parser Version ^1.28.0 || ^2.0
phpunit/phpunit Version ^10.5 || ^11.0 || ^12.0
nikic/php-parser Version ^v5.0.2
rector/rector Version ^1.0.4 || ^2.0
symplify/easy-coding-standard Version ^12.1.14
phpstan/extension-installer Version ^1.3.1