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

Add actual php versions to gitlab action matrix #27

Merged
merged 7 commits into from
Nov 23, 2024
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
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ jobs:
strategy:
matrix:
php:
- 7.4
- 8.0
- 8.1
- 8.2
- 8.3
prefer:
- lowest
- stable
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Best composer dependencies compatibility: allow more versions

## Removed
- php 7.4 support

## [0.0.13] - 2021-01-27
### Added
- TraceIntoDetailsExplainingErrorFactory for catched ErrorHandler exceptions debug. Note: not for production usage
Expand Down
13 changes: 5 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"require": {
"ext-intl": "*",
"ext-json": "*",
"cebe/php-openapi": "^1.4",
"doctrine/persistence": "^2.0",
"devizzent/cebe-php-openapi": "^1.0",
"doctrine/persistence": "^2.0|^3.0",
"fig/http-message-util": "^1.0",
"free-elephants/i18n": "^0.0.1",
"laminas/laminas-stratigility": "^3.2",
"league/openapi-psr7-validator": "0.14|^0.15|^0.16",
"neomerx/json-api": "^4.0",
"laravel-json-api/neomerx-json-api": "^5.0.2",
"league/openapi-psr7-validator": "0.19 - 0.22",
"nette/php-generator": "^3.4",
"nikic/fast-route": "^1.3",
"psr/cache": "^1|^2|^3",
Expand All @@ -30,16 +30,13 @@
"psr/http-server-handler": "^1.0",
"psr/http-server-middleware": "^1.0",
"rakit/validation": "^1.2",
"ramsey/uuid": "^3.0|^4.0"
"ramsey/uuid": "^3.9.7|^4.0"
},
"require-dev": {
"helmich/phpunit-psr7-assert": "^4",
"nyholm/psr7": "^1.2",
"phpunit/phpunit": "^9.0"
},
"conflict": {
"cebe/php-openapi": "1.5.0 || 1.5.1"
},
"suggest": {
"doctrine/orm": "^2.7",
"free-elephants/di": "*",
Expand Down
9 changes: 2 additions & 7 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,8 @@
<php>
<ini name="error_reporting" value="E_ALL"/>
</php>
<testsuites>
<testsuite name="8.0">
<directory suffix="TestPHP8.php" phpVersion="8.0">./tests</directory>
<testsuite name="">
<directory>tests/</directory>
</testsuite>
<testsuite name="7.4">
<directory suffix="Test.php" phpVersion="7.4">./tests</directory>
</testsuite>
</testsuites>
<logging/>
</phpunit>
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function __construct(array $data)
$reflectionType = $relationshipsProperty->getType();

// handle php 8 union types
if (class_exists(\ReflectionUnionType::class) && $reflectionType instanceof \ReflectionUnionType) {
if ($reflectionType instanceof \ReflectionUnionType) {
$relationshipsClass = (new SuitableRelationshipsTypeDetector())->detect($reflectionType, $relationshipsData);
} else {
$relationshipsClass = $reflectionType->getName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use FreeElephants\JsonApiToolkit\DTO\RelationshipToOne;
use ReflectionProperty;

class SuitableRelationshipsTypeDetectorTestPHP8 extends AbstractTestCase
class SuitableRelationshipsTypeDetectorTest extends AbstractTestCase
{

public function testDetect()
Expand Down
4 changes: 4 additions & 0 deletions tests/FreeElephants/JsonApiToolkit/Psr/ErrorFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ public function testFromThrowable()

$throwable = new Exception('Hello, world!', 100500);
$request = $this->createMock(ServerRequestInterface::class);
// Prevent return null instead string
$request->method('getHeaderLine')->willReturn('');

$errorFactory = new ErrorFactory($translatorRegistry);
$error = $errorFactory->fromThrowable($throwable, 200, $request, ['pointer']);
Expand All @@ -37,6 +39,8 @@ public function testCreateError()
$translatorRegistry->method('getTranslator')->willReturn($translator);

$request = $this->createMock(ServerRequestInterface::class);
// Prevent return null instead string
$request->method('getHeaderLine')->willReturn('');

$errorFactory = new ErrorFactory($translatorRegistry);
$error = $errorFactory->createError('Hello, world!', 200, $request, ['pointer']);
Expand Down
Loading