Skip to content

Commit 68520e0

Browse files
authored
Merge pull request #46 from mcg-web/fix-ci
Fix ci
2 parents c43f73d + bb83b9d commit 68520e0

33 files changed

+187
-83
lines changed

.github/workflows/ci.yml

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,51 @@
11
name: CI
22

33
on:
4-
pull_request:
5-
branches:
6-
- "*.*"
7-
- master
4+
pull_request: null
85
push:
96
branches:
107
- "*.*"
11-
- master
8+
- "master"
9+
schedule:
10+
- cron: "0 4 * * *"
1211

1312
jobs:
1413
tests:
15-
runs-on: ubuntu-20.04
14+
runs-on: ubuntu-22.04
1615
strategy:
1716
fail-fast: false
1817
matrix:
1918
php-version:
2019
- '8.0'
2120
- '8.1'
21+
- '8.2'
22+
- '8.3'
23+
- '8.4'
2224
symfony-version:
23-
- '5.3.*'
2425
- '5.4.*'
2526
- '6.0.*'
27+
- '6.2.*'
28+
- '6.4.*'
29+
- '7.0.*'
30+
- '7.1.*'
2631
dependencies:
2732
- 'lowest'
2833
- 'highest'
2934
remove-dependencies: [ '' ]
35+
coverage: [ 'none' ]
36+
exclude:
37+
- php-version: '8.0'
38+
symfony-version: '6.2.*'
39+
- php-version: '8.0'
40+
symfony-version: '6.4.*'
41+
- php-version: '8.0'
42+
symfony-version: '7.0.*'
43+
- php-version: '8.0'
44+
symfony-version: '7.1.*'
45+
- php-version: '8.1'
46+
symfony-version: '7.0.*'
47+
- php-version: '8.1'
48+
symfony-version: '7.1.*'
3049
steps:
3150
- name: "Checkout"
3251
uses: "actions/checkout@v2"
@@ -61,20 +80,21 @@ jobs:
6180
run: composer test
6281

6382
coding-standard:
64-
runs-on: ubuntu-20.04
83+
runs-on: ubuntu-22.04
6584
name: Coding Standard
6685
steps:
6786
- name: "Checkout"
68-
uses: "actions/checkout@v2"
87+
uses: "actions/checkout@v4"
6988

7089
- name: "Install PHP"
7190
uses: "shivammathur/setup-php@v2"
7291
with:
7392
tools: flex
74-
php-version: "8.0"
93+
php-version: "8.2"
94+
coverage: "none"
7595

7696
- name: "Install dependencies"
77-
uses: ramsey/composer-install@1.3.0
97+
uses: "ramsey/composer-install@v2"
7898

7999
- name: "Check coding standard"
80-
run: composer check-cs
100+
run: composer run check-cs

.gitignore

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
.idea
21
phpunit.xml
32
/build
43
/vendor
54
/bin
65
composer.lock
76
composer.phar
8-
.php_cs.cache
9-
.php_cs
7+
/.php-cs-fixer.php
8+
/*.cache
9+
10+
phpbench.phar
11+
phpbench.phar.*
12+
/.phpbench_storage
1013
php-cs-fixer.phar
11-
/.phpunit.result.cache

.php-cs-fixer.dist.php

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?php
2+
3+
$finder = PhpCsFixer\Finder::create()
4+
->exclude('Annotation')
5+
->name('*.php')
6+
->in([__DIR__.'/src', __DIR__.'/tests'])
7+
;
8+
9+
return (new PhpCsFixer\Config())
10+
->setRules(
11+
[
12+
'@Symfony' => true,
13+
'@PHP80Migration' => true,
14+
'@PHP80Migration:risky' => true,
15+
'ordered_imports' => ['imports_order' => ['class', 'function', 'const']],
16+
'general_phpdoc_annotation_remove' => [
17+
'annotations' => [
18+
'author',
19+
'category',
20+
'copyright',
21+
'created',
22+
'license',
23+
'package',
24+
'since',
25+
'subpackage',
26+
'version',
27+
],
28+
],
29+
'fully_qualified_strict_types' => true,
30+
'single_line_throw' => false,
31+
'phpdoc_to_comment' => false,
32+
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
33+
'global_namespace_import' => ['import_functions' => true, 'import_classes' => true, 'import_constants' => true],
34+
'phpdoc_summary' => false,
35+
'single_line_comment_style' => false,
36+
'phpdoc_no_alias_tag' => ['replacements' => ['type' => 'var']],
37+
'no_mixed_echo_print' => ['use' => 'echo'],
38+
]
39+
)
40+
->setFinder($finder)
41+
->setUsingCache(true)
42+
;

.php_cs.dist

Lines changed: 0 additions & 23 deletions
This file was deleted.

composer.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,24 @@
2222
},
2323
"require": {
2424
"php": "^8.0",
25-
"symfony/http-foundation": "^5.3.7 || ^6.0 || ^7.0",
26-
"symfony/twig-bundle": "^5.3.7 || ^6.0 || ^7.0",
27-
"symfony/routing": "^5.3.7 || ^6.0 || ^7.00"
25+
"symfony/http-foundation": "^5.4 || ^6.0 || ^7.0",
26+
"symfony/twig-bundle": "^5.4 || ^6.0 || ^7.0",
27+
"symfony/routing": "^5.4 || ^6.0 || ^7.00"
2828
},
2929
"require-dev": {
3030
"overblog/graphql-bundle": "dev-master",
3131
"webonyx/graphql-php": "^15.4",
3232
"phpunit/phpunit": "^9.5.10",
33-
"symfony/browser-kit": "^5.3 || ^6.0 || ^7.0",
34-
"symfony/config": "^5.3.7 || ^6.0 || ^7.0",
35-
"symfony/console": "^5.3.7 || ^6.0 || ^7.0",
36-
"symfony/dependency-injection": "^5.3.7 || ^6.0 || ^7.0",
37-
"symfony/dom-crawler": "^5.3.7 || ^6.0 || ^7.0",
38-
"symfony/expression-language": "^5.3.7 || ^6.0 || ^7.0",
39-
"symfony/framework-bundle": "^5.3.7 || ^6.0 || ^7.0",
40-
"symfony/finder": "^5.3.7 || ^6.0 || ^7.0",
41-
"symfony/templating": "^5.3.7 || ^6.0 || ^7.0",
42-
"symfony/yaml": "^5.3.7 || ^6.0 || ^7.0",
33+
"symfony/browser-kit": "^5.4 || ^6.0 || ^7.0",
34+
"symfony/config": "^5.4 || ^6.0 || ^7.0",
35+
"symfony/console": "^5.4 || ^6.0 || ^7.0",
36+
"symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0",
37+
"symfony/dom-crawler": "^5.4 || ^6.0 || ^7.0",
38+
"symfony/expression-language": "^5.4 || ^6.0 || ^7.0",
39+
"symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0",
40+
"symfony/finder": "^5.4 || ^6.0 || ^7.0",
41+
"symfony/templating": "^5.4 || ^6.0 || ^7.0",
42+
"symfony/yaml": "^5.4 || ^6.0 || ^7.0",
4343
"twig/twig": "^3.3.3"
4444
},
4545
"autoload": {
@@ -50,7 +50,7 @@
5050
},
5151
"scripts": {
5252
"test": "bin/phpunit --color=always",
53-
"install-cs": "test -f php-cs-fixer.phar || wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.18.7/php-cs-fixer.phar -O php-cs-fixer.phar",
53+
"install-cs": "test -f php-cs-fixer.phar || wget https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases/download/v3.48.0/php-cs-fixer.phar -O php-cs-fixer.phar",
5454
"fix-cs": [
5555
"@install-cs",
5656
"@php php-cs-fixer.phar fix --diff -v --allow-risky=yes --ansi"

src/Config/GraphQLEndpoint/GraphQLEndpointInvalidSchemaException.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Overblog\GraphiQLBundle\Config\GraphQLEndpoint;
46

5-
class GraphQLEndpointInvalidSchemaException extends \RuntimeException
7+
use RuntimeException;
8+
9+
class GraphQLEndpointInvalidSchemaException extends RuntimeException
610
{
711
public static function forSchemaAndResolver($schemaName, $resolverClass)
812
{

src/Config/GraphQLEndpoint/Helpers/OverblogGraphQLBundleEndpointResolver.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Overblog\GraphiQLBundle\Config\GraphQLEndpoint\Helpers;
46

57
final class OverblogGraphQLBundleEndpointResolver

src/Config/GraphQLEndpoint/RootResolver.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Overblog\GraphiQLBundle\Config\GraphQLEndpoint;
46

57
use Overblog\GraphiQLBundle\Config\GraphiQLControllerEndpoint;

src/Config/GraphQLEndpoint/RouteResolver.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Overblog\GraphiQLBundle\Config\GraphQLEndpoint;
46

57
use Overblog\GraphiQLBundle\Config\GraphiQLControllerEndpoint;

src/Config/GraphiQLControllerEndpoint.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Overblog\GraphiQLBundle\Config;
46

57
interface GraphiQLControllerEndpoint

0 commit comments

Comments
 (0)