Download the PHP package alexsvorada/phpstan-espocrm without Composer
On this page you can find all versions of the php package alexsvorada/phpstan-espocrm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download alexsvorada/phpstan-espocrm
More information about alexsvorada/phpstan-espocrm
Files in alexsvorada/phpstan-espocrm
Download alexsvorada/phpstan-espocrm
More information about alexsvorada/phpstan-espocrm
Files in alexsvorada/phpstan-espocrm
Vendor alexsvorada
Package phpstan-espocrm
Short Description PHPStan rules for EspoCRM development
License MIT
Homepage https://github.com/alexsvorada/phpstan-espocrm
Package phpstan-espocrm
Short Description PHPStan rules for EspoCRM development
License MIT
Homepage https://github.com/alexsvorada/phpstan-espocrm
Please rate this library. Is it a good library?
Informations about the package phpstan-espocrm
EspoCRM PHPStan Rules
PHPStan extension providing custom rules for EspoCRM development to enforce coding standards and best practices.
Table of Contents
- Requirements
- Installation
- Rules
- Usage
Requirements
Installation
1. Install via Composer
2. Add to your phpstan.neon
Rules
This extension provides the following PHPStan rules for EspoCRM:
Entity Rules
- DefineEntityTypeConstantRule: Ensures entities define the
ENTITY_TYPEconstant - DefineTemplateTypeConstantRule: Ensures entities define template type constants when needed
- NoEntityManagerInEntityRule: Prevents direct EntityManager usage in entity classes
Service Rules
- CallParentConstructorRule: Ensures parent constructor is called in service classes
- ServiceMustExtendRecordRule: Ensures services extend the appropriate Record class
Hook Rules
- NoSameEntitySaveRule: Prevents saving the same entity within hooks to avoid infinite loops
- SaveRestrictedEntityFieldsRule: Prevents saving restricted entity fields in hooks
- RequireOrderPropertyRule: Ensures hooks define the required
$orderproperty
Controller Rules
- OnlyOverrideParentMethodsRule: Ensures controllers only override parent methods, not create arbitrary ones
Usage
After installation, run PHPStan as usual:
The rules will automatically be applied to your EspoCRM codebase, helping maintain code quality and prevent common issues.
Development
This extension follows EspoCRM coding standards and provides rules to enforce best practices in EspoCRM module development.
All versions of phpstan-espocrm with dependencies
PHP Build Version
Package Version
The package alexsvorada/phpstan-espocrm contains the following files
Loading the files please wait ...