Skip to content

Commit

Permalink
Merge pull request #34 from ruudk/updates
Browse files Browse the repository at this point in the history
Drop PHP 8.0, start testing PHP 8.2, require dataloader-php v1, only support SF 5.4 + 6.3
  • Loading branch information
mcg-web authored Aug 28, 2023
2 parents 22932f3 + 8e417cb commit 4cdc87b
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 51 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ jobs:
fail-fast: false
matrix:
php-version:
- '8.0'
- '8.1'
- '8.2'
symfony-version:
- '5.3.*'
- '5.4.*'
- '6.0.*'
- '6.3.*'
dependencies:
- 'lowest'
- 'highest'
Expand Down Expand Up @@ -52,7 +51,7 @@ jobs:
run: composer remove --no-update ${{ matrix.remove-dependencies }}

- name: "Install dependencies"
uses: ramsey/composer-install@1.3.0
uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.dependencies }}
env:
Expand All @@ -72,10 +71,10 @@ jobs:
uses: "shivammathur/setup-php@v2"
with:
tools: flex
php-version: "8.0"
php-version: "8.2"

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

- name: "Check coding standard"
run: composer check-cs
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ composer.phar
.php_cs.cache
/*.phar
/.phpunit.result.cache
/.phpunit.cache
/.php-cs-fixer.cache
2 changes: 1 addition & 1 deletion .php_cs → .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
file that was distributed with this source code.
EOF;

return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,25 @@
"sort-packages": true
},
"require": {
"php": "^8.0",
"overblog/dataloader-php": "^0.7.0",
"symfony/dependency-injection": "^5.3.7 || ^6.0"
"php": "^8.1",
"overblog/dataloader-php": "^1",
"symfony/dependency-injection": "^5.4 || ^6.3"
},
"require-dev": {
"phpunit/phpunit": "^9.5.10",
"phpunit/phpunit": "^10.3",
"react/promise": "^2.8.0",
"sensio/framework-extra-bundle": "^6.2",
"symfony/phpunit-bridge": "^6.0",
"symfony/yaml": "^5.3.7 || ^6.0"
"symfony/framework-bundle": "^5.4||^6.3",
"symfony/phpunit-bridge": "^6.3",
"symfony/yaml": "^5.4 || ^6.3"
},
"extra": {
"branch-alias": {
"dev-master": "0.5-dev"
}
},
"scripts": {
"test": "bin/phpunit --color=always --coverage-clover=build/logs/clover.xml",
"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",
"test": "bin/phpunit --color=always",
"install-cs": "test -f php-cs-fixer.phar || wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v3.23.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
32 changes: 10 additions & 22 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="vendor/autoload.php"
>
<testsuites>
<testsuite name="OverblogDataLoaderBundle Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>

<php>
<ini name="error_reporting" value="-1"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="999999" />
</php>

<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" bootstrap="vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<testsuites>
<testsuite name="OverblogDataLoaderBundle Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<php>
<ini name="error_reporting" value="-1"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="999999"/>
</php>
</phpunit>
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->end()
->end()
->end()
;
;

return $treeBuilder;
}
Expand Down
6 changes: 0 additions & 6 deletions tests/Functional/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ protected static function getKernelClass(): string
return AppKernel::class;
}

/**
* {@inheritdoc}
*/
protected static function createKernel(array $options = []): KernelInterface
{
if (null === static::$class) {
Expand All @@ -46,9 +43,6 @@ protected static function createKernel(array $options = []): KernelInterface
return new static::$class($env, $debug, $options['test_case']);
}

/**
* {@inheritdoc}
*/
public static function setUpBeforeClass(): void
{
$fs = new Filesystem();
Expand Down
1 change: 1 addition & 0 deletions tests/Functional/UserLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

use Overblog\DataLoader\DataLoader;
use Overblog\DataLoaderBundle\Tests\Functional\app\UserDataProvider;

use function React\Promise\all;

class UserLoaderTest extends TestCase
Expand Down
6 changes: 0 additions & 6 deletions tests/Functional/app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ class AppKernel extends Kernel
{
private $testCase;

/**
* {@inheritdoc}
*/
public function registerBundles(): array
{
return [
Expand Down Expand Up @@ -52,9 +49,6 @@ public function isBooted()
return $this->booted;
}

/**
* {@inheritdoc}
*/
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__.'/config/config.yaml');
Expand Down
1 change: 1 addition & 0 deletions tests/Functional/app/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ framework:
resource: "%kernel.project_dir%/config/routing.yaml"
profiler:
enabled: false
http_method_override: false

overblog_dataloader:
defaults:
Expand Down

0 comments on commit 4cdc87b

Please sign in to comment.