-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from AngryBytes/feat/upgrade
Upgrade deps, PHP 7.4-8.1, additional checks
- Loading branch information
Showing
15 changed files
with
217 additions
and
421 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,51 @@ | ||
name: Check | ||
|
||
on: | ||
push: | ||
branches: ['2.0'] | ||
pull_request: | ||
branches: ['2.0'] | ||
|
||
jobs: | ||
|
||
# Run PHP checks for all supported versions. | ||
check-php: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: ['7.4', '8.0', '8.1'] | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
tools: cs2pr | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache composer dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Install composer dependencies | ||
run: composer install --prefer-dist | ||
|
||
- name: PHPStan | ||
run: vendor/bin/phpstan analyse -c phpstan.neon -l max --error-format=checkstyle src/ tests/ | cs2pr | ||
|
||
- name: PHP CodeSniffer | ||
run: vendor/bin/phpcs --standard=PSR2 --extensions=php --report=checkstyle src/ tests/ | cs2pr | ||
|
||
- name: PHPUnit | ||
run: vendor/bin/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
/vendor/ | ||
composer.lock | ||
/composer.lock | ||
/vendor | ||
|
||
/.php-cs-fixer.cache | ||
/.phpunit.result.cache |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changelog | ||
|
||
## 2.0.0 | ||
|
||
### PHP support | ||
|
||
- Dropped support for PHP `7.3` and lower. | ||
- Added support for PHP `8.1`. |
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,27 +1,32 @@ | ||
{ | ||
"name": "angrybytes/domainobject", | ||
"description": "A simple DomainObject implementation that provides simulated properties for PHP < 5.5", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Angry Bytes BV", | ||
"email": "[email protected]", | ||
"role": "owner", | ||
"homepage": "http://angrybytes.com/" | ||
}, | ||
{ | ||
"name": "Maurice Fonk", | ||
"email": "[email protected]", | ||
"role": "developer" | ||
} | ||
], | ||
"autoload": { | ||
"psr-0": { | ||
"AngryBytes\\DomainObject": "src/" | ||
} | ||
"name": "angrybytes/domainobject", | ||
"description": "A simple DomainObject implementation that provides simulated properties", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Angry Bytes BV", | ||
"email": "[email protected]", | ||
"role": "owner", | ||
"homepage": "http://angrybytes.com/" | ||
}, | ||
"require": {}, | ||
"require-dev": { | ||
"phpunit/phpunit": "3.7.*" | ||
{ | ||
"name": "Maurice Fonk", | ||
"email": "[email protected]", | ||
"role": "developer" | ||
} | ||
], | ||
"autoload": { | ||
"psr-0": { | ||
"AngryBytes\\DomainObject": "src/", | ||
"AngryBytes\\DomainObject\\Test": "tests/" | ||
} | ||
}, | ||
"require": { | ||
"php": "7.4.* || 8.0.* || 8.1.*" | ||
}, | ||
"require-dev": { | ||
"phpstan/phpstan": "1.2.0", | ||
"phpunit/phpunit": "9.5.10", | ||
"squizlabs/php_codesniffer": "3.6.2" | ||
} | ||
} |
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,36 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Access to private property AngryBytes\\\\DomainObject\\\\Test\\\\Bar\\:\\:\\$bar\\.$#" | ||
count: 1 | ||
path: tests/AngryBytes/DomainObject/Test/ComposedTest.php | ||
|
||
- | ||
message: "#^Access to private property AngryBytes\\\\DomainObject\\\\Test\\\\Bar\\:\\:\\$foo\\.$#" | ||
count: 1 | ||
path: tests/AngryBytes/DomainObject/Test/ComposedTest.php | ||
|
||
- | ||
message: "#^Access to private property AngryBytes\\\\DomainObject\\\\Test\\\\Foo\\:\\:\\$bar\\.$#" | ||
count: 1 | ||
path: tests/AngryBytes/DomainObject/Test/ComposedTest.php | ||
|
||
- | ||
message: "#^Cannot access offset 'bar' on mixed\\.$#" | ||
count: 1 | ||
path: tests/AngryBytes/DomainObject/Test/ComposedTest.php | ||
|
||
- | ||
message: "#^Parameter \\#2 \\$array of method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) expects array\\|ArrayAccess, mixed given\\.$#" | ||
count: 2 | ||
path: tests/AngryBytes/DomainObject/Test/ComposedTest.php | ||
|
||
- | ||
message: "#^Access to private property AngryBytes\\\\DomainObject\\\\Test\\\\Foo\\:\\:\\$bar\\.$#" | ||
count: 1 | ||
path: tests/AngryBytes/DomainObject/Test/PropertiesTest.php | ||
|
||
- | ||
message: "#^Access to private property AngryBytes\\\\DomainObject\\\\Test\\\\Foo\\:\\:\\$foo\\.$#" | ||
count: 1 | ||
path: tests/AngryBytes/DomainObject/Test/PropertiesTest.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 |
---|---|---|
@@ -1,10 +1,19 @@ | ||
<?xml version="1.0"?> | ||
<phpunit | ||
bootstrap="./tests/bootstrap.php" | ||
colors="true" | ||
> | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" | ||
bootstrap="./vendor/autoload.php" | ||
colors="true" | ||
> | ||
|
||
<testsuite name="DomainObject"> | ||
<directory>./tests/AngryBytes/DomainObject/Test</directory> | ||
</testsuite> | ||
<coverage> | ||
<include> | ||
<directory suffix=".php">src/</directory> | ||
</include> | ||
</coverage> | ||
|
||
<testsuite name="DomainObject"> | ||
<directory>./tests/AngryBytes/DomainObject/Test</directory> | ||
</testsuite> | ||
|
||
</phpunit> |
Oops, something went wrong.