Skip to content

Commit f11b447

Browse files
committed
Add compatibility test to CircleCI
1 parent 3fddd59 commit f11b447

File tree

3 files changed

+45
-7
lines changed

3 files changed

+45
-7
lines changed

.circleci/config.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ commands:
2020
paths:
2121
- vendor
2222

23-
jobs:
24-
php_7:
25-
docker:
23+
jobs:
24+
phpcs_compat:
25+
steps:
26+
- run: composer phpcs
27+
php_7:
28+
docker:
2629
- image: circleci/php:7.1
2730
steps:
2831
- prepare
@@ -46,8 +49,9 @@ workflows:
4649
snyk:
4750
jobs:
4851
- php_7
52+
- phpcs_compat
4953
- snyk:
5054
# Must define SNYK_TOKEN env
51-
context: snyk-env
52-
requires:
53-
- php_7
55+
context: snyk-env
56+
requires:
57+
- php_7

.phpcs.xml.dist

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="Laravel-Auth0" namespace="Auth0PHP\CS\Standard">
3+
<description>A custom coding standard for the Laravel Auth0 package</description>
4+
5+
<file>./src</file>
6+
7+
<!-- Only check PHP files. -->
8+
<arg name="extensions" value="php"/>
9+
10+
<!-- Show progress, show the error codes for each message (source). -->
11+
<arg value="sp"/>
12+
13+
<!-- Strip the filepaths down to the relevant bit. -->
14+
<arg name="basepath" value="."/>
15+
16+
<!-- Show coloured output, if available. -->
17+
<arg name="colors"/>
18+
19+
<!--
20+
PHPCompatibility sniffs to check for PHP cross-version incompatible code.
21+
https://github.com/PHPCompatibility/PHPCompatibility
22+
-->
23+
<config name="testVersion" value="5.5-"/>
24+
<rule ref="PHPCompatibility"/>
25+
26+
</ruleset>

composer.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,15 @@
99
"illuminate/contracts": "5.* | ^6.0"
1010
},
1111
"require-dev": {
12-
"phpunit/phpunit": "^4 | ^7"
12+
"phpunit/phpunit": "^4 | ^7",
13+
"squizlabs/php_codesniffer": "^3.2",
14+
"phpcompatibility/php-compatibility": "^8.1",
15+
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0"
16+
},
17+
"scripts": {
18+
"test": "SHELL_INTERACTIVE=1 \"vendor/bin/phpunit\" --coverage-text ",
19+
"phpcs": "\"vendor/bin/phpcs\"",
20+
"sniffs": "\"vendor/bin/phpcs\" -e"
1321
},
1422
"autoload": {
1523
"classmap": [

0 commit comments

Comments
 (0)