Commit b647c208 authored by rjsmelo's avatar rjsmelo

[REF] Check for compatibility with php 5.6 and above. Enforce long array syntax for tiki-check.php.

parent fcc8d3bb
......@@ -52,10 +52,24 @@
<arg name="colors"/>
<arg name="extensions" value="php"/>
<!-- Check for compatibility for PHP >= 5.6 -->
<config name="installed_paths" value="vendor_bundled/vendor/wimg/php-compatibility" />
<config name="testVersion" value="5.6-"/>
<rule ref="PHPCompatibility"/>
<rule ref="PHPCompatibility.PHP.RemovedExtensions">
<exclude-pattern>*/tiki-check.php</exclude-pattern>
</rule>
<!-- Tiki uses the Zend Coding Standards
reference: https://github.com/zendframework/zend-coding-standard/blob/master/ruleset.xml -->
<rule ref="PSR2"/>
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<rule ref="Generic.Arrays.DisallowLongArraySyntax">
<exclude-pattern>*/tiki-check.php</exclude-pattern>
</rule>
<!-- latest tiki-check.php may be used to test servers with a old version of php -->
<rule ref="Generic.Arrays.DisallowShortArraySyntax">
<include-pattern>*/tiki-check.php</include-pattern>
</rule>
<rule ref="Generic.Formatting.SpaceAfterNot"/>
<rule ref="Squiz.WhiteSpace.OperatorSpacing">
<properties>
......
......@@ -128,7 +128,8 @@
"phpunit/dbunit": "^2",
"phpunit/phpunit": "^5",
"phpunit/phpunit-selenium": "^3",
"squizlabs/php_codesniffer": "^3.1"
"squizlabs/php_codesniffer": "^3.1",
"wimg/php-compatibility": ">=8.1"
},
"extra": {
"patches-file": "../installer/composer-patches/composer-patches.json"
......
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "faeda395a3080e1a7041c97eb3f276bd",
"content-hash": "6ed91848b3057857c633a549cad9eb13",
"packages": [
{
"name": "Sam152/Javascript-Equal-Height-Responsive-Rows",
......@@ -6940,6 +6940,58 @@
"validate"
],
"time": "2016-11-23T20:04:58+00:00"
},
{
"name": "wimg/php-compatibility",
"version": "8.1.0",
"source": {
"type": "git",
"url": "https://github.com/wimg/PHPCompatibility.git",
"reference": "4ac01e4fe8faaa4f8d3b3cd06ea92e5418ce472e"
},
"dist": {
"type": "zip",
"url": "https://composer.tiki.org/dist/wimg/php-compatibility/wimg-php-compatibility-4ac01e4fe8faaa4f8d3b3cd06ea92e5418ce472e-zip-3ccb54.zip",
"reference": "4ac01e4fe8faaa4f8d3b3cd06ea92e5418ce472e",
"shasum": "ccce91b7992ffe4b412e98d196d787e55d788149"
},
"require": {
"php": ">=5.3",
"squizlabs/php_codesniffer": "^2.2 || ^3.0.2"
},
"conflict": {
"squizlabs/php_codesniffer": "2.6.2"
},
"require-dev": {
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0"
},
"suggest": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.3"
},
"type": "phpcodesniffer-standard",
"autoload": {
"psr-4": {
"PHPCompatibility\\": "PHPCompatibility/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-3.0"
],
"authors": [
{
"name": "Wim Godden",
"role": "lead"
}
],
"description": "A set of sniffs for PHP_CodeSniffer that checks for PHP version compatibility.",
"homepage": "http://techblog.wimgodden.be/tag/codesniffer/",
"keywords": [
"compatibility",
"phpcs",
"standards"
],
"time": "2017-12-27T21:58:38+00:00"
}
],
"aliases": [],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment