Skip to content

Commit

Permalink
Merge pull request #258 from ember-nexus/github-issue/257
Browse files Browse the repository at this point in the history
Upgrade dependencies, should fix release process. Closes #257.
  • Loading branch information
Syndesi authored Feb 28, 2024
2 parents 112f4c0 + 8aa955e commit 819e954
Show file tree
Hide file tree
Showing 36 changed files with 434 additions and 445 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Increase feature test timeout from 10 to 15 minutes.
- Upgrade PHP to 8.3.3, closes #253.
- Upgrade upstream dependency NGINX Unit to 1.32.0, closes #254.
- Upgrade dependencies, should fix release process. Closes #257.

## 0.1.1 - 2024-01-27
### Added
Expand Down
766 changes: 377 additions & 389 deletions composer.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class DeactivatableTraceableEventDispatcher extends TraceableEventDispatcher
public function __construct(
EventDispatcherInterface $dispatcher,
Stopwatch $stopwatch,
LoggerInterface $logger = null,
RequestStack $requestStack = null
?LoggerInterface $logger = null,
?RequestStack $requestStack = null
) {
$this->eventDispatcher = $dispatcher;
parent::__construct($dispatcher, $stopwatch, $logger, $requestStack);
Expand Down Expand Up @@ -45,7 +45,7 @@ public function activate(): self
return $this;
}

