-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow php8+ and drop lower than php7.4
- Loading branch information
Showing
28 changed files
with
234 additions
and
186 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,45 @@ | ||
name: build | ||
on: [push] | ||
jobs: | ||
build: | ||
name: PHP on ${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.composer-flags }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php: ['7.4', '8.0', '8.1'] | ||
stability: [prefer-lowest, prefer-stable] | ||
include: | ||
- php: '8.2' | ||
flags: "--ignore-platform-req=php" | ||
stability: prefer-stable | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: xdebug | ||
tools: composer:v2 | ||
|
||
- name: Check PHP Version | ||
run: php -v | ||
|
||
- name: Validate composer files | ||
run: composer validate --strict | ||
|
||
- name: Install dependencies | ||
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress ${{ matrix.flags }} | ||
|
||
- name: Run Unit tests with coverage | ||
run: composer phpunit -- ${{ matrix.phpunit-flags }} | ||
|
||
- name: Run static analysis | ||
run: composer phpstan | ||
if: ${{ matrix.php == '8.1' && matrix.stability == 'prefer-stable'}} | ||
|
||
- name: Run Coding style rules | ||
run: composer phpcs:fix | ||
if: ${{ matrix.php == '8.1' && matrix.stability == 'prefer-stable'}} |
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 @@ | ||
<?php | ||
|
||
/* | ||
* This document has been generated with | ||
* https://mlocati.github.io/php-cs-fixer-configurator/#version:2.16.4|configurator | ||
* you can change this configuration by importing this file. | ||
*/ | ||
$config = new PhpCsFixer\Config(); | ||
return $config | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@PSR12' => true, | ||
'@Symfony' => true, | ||
'@Symfony:risky' => true, | ||
'backtick_to_shell_exec' => true, | ||
'global_namespace_import' => [ | ||
'import_classes' => true, | ||
'import_constants' => true, | ||
'import_functions' => true | ||
], | ||
'linebreak_after_opening_tag' => true, | ||
'list_syntax' => ['syntax' => 'short'], | ||
'mb_str_functions' => true, | ||
'no_php4_constructor' => true, | ||
'phpdoc_line_span' => ['const' => 'single'], | ||
'self_static_accessor' => true, | ||
'static_lambda' => true, | ||
'no_unused_imports' => true, | ||
]) | ||
->setFinder(PhpCsFixer\Finder::create() | ||
->in(__DIR__.'/src') | ||
); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
includes: | ||
- vendor/phpstan/phpstan-phpunit/extension.neon | ||
- vendor/phpstan/phpstan-phpunit/rules.neon | ||
- vendor/phpstan/phpstan-webmozart-assert/extension.neon | ||
|
||
parameters: | ||
level: max | ||
paths: | ||
- src | ||
# checkGenericClassInNonGenericObjectType: false | ||
# checkMissingIterableValueType: false |
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,19 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<phpunit bootstrap="vendor/autoload.php" colors="true"> | ||
<testsuites> | ||
<testsuite name="arack/color test suite"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<filter> | ||
<whitelist> | ||
<directory suffix=".php">src</directory> | ||
</whitelist> | ||
</filter> | ||
|
||
<!--<listeners>--> | ||
<!--<listener class="\Mockery\Adapter\Phpunit\TestListener" />--> | ||
<!--</listeners>--> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> | ||
<coverage> | ||
<include> | ||
<directory suffix=".php">src</directory> | ||
</include> | ||
</coverage> | ||
<testsuites> | ||
<testsuite name="arack/color test suite"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
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
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
Oops, something went wrong.