View Revisions: Issue #17105

Summary 17105: New service class to deal with PHP 7/8 issues
Revision 2021-02-17 12:52 by ollehar
Description Some changes are happening between PHP 7 and 8. A class can be added to deal with this.

PHPInterop7, PHPInterop8 for PHP 7 and 8

Then in Yii config, inject component based on PHP version you're running

```
'components' => [
  'phpInterop' => [
    'class' => PHP_VERSION_ID < 80000 ? 'PHPInterop7' : 'PHPInterop8'
  ]
]
```

Example of Scrutinizer not being smart enough: https://scrutinizer-ci.com/g/LimeSurvey/LimeSurvey/inspections/2c4abff7-81ea-4826-bc11-37f386b1371a/code-structure/operation/QuestionTheme%3A%3AconvertLS3toLS4
Revision 2021-02-17 12:52 by ollehar
Description Some changes are happening between PHP 7 and 8. A class can be added to deal with this.

PHPInterop7, PHPInterop8 for PHP 7 and 8

Then in Yii config, inject component based on PHP version you're running

```
'components' => [
  'phpInterop' => [
    'class' => PHP_VERSION_ID < 80000 ? 'PHPInterop7' : 'PHPInterop8'
  ]
]
```
Revision 2021-02-17 12:52 by ollehar
Description Some changes are happening between PHP 7 and 8. A class can be added to deal with this.

PHPInterop7, PHPInterop8 for PHP 7 and 8

Then in Yii config, inject component based on PHP version you're running

'components' => [
  'phpInterop' => [
    'class' => PHP_VERSION_ID < 80000 ? 'PHPInterop7' : 'PHPInterop8'
  ]
]