-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
200 additions
and
76 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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: "Mutation tests" | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "master" | ||
jobs: | ||
mutation-tests: | ||
name: "Mutation tests" | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
matrix: | ||
dependencies: | ||
- "locked" | ||
php-version: | ||
- "7.4" | ||
operating-system: | ||
- "ubuntu-latest" | ||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "pcov" | ||
php-version: "${{ matrix.php-version }}" | ||
ini-values: memory_limit=-1 | ||
- name: "Cache dependencies" | ||
uses: "actions/cache@v2" | ||
with: | ||
path: | | ||
~/.composer/cache | ||
vendor | ||
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" | ||
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" | ||
- name: "Install lowest dependencies" | ||
if: ${{ matrix.dependencies == 'lowest' }} | ||
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest" | ||
- name: "Install highest dependencies" | ||
if: ${{ matrix.dependencies == 'highest' }} | ||
run: "composer update --no-interaction --no-progress --no-suggest" | ||
- name: "Install locked dependencies" | ||
if: ${{ matrix.dependencies == 'locked' }} | ||
run: "composer install --no-interaction --no-progress --no-suggest" | ||
- name: "Infection" | ||
run: "vendor/bin/infection" | ||
env: | ||
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }} | ||
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} |
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 |
---|---|---|
|
@@ -15,7 +15,6 @@ jobs: | |
- "highest" | ||
- "locked" | ||
php-version: | ||
- "7.2" | ||
- "7.3" | ||
- "7.4" | ||
operating-system: | ||
|
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 |
---|---|---|
@@ -1,54 +1,56 @@ | ||
{ | ||
"name": "sspat/reserved-words", | ||
"description": "Validates strings against reserved words of a specific php version", | ||
"type": "library", | ||
"version": "1.0.0", | ||
"keywords": [ | ||
"reserved", | ||
"words", | ||
"php" | ||
], | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Patrik Foldes", | ||
"email": "studio22@mail.ru" | ||
} | ||
], | ||
"require": { | ||
"php": ">=7.2.0", | ||
"thecodingmachine/safe": "^1.3" | ||
}, | ||
"require-dev": { | ||
"doctrine/coding-standard": "^8.2", | ||
"phpstan/phpstan": "^0.12.64", | ||
"phpstan/phpstan-phpunit": "^0.12.17", | ||
"phpstan/phpstan-strict-rules": "^0.12.7", | ||
"phpunit/phpunit": "^8", | ||
"squizlabs/php_codesniffer": "^3.5", | ||
"thecodingmachine/phpstan-safe-rule": "^1.0", | ||
"vimeo/psalm": "^4.3" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"sspat\\ReservedWords\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"sspat\\ReservedWords\\Tests\\": "tests/" | ||
} | ||
}, | ||
"config": { | ||
"sort-packages": true, | ||
"preferred-install": "dist" | ||
}, | ||
"scripts": { | ||
"cs": "phpcs", | ||
"csfix": "phpcbf", | ||
"psalm": "psalm", | ||
"stan": "phpstan analyze", | ||
"test": "phpunit", | ||
"all": "composer psalm && composer stan && composer test && composer cs" | ||
} | ||
} | ||
{ | ||
"name": "sspat/reserved-words", | ||
"description": "Validates strings against reserved words of a specific php version", | ||
"type": "library", | ||
"version": "1.0.0", | ||
"keywords": [ | ||
"reserved", | ||
"words", | ||
"php" | ||
], | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Patrik Foldes", | ||
"email": "studio22@mail.ru" | ||
} | ||
], | ||
"require": { | ||
"php": ">=7.3.0", | ||
"thecodingmachine/safe": "^1.3" | ||
}, | ||
"require-dev": { | ||
"doctrine/coding-standard": "^8.2", | ||
"infection/infection": "^0.18.2", | ||
"phpstan/phpstan": "^0.12.64", | ||
"phpstan/phpstan-phpunit": "^0.12.17", | ||
"phpstan/phpstan-strict-rules": "^0.12.7", | ||
"phpunit/phpunit": "^9.5", | ||
"squizlabs/php_codesniffer": "^3.5", | ||
"thecodingmachine/phpstan-safe-rule": "^1.0", | ||
"vimeo/psalm": "^4.3" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"sspat\\ReservedWords\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"sspat\\ReservedWords\\Tests\\": "tests/" | ||
} | ||
}, | ||
"config": { | ||
"sort-packages": true, | ||
"preferred-install": "dist" | ||
}, | ||
"scripts": { | ||
"cs": "phpcs", | ||
"csfix": "phpcbf", | ||
"psalm": "psalm", | ||
"stan": "phpstan analyze", | ||
"test": "phpunit", | ||
"mutation": "infection", | ||
"all": "composer psalm && composer stan && composer test && composer mutation && composer cs" | ||
} | ||
} |
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,21 @@ | ||
{ | ||
"source": { | ||
"directories": [ | ||
"src" | ||
] | ||
}, | ||
"timeout": 3, | ||
"logs": { | ||
"text": "php://stderr", | ||
"badge": { | ||
"branch": "master" | ||
} | ||
}, | ||
"mutators": { | ||
"@default": true, | ||
"IdenticalEqual": false, | ||
"NotIdenticalNotEqual": false | ||
}, | ||
"minMsi": 100, | ||
"minCoveredMsi": 100 | ||
} |
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
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,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace sspat\ReservedWords\Tests; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use sspat\ReservedWords\ReservedWordsLookupError; | ||
|
||
/** | ||
* @covers \sspat\ReservedWords\ReservedWordsLookupError | ||
*/ | ||
final class ReservedWordsLookupErrorTest extends TestCase | ||
{ | ||
public function testInvalidPhpVersion(): void | ||
{ | ||
$this->expectExceptionMessage('Invalid PHP version: 7, the correct format is: /\d+/'); | ||
|
||
throw ReservedWordsLookupError::invalidPhpVersion('7', '/\d+/'); | ||
} | ||
} |
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