Qodana
 
You are viewing the documentation for an earlier version of Qodana.

PHP version migration

Edit page Last modified: 24 July 2023

If you need to see how migration from one PHP version to another will affect your code quality, you can use the php-migration Qodana scenario. If you run this scenario, you will be able to see the codebase problems that will arise after you upgrade to a newer PHP version.

This feature is supported by the Qodana for PHP linter and available under the Ultimate and Ultimate Plus licenses and their trial versions.

PHP language migration

You can configure this scenario either in the qodana.yaml file or invoke it using the CLI.

note

The CLI options override the settings of the qodana.yaml file.

script:
  name: php-migration
  parameters:
      fromLevel: <old-php-version>
      toLevel: <upgraded-php-version>

This snippet specifies the php-migration scenario using the name parameter. The fromLevel and toLevel parameters denote the old and upgraded PHP versions respectively.

This is the example of the qodana.yaml configuration:

script:
  name: php-migration
  parameters:
      fromLevel: 7.1
      toLevel: 8.0