Skip to content

Commit ed3cf86

Browse files
authored
Improve and fix CI workflows for CS checks, code coverage enabling, etc (#655)
* Update CI configs for 8.3 support and updated actions packages * Additional CI improvements * Fixed PHPCS errors
1 parent c378063 commit ed3cf86

27 files changed

+378
-195
lines changed

.github/workflows/continuous_integration.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
matrix:
2020
install-args: ['', '--prefer-lowest']
21-
php-version: ['8.1', '8.2']
21+
php-version: ['8.1', '8.2', '8.3']
2222
fail-fast: false
2323

2424
steps:
@@ -76,16 +76,16 @@ jobs:
7676

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

8180
- name: "Archive code coverage results"
82-
uses: actions/upload-artifact@v3
81+
uses: actions/upload-artifact@v4
8382
with:
8483
name: "codeCoverage"
8584
path: "build"
85+
overwrite: true
8686

8787
- uses: codecov/[email protected] # upload the coverage to codecov
8888
with:
8989
fail_ci_if_error: true # optional (default = false)
9090
# Do not upload in forks, and only on php8, latest deps
91-
if: ${{ github.repository == 'thecodingmachine/graphqlite' && matrix.php-version == '8.0' && matrix.install-args == '' }}
91+
if: ${{ github.repository == 'thecodingmachine/graphqlite' && matrix.install-args == '' }}

src/AggregateControllerQueryProviderFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ class AggregateControllerQueryProviderFactory implements QueryProviderFactoryInt
1818
public function __construct(
1919
private readonly iterable $controllers,
2020
private readonly ContainerInterface $controllersContainer,
21-
) {}
21+
) {
22+
}
2223

2324
public function create(FactoryContext $context): QueryProviderInterface
2425
{

src/Exceptions/GraphQLAggregateException.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class GraphQLAggregateException extends Exception implements GraphQLAggregateExc
2323
public function __construct(iterable $exceptions = [])
2424
{
2525
parent::__construct('Many exceptions have be thrown:');
26+
2627
foreach ($exceptions as $exception) {
2728
$this->add($exception);
2829
}

src/FailedResolvingInputType.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@
44

55
namespace TheCodingMachine\GraphQLite;
66

7+
use ArgumentCountError;
78
use RuntimeException;
89

910
use function sprintf;
1011

1112
class FailedResolvingInputType extends RuntimeException
1213
{
13-
public static function createForMissingConstructorParameter(\ArgumentCountError $original): self
14+
public static function createForMissingConstructorParameter(ArgumentCountError $original): self
1415
{
15-
return new self(sprintf("%s. It should be mapped as required field.", $original->getMessage()), previous: $original);
16+
return new self(sprintf('%s. It should be mapped as required field.', $original->getMessage()), previous: $original);
1617
}
1718

1819
public static function createForDecorator(string $class): self

0 commit comments

Comments
 (0)