Qodana
 

PHP version migration

Edit pageLast modified: 16 January 2025

To see how migration from one PHP version to another will affect your code quality, employ 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 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