Upgradability guidelines

Edit on GitHub

The documents in this section will help you resolve the issues related to code evaluation in a way that keeps your code upgradable and up to date with both Spryker’s and industry coding standards.

When you get an evaluation error, check the name of the triggered check in the Evaluation output logs. The name is at the beginning of each error log.



Message: In DependencyProvider, the "if (!static::IS_DEV) {}" conditional statement is forbidden.
Target:  tests/Acceptance/_data/InvalidProject/src/Pyz/Zed/Console/ConsoleDependencyProvider.php

In the example, the name is DEPENDENCY PROVIDER ADDITIONAL LOGIC CHECKER. The table bellow describes the error and documentation about it.

Check name Error message template Documentation
DEPENDENCY PROVIDER ADDITIONAL LOGIC CHECKER The condition statement if {statement} is forbidden in the DependencyProvider Dependency provider additional logic checker

Avoid using deprecated methods and classes

Avoiding deprecated methods and classes ensures stability, security, and compatibility with newer versions.

Avoid using additional logic in dependency provider

Avoiding additional logic in dependency providers helps to maintain simplicity, reliability, and adherence to best practices, ensuring clean and efficient dependency injection.

PHP version

Use one PHP version across all your environments.

Avoid using outdated modules

Avoid using outdated feature and core modules.

Avoid multiple nesting in the plugin registration methods

Avoid using multiple nesting within plugin registration methods in the dependency providers.