Upgradability guidelines

Edit on GitHub

Spryker has more than a thousand modules with some of them being used in each Spryker project. At the same time, about 50 module updates are available every month. In this case, manually keeping project up to date and receiving all the necessary module updates can take a lot of time.

To improve developer experience and decrease the amount of time required to keep your project up to date, you can use Upgrader and Integrator tools. These tools can semi-automatically update your project’s modules.

To be able to take semi-automatic updates provided by the Upgrader, a project must follow Spryker’s upgradability rules. To check if your project is compliant, run the Evaluator. If the Evaluator returns upgradability errors, use the following reference to resolve them.

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.

Example:

-------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PrivateApi:Extension Please avoid extension of the PrivateApi Spryker\Zed\CustomerAccessGui\Communication\Form\CustomerAccessForm in Pyz\Zed\CustomerAccessGui\Communication\Form\CustomerAccessForm
-------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

In the example, the name is PrivateApi:Extension. To find the documentation for this error, check the name in the table below.

Group name Group description Check name Error message template Documentation
NotUnique Covers the cases related to project-level entity names that can conflict with the entity names on the core level. NotUnique:Constant {class_name}::{constant_name} name has to have project namespace, like PYZ_{constant_name}. Constant name is not unique
NotUnique NotUnique:DatabaseColumn Database column {table_column_name} has to have project prefix Pyz in {absolute_schema_path}, like pyz_{table_column_name} Name of database table column is not unique
NotUnique NotUnique:DatabaseTable Database table {table_name} has to have project prefix Pyz in {absolute_schema_path}, like pyz_{table_name} Database table name is not unique
NotUnique NotUnique:Method Method name {class}::{method_name} should contains project prefix, like {method_name_with_prefix} Method name is not unique
NotUnique NotUnique:ModuleName Module {module_name} has to have project prefix, like Pyz{module_name}. Module name is not unique
NotUnique NotUnique:TransferName Transfer object name {transfer_name} has to have project prefix Pyz in {absolute_transfer_path}, like Pyz{transfer_name} Transfer name is not unique
NotUnique NotUnique:TransferProperty Transfer property {transfer_property_name} for {transfer} has to have project prefix Pyz in {absolute_transfer_path}, like pyz{transfer_property_name} Transfer property name is not unique
PrivateApi Covers the cases related to project-level code using core dependencies that can be potentially removed in minor or major versions. PrivateApi:CorePersistenceUsage Please avoid usage of PrivateApi method {class_namespace}::{method_name}() Private API is extended
PrivateApi PrivateApi:Dependency Please avoid usage of {dependency_provider_class_name}::{dependency_name_constant} in {class_name} Private API is extended
PrivateApi PrivateApi:DependencyInBusinessModel Please avoid usage of {class_namespace} in {class_namespace} Private API is extended
PrivateApi PrivateApi:Extension Please avoid extension of the PrivateApi {class_name} in {class_name} Private API is extended
PrivateApi PrivateApi:Facade Please avoid usage of {method_name}(…) in {class_name} Private API is extended
PrivateApi PrivateApi:MethodIsOverridden Please avoid usage of core method {class_namespace}::{method_name} in the class {class_namespace} Private API method is overridden on the project level
PrivateApi PrivateApi:ObjectInitialization Please avoid usage of {class_namespace} in {class_namespace} Private API is extended
PrivateApi PrivateApi:Persistence Please avoid usage of $this->{method_name}(…) in {class_name} Private API is used on the project level
PrivateApi PrivateApi:PersistenceInBusinessModel Please avoid usage of PrivateApi {object_name}->{method_name}(…) in {class_name} Private API is extended