-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Drop old PHP versions * Add changelog * Apply CS fixes * Minors
- Loading branch information
Showing
18 changed files
with
158 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
.editorconfig export-ignore | ||
.gitattributes export-ignore | ||
/.github/ export-ignore | ||
.gitignore export-ignore | ||
/.php_cs export-ignore | ||
/.scrutinizer.yml export-ignore | ||
/.styleci.yml export-ignore | ||
/.travis.yml export-ignore | ||
/behat.yml.dist export-ignore | ||
/features/ export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/Tests/ export-ignore | ||
.editorconfig export-ignore | ||
.gitattributes export-ignore | ||
/.github/ export-ignore | ||
.gitignore export-ignore | ||
/.php_cs export-ignore | ||
/phpstan.neon.dist export-ignore | ||
/phpstan-baseline.neon export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/tests/ export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Static code analysis | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
phpstan: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Run PHPStan | ||
uses: docker://jakzal/phpqa:php7.3-alpine | ||
with: | ||
args: phpstan analyze | ||
|
||
php-cs-fixer: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Run PHP-CS-Fixer | ||
uses: docker://jakzal/phpqa:php7.3-alpine | ||
with: | ||
args: php-cs-fixer fix --dry-run --diff-format udiff -vvv | ||
|
||
roave-bc-check: | ||
name: Roave BC Check | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Roave BC Check | ||
uses: docker://nyholm/roave-bc-check-ga |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: Test | ||
runs-on: Ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [ '7.2', '7.3', '7.4', '8.0' ] | ||
strategy: [ 'highest' ] | ||
include: | ||
- php: 7.4 | ||
strategy: 'lowest' | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: none | ||
|
||
- name: Download dependencies | ||
uses: ramsey/composer-install@v1 | ||
with: | ||
dependency-versions: ${{ matrix.strategy }} | ||
composer-options: --no-interaction --prefer-dist --optimize-autoloader | ||
|
||
- name: Run tests | ||
run: ./vendor/bin/phpunit | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
/behat.yml | ||
/build/ | ||
/.php_cs.cache | ||
/composer.lock | ||
/phpspec.yml | ||
/phpunit.xml | ||
/vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
<?php | ||
|
||
/* | ||
* In order to make it work, fabpot/php-cs-fixer and sllh/php-cs-fixer-styleci-bridge must be installed globally | ||
* with composer. | ||
* | ||
* @link https://github.com/Soullivaneuh/php-cs-fixer-styleci-bridge | ||
* @link https://github.com/FriendsOfPHP/PHP-CS-Fixer | ||
*/ | ||
$config = PhpCsFixer\Config::create() | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@Symfony' => true, | ||
'@Symfony:risky' => true, | ||
]) | ||
->setFinder( | ||
PhpCsFixer\Finder::create() | ||
->in(__DIR__) | ||
->exclude(__DIR__.'/vendor') | ||
->name('*.php') | ||
) | ||
; | ||
|
||
use SLLH\StyleCIBridge\ConfigBridge; | ||
|
||
return ConfigBridge::create(); | ||
return $config; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Method Translation\\\\Translator\\\\Service\\\\BingTranslator\\:\\:getUrl\\(\\) invoked with 4 parameters, 2 required\\.$#" | ||
count: 1 | ||
path: src/Service/BingTranslator.php | ||
|
||
- | ||
message: "#^Method Translation\\\\Translator\\\\Service\\\\BingTranslator\\:\\:translate\\(\\) should return string but return statement is missing\\.$#" | ||
count: 1 | ||
path: src/Service/BingTranslator.php | ||
|
||
- | ||
message: "#^Method Translation\\\\Translator\\\\Service\\\\GoogleTranslator\\:\\:translate\\(\\) should return string but return statement is missing\\.$#" | ||
count: 1 | ||
path: src/Service/GoogleTranslator.php | ||
|
||
- | ||
message: "#^Method Translation\\\\Translator\\\\Service\\\\YandexTranslator\\:\\:translate\\(\\) should return string but return statement is missing\\.$#" | ||
count: 1 | ||
path: src/Service/YandexTranslator.php | ||
|
||
- | ||
message: "#^Method Translation\\\\Translator\\\\Translator\\:\\:translate\\(\\) should return string\\|null but empty return statement found\\.$#" | ||
count: 1 | ||
path: src/Translator.php | ||
|
||
- | ||
message: "#^PHPDoc tag @throws with type Translation\\\\Translator\\\\Exception is not subtype of Throwable$#" | ||
count: 1 | ||
path: src/TranslatorService.php | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
includes: | ||
- phpstan-baseline.neon | ||
|
||
parameters: | ||
level: 3 | ||
paths: | ||
- src | ||
excludes_analyse: | ||
- vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.