Skip to content
Open
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
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.* export-ignore
/docs export-ignore
/tests export-ignore
/phpunit.xml.dist export-ignore
34 changes: 24 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,38 @@ on:

jobs:
tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
php-version:
- '8.0'
- '8.1'
- '8.2'
- '8.3'
symfony-version:
- '5.3.*'
- '5.4.*'
- '6.0.*'
- '6.4.*'
dependencies:
- 'lowest'
- 'highest'
remove-dependencies: [ '' ]
include:
- php-version: '8.2'
symfony-version: '7.0.*'
dependencies: 'highest'
remove-dependencies: 'sensio/framework-extra-bundle'
- php-version: '8.3'
symfony-version: '7.0.*'
dependencies: 'highest'
remove-dependencies: 'sensio/framework-extra-bundle'
exclude:
- php-version: '8.0'
symfony-version: '6.4.*'

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v4"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
Expand All @@ -48,10 +62,10 @@ jobs:

- name: Remove dependencies
if: "matrix.remove-dependencies != ''"
run: composer remove --no-update ${{ matrix.remove-dependencies }}
run: composer remove --dev --no-update ${{ matrix.remove-dependencies }}

- name: "Install dependencies"
uses: ramsey/composer-install@1.3.0
uses: ramsey/composer-install@3.0.0
with:
dependency-versions: ${{ matrix.dependencies }}
env:
Expand All @@ -61,20 +75,20 @@ jobs:
run: composer test

coding-standard:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
name: Coding Standard
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v4"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
tools: flex
php-version: "8.0"
php-version: "8.3"

- name: "Install dependencies"
uses: ramsey/composer-install@1.3.0
uses: ramsey/composer-install@3.0.0

- name: "Check coding standard"
run: composer check-cs
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ phpunit.xml
composer.lock
composer.phar
.php_cs.cache
.php_cs
.php-cs-fixer.cache
php-cs-fixer.phar
/.phpunit.result.cache
10 changes: 5 additions & 5 deletions .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<?php

$finder = PhpCsFixer\Finder::create()
$finder = (new PhpCsFixer\Finder())
->exclude('vendor')
->name('*.php')
->in(__DIR__)
;

return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setRules(
[
'@Symfony' => true,
'single_blank_line_before_namespace' => true,
'ordered_imports' => true,
'concat_space' => ['spacing' => 'none'],
'phpdoc_no_alias_tag' => ['type' => 'var'],
'phpdoc_no_alias_tag' => ['replacements' => ['type' => 'var']],
'no_mixed_echo_print' => ['use' => 'echo'],
'binary_operator_spaces' => ['align_double_arrow' => false, 'align_equals' => false],
'binary_operator_spaces' => ['operators' => ['=>' => 'single_space', '=' => 'single_space']],
'no_superfluous_phpdoc_tags' => false,
]
)
->setFinder($finder)
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ Running tests
In the bundle directory:

```bash
./vendor/bin/phpunit
./bin/phpunit
```

Giving some love to PHP CS
---------------------------

```bash
composer require --dev 'friendsofphp/php-cs-fixer:^2.0'
composer require --dev 'friendsofphp/php-cs-fixer:^3.53'
bin/php-cs-fixer fix
```
31 changes: 15 additions & 16 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,24 @@
},
"require": {
"php": "^8.0",
"symfony/http-foundation": "^5.3.7 || ^6.0",
"symfony/twig-bundle": "^5.3.7 || ^6.0",
"symfony/routing": "^5.3.7 || ^6.0"
"symfony/http-foundation": "^5.3.7 || ^6.0 || ^7.0",
"symfony/twig-bundle": "^5.3.7 || ^6.0 || ^7.0",
"symfony/routing": "^5.3.7 || ^6.0 || ^7.0"
},
"require-dev": {
"overblog/graphql-bundle": "dev-master",
"webonyx/graphql-php": "dev-master",
"overblog/graphql-bundle": "^1.0",
"webonyx/graphql-php": "^15.4",
"phpunit/phpunit": "^9.5.10",
"sensio/framework-extra-bundle": "^6.2",
"symfony/browser-kit": "^5.3 || ^6.0",
"symfony/config": "^5.3.7 || ^6.0",
"symfony/console": "^5.3.7 || ^6.0",
"symfony/dependency-injection": "^5.3.7 || ^6.0",
"symfony/dom-crawler": "^5.3.7 || ^6.0",
"symfony/expression-language": "^5.3.7 || ^6.0",
"symfony/framework-bundle": "^5.3.7 || ^6.0",
"symfony/finder": "^5.3.7 || ^6.0",
"symfony/templating": "^5.3.7 || ^6.0",
"symfony/yaml": "^5.3.7 || ^6.0",
"symfony/browser-kit": "^5.3 || ^6.0 || ^7.0",
"symfony/config": "^5.3.7 || ^6.0 || ^7.0",
"symfony/console": "^5.3.7 || ^6.0 || ^7.0",
"symfony/dependency-injection": "^5.3.7 || ^6.0 || ^7.0",
"symfony/dom-crawler": "^5.3.7 || ^6.0 || ^7.0",
"symfony/expression-language": "^5.3.7 || ^6.0 || ^7.0",
"symfony/framework-bundle": "^5.3.7 || ^6.0 || ^7.0",
"symfony/finder": "^5.3.7 || ^6.0 || ^7.0",
"symfony/yaml": "^5.3.7 || ^6.0 || ^7.0",
"twig/twig": "^3.3.3"
},
"autoload": {
Expand All @@ -56,7 +55,7 @@
},
"scripts": {
"test": "bin/phpunit --color=always",
"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",
"install-cs": "test -f php-cs-fixer.phar || wget https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases/download/v3.53.0/php-cs-fixer.phar -O php-cs-fixer.phar",
"fix-cs": [
"@install-cs",
"@php php-cs-fixer.phar fix --diff -v --allow-risky=yes --ansi"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

final class DefaultEndpointWiringPass implements CompilerPassInterface
{
//@todo https://github.com/symfony/symfony/blob/master/src/Symfony/Component/DependencyInjection/Tests/Compiler/RemoveUnusedDefinitionsPassTest.php
public function process(ContainerBuilder $container)
// @todo https://github.com/symfony/symfony/blob/master/src/Symfony/Component/DependencyInjection/Tests/Compiler/RemoveUnusedDefinitionsPassTest.php
public function process(ContainerBuilder $container): void
{
$endpointDefinition = $container->getDefinition('overblog_graphiql.controller.graphql.endpoint');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

final class OverblogGraphQLBundleEndpointWiringPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container): void
{
$bundles = $container->getParameter('kernel.bundles_metadata');

Expand Down