public function dispatch(object $event, string $eventName = null): object
public function dispatch(object $event, ?string $eventName = null): object
{
if ($this->isDeactivated) {
return $this->eventDispatcher->dispatch($event, $eventName);
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/Client400BadContentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public function __construct(
string $title = 'Bad content',
int $status = 400,
string $detail = '',
string $instance = null,
Throwable $previous = null
?string $instance = null,
?Throwable $previous = null
) {
parent::__construct($type, $title, $status, $detail, $instance, $previous);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/Client400ForbiddenPropertyException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public function __construct(
string $title = 'Forbidden property',
int $status = 400,
string $detail = '',
string $instance = null,
Throwable $previous = null
?string $instance = null,
?Throwable $previous = null
) {
parent::__construct($type, $title, $status, $detail, $instance, $previous);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public function __construct(
string $title = 'Incomplete mutual dependency',
int $status = 400,
string $detail = '',
string $instance = null,
Throwable $previous = null
?string $instance = null,
?Throwable $previous = null
) {
parent::__construct($type, $title, $status, $detail, $instance, $previous);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/Client400MissingPropertyException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public function __construct(
string $title = 'Missing property',
int $status = 400,
string $detail = '',
string $instance = null,
Throwable $previous = null
?string $instance = null,
?Throwable $previous = null
) {
parent::__construct($type, $title, $status, $detail, $instance, $previous);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/Client400ReservedIdentifierException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public function __construct(
string $title = 'Reserved identifier',
int $status = 400,
string $detail = '',
string $instance = null,
Throwable $previous = null
?string $instance = null,
?Throwable $previous = null
) {
parent::__construct($type, $title, $status, $detail, $instance, $previous);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/Client401UnauthorizedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public function __construct(
string $title = 'Unauthorized',
int $status = 401,
string $detail = 'Authorization for the request failed due to possible problems with the token (incorrect or expired), password (incorrect or changed), the user\'s unique identifier, or the user\'s status (e.g., missing, blocked, or deleted).',
string $instance = null,
Throwable $previous = null
?string $instance = null,
?Throwable $previous = null
) {
parent::__construct($type, $title, $status, $detail, $instance, $previous);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/Client403ForbiddenException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public function __construct(
string $title = 'Forbidden',
int $status = 403,
string $detail = 'Requested endpoint, element or action is forbidden.',
string $instance = null,
Throwable $previous = null
?string $instance = null,
?Throwable $previous = null
) {
parent::__construct($type, $title, $status, $detail, $instance, $previous);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/Client404NotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public function __construct(
string $title = 'Not found',
int $status = 404,
string $detail = 'Requested element was not found.',
string $instance = null,
Throwable $previous = null
?string $instance = null,
?Throwable $previous = null
) {
parent::__construct($type, $title, $status, $detail, $instance, $previous);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/Client405MethodNotAllowedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public function __construct(
string $title = 'Method not allowed',
int $status = 405,
string $detail = 'Endpoint does not support requested method, or you do not have sufficient permissions.',
string $instance = null,
Throwable $previous = null
?string $instance = null,
?Throwable $previous = null
) {
parent::__construct($type, $title, $status, $detail, $instance, $previous);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/Client429TooManyRequestsException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public function __construct(
string $title = 'Too many requests',
int $status = 429,
string $detail = 'You have sent too many requests, please slow down.',
string $instance = null,
Throwable $previous = null
?string $instance = null,
?Throwable $previous = null
) {
parent::__construct($type, $title, $status, $detail, $instance, $previous);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/ProblemJsonException.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public function __construct(
string $title,
int $status,
string $detail,
string $instance = null,
Throwable $previous = null
?string $instance = null,
?Throwable $previous = null
) {
parent::__construct('', 0, $previous);
$this->type = $type;
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/Server500InternalServerErrorException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public function __construct(
string $title = 'Internal server error',
int $status = 500,
string $detail = '',
string $instance = null,
Throwable $previous = null
?string $instance = null,
?Throwable $previous = null
) {
parent::__construct($type, $title, $status, $detail, $instance, $previous);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/Server500LogicErrorException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public function __construct(
string $title = 'Internal server error',
int $status = 500,
string $detail = '',
string $instance = null,
Throwable $previous = null
?string $instance = null,
?Throwable $previous = null
) {
parent::__construct($type, $title, $status, $detail, $instance, $previous);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/Server501NotImplementedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public function __construct(
string $title = 'Not implemented',
int $status = 501,
string $detail = 'Endpoint is currently not implemented.',
string $instance = null,
Throwable $previous = null
?string $instance = null,
?Throwable $previous = null
) {
parent::__construct($type, $title, $status, $detail, $instance, $previous);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/Server503ServiceUnavailableException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public function __construct(
string $title = 'Service unavailable',
int $status = 503,
string $detail = '',
string $instance = null,
Throwable $previous = null
?string $instance = null,
?Throwable $previous = null
) {
parent::__construct($type, $title, $status, $detail, $instance, $previous);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public function __construct(
) {
}

public function createFromTemplate(Throwable $previous = null): Client404NotFoundException
public function createFromTemplate(?Throwable $previous = null): Client404NotFoundException
{
return new Client404NotFoundException(
$this->urlGenerator->generate(
Expand Down
4 changes: 2 additions & 2 deletions src/Helper/Neo4jClientHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public function getNodeFromLaudisNode(

public function getRelationFromLaudisRelation(
LaudisRelationship $relation,
LaudisNode $startNode = null,
LaudisNode $endNode = null
?LaudisNode $startNode = null,
?LaudisNode $endNode = null
): Relation {
$newRelation = (new Relation())
->setType($relation->getType())
Expand Down
4 changes: 2 additions & 2 deletions src/Security/AuthProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public function getRedisTokenKeyFromRawToken(string $rawToken): string

public function setUserAndToken(
UuidInterface $userUuid,
UuidInterface $tokenUuid = null,
string $hashedToken = null,
?UuidInterface $tokenUuid = null,
?string $hashedToken = null,
bool $isAnonymous = false
): self {
$this->userUuid = $userUuid;
Expand Down
2 changes: 1 addition & 1 deletion src/Security/TokenGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(
/**
* @param array<string, mixed> $data
*/
public function createNewToken(UuidInterface $userUuid, array $data = [], int $lifetimeInSeconds = null): string
public function createNewToken(UuidInterface $userUuid, array $data = [], ?int $lifetimeInSeconds = null): string
{
for ($i = 0; $i < 3; ++$i) {
$token = $this->createToken();
Expand Down
2 changes: 1 addition & 1 deletion src/Service/CollectionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function getTotalPages(int $totalElements = 0): int
/**
* @param int|null $page if null, then the current page is used
*/
public function getPageLink(int $page = null): string
public function getPageLink(?int $page = null): string
{
$currentRequest = $this->requestStack->getCurrentRequest();
if (null === $currentRequest) {
Expand Down
4 changes: 2 additions & 2 deletions src/Service/CreateElementFromRawDataService.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public function __construct(
public function createElementFromRawData(
UuidInterface $elementId,
string $type,
UuidInterface $startNodeId = null,
UuidInterface $endNodeId = null,
?UuidInterface $startNodeId = null,
?UuidInterface $endNodeId = null,
array $rawData = []
): NodeElementInterface|RelationElementInterface {
if (null !== $startNodeId && null === $endNodeId) {
Expand Down
2 changes: 1 addition & 1 deletion src/Service/ElementManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function flush(): self
return $this;
}

public function getElement(UuidInterface $uuid): null|NodeElementInterface|RelationElementInterface
public function getElement(UuidInterface $uuid): NodeElementInterface|RelationElementInterface|null
{
$node = $this->getNode($uuid);
if ($node) {
Expand Down
6 changes: 3 additions & 3 deletions tests/FeatureTests/BaseRequestTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function runUnlockRequest(string $uri, ?string $token): ResponseInterface
return $this->runRequest('UNLOCK', $uri, $token);
}

public function runRequest(string $method, string $uri, string $token = null, array $data = null): ResponseInterface
public function runRequest(string $method, string $uri, ?string $token = null, ?array $data = null): ResponseInterface
{
$client = new Client([
'base_uri' => $_ENV['API_DOMAIN'],
Expand Down Expand Up @@ -137,7 +137,7 @@ public function assertArrayHasNoNullValues(array $array): void
}
}

public function assertIsCollectionResponse(ResponseInterface $response, int $countNodes = null, int $countRelations = null): void
public function assertIsCollectionResponse(ResponseInterface $response, ?int $countNodes = null, ?int $countRelations = null): void
{
$this->assertSame(200, $response->getStatusCode());

Expand Down Expand Up @@ -166,7 +166,7 @@ public function assertIsCollectionResponse(ResponseInterface $response, int $cou
/**
* @param string[] $elementIds
*/
public function assertIsElementCollectionResponse(ResponseInterface $response, int $countElements = null, array $elementIds = []): void
public function assertIsElementCollectionResponse(ResponseInterface $response, ?int $countElements = null, array $elementIds = []): void
{
$this->assertSame(200, $response->getStatusCode());

Expand Down
2 changes: 1 addition & 1 deletion tests/FeatureTests/General/Etag/CreateNodeEtagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class CreateNodeEtagTest extends BaseRequestTestCase
private const string UUID_DATA_4 = '1ef20009-1db9-4e74-a3d4-2de7ec475dde';
private const string UUID_DATA_5 = '47016bbb-405a-49a1-9531-8d1efa4d5e0a';

private function testEtagOfElement(string $token, string $uuid, string $additionalPath, string $shouldEtag = null): string
private function testEtagOfElement(string $token, string $uuid, string $additionalPath, ?string $shouldEtag = null): string
{
$response = $this->runGetRequest(
sprintf('/%s%s', $uuid, $additionalPath),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class CreateNormalRelationEtagTest extends BaseRequestTestCase
private const string UUID_DATA_1 = '106e6b00-4026-462b-9394-e7da4bc777ed';
private const string UUID_DATA_2 = '89ecbd25-0402-468f-af0c-3f307fff5b9f';

private function testEtagOfElement(string $token, string $uuid, string $additionalPath, string $shouldEtag = null): string
private function testEtagOfElement(string $token, string $uuid, string $additionalPath, ?string $shouldEtag = null): string
{
$response = $this->runGetRequest(
sprintf('/%s%s', $uuid, $additionalPath),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class CreateOwnsRelationEtagTest extends BaseRequestTestCase
private const string UUID_DATA_1 = 'd62f5169-1e12-42eb-ac91-8a6cfa9b3244';
private const string UUID_DATA_2 = 'a0691ac0-b75b-4c4f-9fe0-a95b30263e10';

private function testEtagOfElement(string $token, string $uuid, string $additionalPath, string $shouldEtag = null): string
private function testEtagOfElement(string $token, string $uuid, string $additionalPath, ?string $shouldEtag = null): string
{
$response = $this->runGetRequest(
sprintf('/%s%s', $uuid, $additionalPath),
Expand Down
2 changes: 1 addition & 1 deletion tests/FeatureTests/General/Etag/DeleteNodeEtagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class DeleteNodeEtagTest extends BaseRequestTestCase
private const string UUID_DATA_4 = '4b04fac0-a2db-454c-9d1d-1880a82ecd0f';
private const string UUID_DATA_5 = '02a52492-ee1d-43fe-ad1a-bde040552fd0';

private function testEtagOfElement(string $token, string $uuid, string $additionalPath, string $shouldEtag = null): string
private function testEtagOfElement(string $token, string $uuid, string $additionalPath, ?string $shouldEtag = null): string
{
$response = $this->runGetRequest(
sprintf('/%s%s', $uuid, $additionalPath),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class DeleteNormalRelationEtagTest extends BaseRequestTestCase
private const string UUID_DATA_2 = '119cdc2a-e169-4cc5-a20a-7d6b67e05c25';
private const string UUID_RELATED = '41e07860-c278-4d3a-b96a-47465e832b5e';

private function testEtagOfElement(string $token, string $uuid, string $additionalPath, string $shouldEtag = null): string
private function testEtagOfElement(string $token, string $uuid, string $additionalPath, ?string $shouldEtag = null): string
{
$response = $this->runGetRequest(
sprintf('/%s%s', $uuid, $additionalPath),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class DeleteOwnsRelationEtagTest extends BaseRequestTestCase
private const string UUID_DATA_2 = '8b0e08f1-beda-4753-91ba-26f2c2546cdb';
private const string UUID_OWNS = '8adecb8f-01ca-41c9-907c-dca9ee8f4bc9';

private function testEtagOfElement(string $token, string $uuid, string $additionalPath, string $shouldEtag = null): string
private function testEtagOfElement(string $token, string $uuid, string $additionalPath, ?string $shouldEtag = null): string
{
$response = $this->runGetRequest(
sprintf('/%s%s', $uuid, $additionalPath),
Expand Down
2 changes: 1 addition & 1 deletion tests/FeatureTests/General/Etag/MaximumEtagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class MaximumEtagTest extends BaseRequestTestCase
private const string GROUP_UUID = '42c7a0f3-fc9b-478b-b658-52ecb44238b8';
private const string SOME_NODE_UUID = '81f811e2-c19f-4339-94e2-c0376fec097e';

private function testEtagOfElement(string $token, string $uuid, string $additionalPath, string $shouldEtag = null): string
private function testEtagOfElement(string $token, string $uuid, string $additionalPath, ?string $shouldEtag = null): string
{
$response = $this->runGetRequest(
sprintf('/%s%s', $uuid, $additionalPath),
Expand Down
2 changes: 1 addition & 1 deletion tests/FeatureTests/General/Etag/UpdateNodeEtagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class UpdateNodeEtagTest extends BaseRequestTestCase
private const string UUID_RELATED_1 = '3d793ff1-5587-45e3-aa17-1677dec2854a';
private const string UUID_RELATED_2 = '5f7dfb9c-9b76-43dc-aa75-6b5a023a10e8';

private function testEtagOfElement(string $token, string $uuid, string $additionalPath, string $shouldEtag = null): string
private function testEtagOfElement(string $token, string $uuid, string $additionalPath, ?string $shouldEtag = null): string
{
$response = $this->runGetRequest(
sprintf('/%s%s', $uuid, $additionalPath),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class UpdateNormalRelationEtagTest extends BaseRequestTestCase
private const string UUID_DATA_2 = 'eeccb6bf-91da-4da1-8bef-b797a32eb8a6';
private const string UUID_RELATED = '7f3afac6-013e-4b28-acc7-f4fe1c418c99';

private function testEtagOfElement(string $token, string $uuid, string $additionalPath, string $shouldEtag = null): string
private function testEtagOfElement(string $token, string $uuid, string $additionalPath, ?string $shouldEtag = null): string
{
$response = $this->runGetRequest(
sprintf('/%s%s', $uuid, $additionalPath),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class UpdateOwnsRelationEtagTest extends BaseRequestTestCase
private const string UUID_DATA_2 = 'f8ebe840-387d-4e35-b76d-1e367e6b2b2d';
private const string UUID_OWNS = '57f312c3-7536-43dc-92df-06b5ef3b87ee';

private function testEtagOfElement(string $token, string $uuid, string $additionalPath, string $shouldEtag = null): string
private function testEtagOfElement(string $token, string $uuid, string $additionalPath, ?string $shouldEtag = null): string
{
$response = $this->runGetRequest(
sprintf('/%s%s', $uuid, $additionalPath),
Expand Down

0 comments on commit 819e954

Please sign in to comment.