Skip to content

Commit

Permalink
Merge pull request #7 from alvinjohnsonso/fix/php-56-compatibility-issue
Browse files Browse the repository at this point in the history
fix/php-56-compatibility-issue
* added linter for checking php compatibility;
* removed types when declaring property members;
  • Loading branch information
alvinjohnsonso authored Jan 28, 2022
2 parents ec70275 + 59ad9d7 commit 73c1663
Show file tree
Hide file tree
Showing 7 changed files with 225 additions and 65 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/.github export-ignore
/tests export-ignore
.phpcs.xml export-ignore
.gitattributes export-ignore
.gitignore export-ignore
phpunit.xml export-ignore
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/vendor/
.phpunit.*
.phpcs.cache
18 changes: 18 additions & 0 deletions .phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<ruleset name="CS">
<description>Custom coding standards.</description>
<config name="testVersion" value="5.6-"/>
<exclude-pattern>\.github/*</exclude-pattern>
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>tests/*</exclude-pattern>

<arg value="ps"/>
<arg name="colors"/>
<arg name="parallel" value="100"/>
<arg name="extensions" value="php"/>
<arg name="cache" value=".phpcs.cache"/>

<rule ref="PHPCompatibility">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
</ruleset>
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 2.0.1

Fixed compatibility issue for PHP version >= 5.6.

# 2.0.0

## General changes
Expand Down
16 changes: 13 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,26 @@
"name": "tawk/url-utils",
"type": "library",
"require-dev": {
"phpunit/phpunit": "^9.5"
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.6",
"phpcompatibility/php-compatibility": "^9.3"
},
"version" : "2.0.0",
"version" : "2.0.1",
"autoload": {
"psr-4": {
"Tawk\\": "lib",
"Tawk\\Tests\\": "tests"
}
},
"scripts": {
"test": "phpunit"
"post-install-cmd": [
"([ $COMPOSER_DEV_MODE -eq 0 ] || vendor/bin/phpcs --config-set installed_paths vendor/phpcompatibility/php-compatibility)"
],
"post-update-cmd": [
"([ $COMPOSER_DEV_MODE -eq 0 ] || vendor/bin/phpcs --config-set installed_paths vendor/phpcompatibility/php-compatibility)"
],
"test": "phpunit",
"lint": "phpcs -p -s -v --runtime-set ignore_warnings_on_exit true .",
"lint:fix": "phpcbf -p -s -v .; err=$?; if [ $err -eq 1 ]; then exit 0; else exit $err; fi;"
}
}
Loading

0 comments on commit 73c1663

Please sign in to comment.