- Issue created by @beagaliana
- 🇪🇸Spain beagaliana
Added patch for PHP 7.0 compatibility fix for Views data export - JSON support module.
PHPCompatibility has detected a warning for PHP 8.1 version affecting theme/views-data-export-json-footer.tpl.php
and theme/views-data-export-json-header.tpl.php files:
WARNING No PHP code was found in this file and short open tags are not allowed by this install of PHP. This file may be using short open tags but PHP does not allow them.
FILE: /var/www/html/docroot/sites/all/modules/contrib/views_data_export_json/theme/views-data-export-json-footer.tpl.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LINE 1: WARNING No PHP code was found in this file and short open tags are not allowed by this install of PHP. This file may be using short open tags but PHP does not allow them.
(Internal.NoCodeFound)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>> 1: ]
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/docroot/sites/all/modules/contrib/views_data_export_json/theme/views-data-export-json-header.tpl.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LINE 1: WARNING No PHP code was found in this file and short open tags are not allowed by this install of PHP. This file may be using short open tags but PHP does not allow them.
(Internal.NoCodeFound)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>> 1: [
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Execute
phpcs docroot/sites/all/modules/contrib/views_data_export_json --extensions=php,module,inc --standard=PHPCompatibility --runtime-set testVersion 8.1 --report=code --report-file=reports/codereview/checkstyle-phpcompatibility.txt -sv
Add PHP tag and comment to bypass PHPCS warning.
While being aware that there is no support for D7 modules anymore and that the maintainers decided not to fix a very similar issue ( https://www.drupal.org/project/views_data_export/issues/3005288#comment-... 💬 PHP 7 compatibility Issue Closed: won't fix ), we need to fix the warning so we might as well contribute a patch in case it is useful to anyone.
Active
Code
The issue particularly affects sites running on PHP version 7.0.0 or later.
Added patch for PHP 7.0 compatibility fix for Views data export - JSON support module.