Skip to content

Commit

Permalink
Add phplint package (#15054)
Browse files Browse the repository at this point in the history
  • Loading branch information
ybelenko committed Mar 29, 2023
1 parent a4540fe commit dd16e22
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public void processOpts() {
supportingFiles.add(new SupportingFile("phpunit.xml.mustache", "", "phpunit.xml.dist"));
supportingFiles.add(new SupportingFile(".travis.yml", "", ".travis.yml"));
supportingFiles.add(new SupportingFile(".php-cs-fixer.dist.php", "", ".php-cs-fixer.dist.php"));
supportingFiles.add(new SupportingFile(".phplint.mustache", "", ".phplint.yml"));
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
path:
- ./{{srcBasePath}}
- ./{{testBasePath}}
jobs: 10
extensions:
- php
exclude:
- vendor
warning: true
memory-limit: -1
no-cache: true
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,20 @@
"guzzlehttp/psr7": "^2.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
"friendsofphp/php-cs-fixer": "^3.5"
"friendsofphp/php-cs-fixer": "^3.5",
"overtrue/phplint": "^9.0",
"phpunit/phpunit": "^9.0"
},
"autoload": {
"psr-4": { "{{escapedInvokerPackage}}\\" : "{{srcBasePath}}/" }
},
"autoload-dev": {
"psr-4": { "{{escapedInvokerPackage}}\\Test\\" : "{{testBasePath}}/" }
},
"scripts": {
"test": [
"@phplint"
],
"phplint": "phplint"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ composer.phar

# PHPUnit cache
.phpunit.result.cache

# PHPLint cache
build/phplint.cache
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ composer.phar

# PHPUnit cache
.phpunit.result.cache

# PHPLint cache
build/phplint.cache
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.gitignore
.php-cs-fixer.dist.php
.phplint.yml
.travis.yml
README.md
composer.json
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
path:
- ./lib
- ./test
- ./tests
jobs: 10
extensions:
- php
exclude:
- vendor
warning: true
memory-limit: -1
no-cache: true
11 changes: 11 additions & 0 deletions samples/client/petstore/php-nextgen/OpenAPIClient-php/.phplint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
path:
- ./lib
- ./test
jobs: 10
extensions:
- php
exclude:
- vendor
warning: true
memory-limit: -1
no-cache: true
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,20 @@
"guzzlehttp/psr7": "^2.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
"friendsofphp/php-cs-fixer": "^3.5"
"friendsofphp/php-cs-fixer": "^3.5",
"overtrue/phplint": "^9.0",
"phpunit/phpunit": "^9.0"
},
"autoload": {
"psr-4": { "OpenAPI\\Client\\" : "lib/" }
},
"autoload-dev": {
"psr-4": { "OpenAPI\\Client\\Test\\" : "test/" }
},
"scripts": {
"test": [
"@phplint"
],
"phplint": "phplint"
}
}
13 changes: 13 additions & 0 deletions samples/client/petstore/php-nextgen/OpenAPIClient-php/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,19 @@
</arguments>
</configuration>
</execution>
<execution>
<id>check-php-syntax</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>vendor/bin/phplint</executable>
<arguments>
<argument>--configuration=phplint.dist.yml</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>bundle-test</id>
<phase>integration-test</phase>
Expand Down

0 comments on commit dd16e22

Please sign in to comment.