Skip to content

Improve and fix CI workflows for CS checks, code coverage enabling, etc #655

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

Merged
merged 3 commits into from
Feb 12, 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
8 changes: 4 additions & 4 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
install-args: ['', '--prefer-lowest']
php-version: ['8.1', '8.2']
php-version: ['8.1', '8.2', '8.3']
fail-fast: false

steps:
Expand Down Expand Up @@ -76,16 +76,16 @@ jobs:

- name: "Run coding standard checks with squizlabs/php_codesniffer"
run: "composer cs-check"
if: ${{ matrix.php-version == '7.2' }} # Do not suggest using features after 7.2

- name: "Archive code coverage results"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: "codeCoverage"
path: "build"
overwrite: true

- uses: codecov/[email protected] # upload the coverage to codecov
with:
fail_ci_if_error: true # optional (default = false)
# Do not upload in forks, and only on php8, latest deps
if: ${{ github.repository == 'thecodingmachine/graphqlite' && matrix.php-version == '8.0' && matrix.install-args == '' }}
if: ${{ github.repository == 'thecodingmachine/graphqlite' && matrix.install-args == '' }}
3 changes: 2 additions & 1 deletion src/AggregateControllerQueryProviderFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class AggregateControllerQueryProviderFactory implements QueryProviderFactoryInt
public function __construct(
private readonly iterable $controllers,
private readonly ContainerInterface $controllersContainer,
) {}
) {
}

public function create(FactoryContext $context): QueryProviderInterface
{
Expand Down
1 change: 1 addition & 0 deletions src/Exceptions/GraphQLAggregateException.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class GraphQLAggregateException extends Exception implements GraphQLAggregateExc
public function __construct(iterable $exceptions = [])
{
parent::__construct('Many exceptions have be thrown:');

foreach ($exceptions as $exception) {
$this->add($exception);
}
Expand Down
5 changes: 3 additions & 2 deletions src/FailedResolvingInputType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@

namespace TheCodingMachine\GraphQLite;

use ArgumentCountError;
use RuntimeException;

use function sprintf;

class FailedResolvingInputType extends RuntimeException
{
public static function createForMissingConstructorParameter(\ArgumentCountError $original): self
public static function createForMissingConstructorParameter(ArgumentCountError $original): self
{
return new self(sprintf("%s. It should be mapped as required field.", $original->getMessage()), previous: $original);
return new self(sprintf('%s. It should be mapped as required field.', $original->getMessage()), previous: $original);
}

public static function createForDecorator(string $class): self
Expand Down
Loading