Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-redfern committed Mar 2, 2024
1 parent 8883a10 commit 1a3af31
Show file tree
Hide file tree
Showing 41 changed files with 60 additions and 80 deletions.
48 changes: 32 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,40 @@
name: tests

on:
push:

create:
tags:
- '*'

push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
create:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
testsuite:
name: Unittests
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
php-version: ['8.1', '8.2', '8.3']

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1

steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: json
tools: pecl

- name: Validate composer.json and composer.lock
run: composer validate
- name: Validate composer.json
run: composer validate

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Composer install
run: composer install --prefer-dist --no-progress

- name: Run test suite
run: vendor/bin/phpunit
- name: Run PHPUnit
run: vendor/bin/phpunit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,4 @@ Icon
Network Trash Folder
Temporary Items
.apdisk
/.phpunit.cache
6 changes: 2 additions & 4 deletions .idea/api-client.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/php-test-framework.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Change Log
==========

2024-02-24 - 4.1.0
------------------

* Update dependencies to Symfony 6.4
* Add support for Symfony 7

2023-01-21 - 4.0.3
------------------

Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
"pagerfanta/pagerfanta": "^3.5",
"somnambulist/attribute-model": "^3.0",
"somnambulist/collection": "^5.3",
"symfony/event-dispatcher": "^6.0",
"symfony/http-client": "^6.0",
"symfony/routing": "^6.0"
"symfony/event-dispatcher": "^6.4|^7.0",
"symfony/http-client": "^6.4|^7.0",
"symfony/routing": "^6.4|^7.0"
},
"require-dev": {
"phpunit/phpunit": "~9.5",
"phpunit/phpunit": "^10.5",
"somnambulist/domain": "^5.0",
"symfony/framework-bundle": "^6.0",
"symfony/phpunit-bridge": "^6.0",
"symfony/var-dumper": "^6.0"
"symfony/framework-bundle": "^6.4",
"symfony/phpunit-bridge": "^6.4",
"symfony/var-dumper": "^6.4"
},
"autoload": {
"psr-4": {
Expand Down
23 changes: 10 additions & 13 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
colors="true" bootstrap="vendor/autoload.php">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src/</directory>
</include>
<exclude>
<directory>tests</directory>
</exclude>
</coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
colors="true" bootstrap="vendor/autoload.php" cacheDirectory=".phpunit.cache">
<php>
<ini name="error_reporting" value="-1"/>
<ini name="memory_limit" value="256M"/>
<server name="APP_ENV" value="test" force="true"/>
<server name="SHELL_VERBOSITY" value="-1"/>
<server name="SYMFONY_DEPRECATIONS_HELPER" value="weak"/>
</php>
<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
</listeners>
<testsuites>
<testsuite name="Project Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">src/</directory>
</include>
<exclude>
<directory>tests</directory>
</exclude>
</source>
</phpunit>
2 changes: 0 additions & 2 deletions src/AbstractModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Somnambulist\Components\ApiClient;

use IlluminateAgnostic\Str\Support\Str;
use LogicException;
use Somnambulist\Components\ApiClient\Relationships\AbstractRelationship;
use Somnambulist\Components\ApiClient\Relationships\BelongsTo;
Expand All @@ -11,7 +10,6 @@
use Somnambulist\Components\AttributeModel\AbstractModel as AttributeModel;
use Somnambulist\Components\Collection\Contracts\Collection;
use Somnambulist\Components\Collection\MutableCollection;

use function array_key_exists;
use function is_null;
use function method_exists;
Expand Down
1 change: 0 additions & 1 deletion src/Client/ApiRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Routing\RequestContext;
use Symfony\Component\Routing\RouteCollection;

use function parse_url;

class ApiRouter
Expand Down
2 changes: 0 additions & 2 deletions src/Client/Connection/Decoders/SimpleJsonDecoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@

use Somnambulist\Components\ApiClient\Client\Contracts\ResponseDecoderInterface;
use Symfony\Contracts\HttpClient\ResponseInterface;

use function in_array;
use function is_numeric;
use function is_string;
use function json_decode;

use const JSON_THROW_ON_ERROR;

class SimpleJsonDecoder implements ResponseDecoderInterface
Expand Down
1 change: 0 additions & 1 deletion src/Client/Decorators/AbstractDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Symfony\Contracts\HttpClient\ResponseInterface;

use function method_exists;

abstract class AbstractDecorator implements ConnectionInterface
Expand Down
1 change: 0 additions & 1 deletion src/Client/Decorators/LoggingDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Psr\Log\LogLevel;
use Somnambulist\Components\ApiClient\Client\Contracts\ConnectionInterface;
use Symfony\Contracts\HttpClient\ResponseInterface;

use function sprintf;
use function strtoupper;

Expand Down
1 change: 0 additions & 1 deletion src/Client/Decorators/RecordResponseDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Somnambulist\Components\ApiClient\Client\RequestTracker;
use Somnambulist\Components\ApiClient\Client\ResponseStore;
use Symfony\Contracts\HttpClient\ResponseInterface;

use function in_array;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Somnambulist\Components\ApiClient\Client\Query\Exceptions\QueryEncoderException;
use Somnambulist\Components\ApiClient\Client\Query\Expression\CompositeExpression;
use Somnambulist\Components\ApiClient\Client\Query\QueryBuilder;

use function array_filter;
use function array_merge;

Expand Down
1 change: 0 additions & 1 deletion src/Client/Query/Encoders/AbstractEncoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use IlluminateAgnostic\Str\Support\Str;
use Somnambulist\Components\ApiClient\Client\Contracts\QueryEncoderInterface;
use Somnambulist\Components\ApiClient\Client\Query\Expression\CompositeExpression;

use function array_map;
use function count;
use function floor;
Expand Down
1 change: 0 additions & 1 deletion src/Client/Query/Encoders/CompoundNestedArrayEncoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Somnambulist\Components\ApiClient\Client\Query\Expression\CompositeExpression;
use Somnambulist\Components\ApiClient\Client\Query\Expression\Expression;
use Somnambulist\Components\ApiClient\Client\Query\QueryBuilder;

use function array_filter;
use function http_build_query;
use function is_null;
Expand Down
1 change: 0 additions & 1 deletion src/Client/Query/Encoders/JsonApiEncoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Somnambulist\Components\ApiClient\Client\Query\Expression\CompositeExpression;
use Somnambulist\Components\ApiClient\Client\Query\Expression\Expression;
use Somnambulist\Components\ApiClient\Client\Query\Expression\ExpressionBuilder;

use function array_merge;
use function is_null;

Expand Down
1 change: 0 additions & 1 deletion src/Client/Query/Encoders/NestedArrayEncoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Somnambulist\Components\ApiClient\Client\Query\Expression\CompositeExpression;
use Somnambulist\Components\ApiClient\Client\Query\Expression\Expression;
use Somnambulist\Components\ApiClient\Client\Query\QueryBuilder;

use function array_filter;
use function http_build_query;
use function is_null;
Expand Down
1 change: 0 additions & 1 deletion src/Client/Query/Encoders/OpenStackApiEncoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Somnambulist\Components\ApiClient\Client\Query\Exceptions\QueryEncoderException;
use Somnambulist\Components\ApiClient\Client\Query\Expression\CompositeExpression;
use Somnambulist\Components\ApiClient\Client\Query\Expression\Expression;

use function array_key_exists;
use function array_merge;
use function array_merge_recursive;
Expand Down
1 change: 0 additions & 1 deletion src/Client/Query/Encoders/SimpleEncoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Somnambulist\Components\ApiClient\Client\Query\Expression\CompositeExpression;
use Somnambulist\Components\ApiClient\Client\Query\Expression\Expression;
use Somnambulist\Components\ApiClient\Client\Query\Expression\ExpressionBuilder;

use function array_merge_recursive;
use function in_array;
use function is_null;
Expand Down
1 change: 0 additions & 1 deletion src/Client/Query/Expression/CompositeExpression.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use ArrayAccess;
use Countable;
use Somnambulist\Components\ApiClient\Client\Contracts\ExpressionInterface;

use function array_key_exists;
use function count;

Expand Down
1 change: 0 additions & 1 deletion src/Client/Query/Expression/Expression.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Somnambulist\Components\ApiClient\Client\Query\Expression;

use Somnambulist\Components\ApiClient\Client\Contracts\ExpressionInterface;

use function implode;
use function is_array;
use function sprintf;
Expand Down
1 change: 0 additions & 1 deletion src/Client/Query/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Somnambulist\Components\ApiClient\Client\Contracts\ExpressionInterface;
use Somnambulist\Components\ApiClient\Client\Query\Expression\CompositeExpression;
use Somnambulist\Components\ApiClient\Client\Query\Expression\ExpressionBuilder;

use function array_key_exists;
use function array_unshift;
use function count;
Expand Down
2 changes: 0 additions & 2 deletions src/Client/ResponseStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use RuntimeException;
use Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Contracts\HttpClient\ResponseInterface;

use function dirname;
use function file_exists;
use function file_get_contents;
Expand All @@ -17,7 +16,6 @@
use function sprintf;
use function strtoupper;
use function substr;

use const JSON_PRETTY_PRINT;
use const JSON_THROW_ON_ERROR;

Expand Down
1 change: 0 additions & 1 deletion src/ConnectionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Somnambulist\Components\ApiClient\Client\Connection;
use Somnambulist\Components\ApiClient\Client\Contracts\ConnectionInterface;
use Somnambulist\Components\ApiClient\Exceptions\ConnectionManagerException;

use function array_key_exists;

final class ConnectionManager
Expand Down
1 change: 0 additions & 1 deletion src/Exceptions/ConnectionManagerException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Somnambulist\Components\ApiClient\Exceptions;

use Exception;

use function sprintf;

class ConnectionManagerException extends Exception
Expand Down
1 change: 0 additions & 1 deletion src/Exceptions/EntityNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Somnambulist\Components\ApiClient\Exceptions;

use Exception;

use function sprintf;

class EntityNotFoundException extends Exception
Expand Down
1 change: 0 additions & 1 deletion src/Exceptions/NoResultsException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Exception;
use Somnambulist\Components\ApiClient\Client\Query\QueryBuilder;

use function sprintf;

class NoResultsException extends Exception
Expand Down
1 change: 0 additions & 1 deletion src/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use RuntimeException;
use Somnambulist\Components\ApiClient\Client\Contracts\ConnectionInterface;
use Somnambulist\Components\AttributeModel\AttributeCaster;

use function get_class;
use function sprintf;

Expand Down
1 change: 0 additions & 1 deletion src/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Somnambulist\Components\ApiClient\Client\Contracts\ResponseDecoderInterface;
use Somnambulist\Components\ApiClient\Client\Query\Encoders\SimpleEncoder;
use Somnambulist\Components\ApiClient\Exceptions\EntityNotFoundException;

use function array_key_exists;

/**
Expand Down
Loading

0 comments on commit 1a3af31

Please sign in to comment.