Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[php-nextgen] Add phplint package #15054

Merged
merged 1 commit into from
Mar 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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