Keeping a project upgradable

Edit on GitHub

Keeping software up to date is a known concern, especially when it comes to transactional business models with sophisticated requirements.

We established development customization guidelines to make sure that you build and always keep your project upgradable while continuing to benefit from Spryker customization flexibility.

Following these guidelines throughout your development lifecycle is key to an effortless upgrade experience, even when your business requires highly complex customizations.

By keeping your project compliant with our development guidelines, you make sure that you can take minor and patch updates without breaking anything. Additionally, if your project is enrolled into PaaS+, being compatible enables you to take the updates automatically.

The following steps will help you understand what development strategies you can implement how they affect upgradability, and what you need to do to keep your project upgradable.

1. Select a development strategy

A development strategy is the approach you follow when customizing a project. When choosing a strategy, take into account how it will affect the upgradability of your project.

To keep your project upgradable, we recommend using the following development strategies:

  • Configuration
  • Plug and play
  • Project modules

For more information about the strategies and how they affect upgradability, see Development strategies.

2. Follow development guidelines

The best way to resolve compatibility issues is to prevent them. Throughout the development cycle, we recommend following our Project development guidelines.

3. Check if project is upgradable using the Evaluator tool

The Evaluator tool is part of Spryker SDK that performs a number of checks based on the static code analysis of our tools.

Evaluator provides informative output about your code. If all the checks are successful, the tool returns zero messages.

Evaluation example without compliance errors:

Total messages: 0

If one or more checks fail, Evaluator returns errors per check.

...
PrivateApi:MethodIsOverwritten Please avoid usage of core method Spryker\Client\Kernel\AbstractFactory::getConfig() in the class Pyz\Client\ExampleProductSalePage\ExampleProductSalePageFactory
------------------------------ ----------------------------------------------------------------------------------------------------
...
Total messages: 1

Using the evaluator tool

You can use the evaluator tool as follows:

  • Analyze project code compliance:
analyze:php:code-compliance
  • Generate a report about code compliance issues:
analyze:php:code-compliance-report

For detailed instructions, see Running the evaluator tool.

4. Resolve the evaluation issues

If Evaluator detects compliance issues, resolve them by using the instructions in Upgradability guidelines.

5. Update your project

After passing an evaluation successfully, you can safely take minor and patch updates. If the project is enrolled into PaaS+, the updates will be provided automatically.