Skip to content
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
39 changes: 14 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: Analyze
runs-on: ubuntu-latest
container:
image: php:8.3-alpine
image: php:8.5-alpine
options: >-
--tmpfs /tmp:exec
--tmpfs /var/tmp:exec
Expand All @@ -27,13 +27,13 @@ jobs:
- uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-8.3-highest-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-8.5-highest-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-composer-8.3-highest
${{ runner.os }}-composer-8.5-highest
- name: Validate Composer
run: composer validate
- name: Install highest dependencies with Composer
run: composer update --no-progress --no-suggest --ansi
run: composer update --no-progress --ansi
- name: Disable PHP memory limit
run: echo 'memory_limit=-1' >> /usr/local/etc/php/php.ini
- name: Run CS-Fixer
Expand All @@ -50,19 +50,10 @@ jobs:
strategy:
matrix:
php:
- '8.1'
- '8.2'
- '8.3'
- '8.5'
dependencies:
- 'lowest'
- 'highest'
include:
- php: '8.1'
phpunit-version: 10
- php: '8.2'
phpunit-version: 10
- php: '8.3'
phpunit-version: 10
fail-fast: false
steps:
- name: Checkout
Expand All @@ -81,20 +72,18 @@ jobs:
${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.dependencies }}
- name: Install lowest dependencies with Composer
if: matrix.dependencies == 'lowest'
run: composer update --no-progress --no-suggest --prefer-stable --prefer-lowest --ansi
run: composer update --no-progress --prefer-stable --prefer-lowest --ansi
- name: Install highest dependencies with Composer
if: matrix.dependencies == 'highest'
run: composer update --no-progress --no-suggest --ansi
run: composer update --no-progress --ansi
- name: Run tests with PHPUnit
env:
SYMFONY_MAX_PHPUNIT_VERSION: ${{ matrix.phpunit-version }}
run: vendor/bin/simple-phpunit --colors=always
run: vendor/bin/phpunit --colors=always

coverage:
name: Coverage (PHP 8.3)
name: Coverage (PHP 8.5)
runs-on: ubuntu-latest
container:
image: php:8.3-alpine
image: php:8.5-alpine
options: >-
--tmpfs /tmp:exec
--tmpfs /var/tmp:exec
Expand All @@ -115,13 +104,13 @@ jobs:
- uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-8.3-highest-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-8.5-highest-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-composer-8.3-highest
${{ runner.os }}-composer-8.5-highest
- name: Install highest dependencies with Composer
run: composer update --no-progress --no-suggest --ansi
run: composer update --no-progress --ansi
- name: Run coverage with PHPUnit
run: vendor/bin/simple-phpunit --coverage-clover ./coverage.xml --colors=always
run: vendor/bin/phpunit --coverage-clover ./coverage.xml --colors=always
- name: Send code coverage report to Codecov.io
uses: codecov/codecov-action@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.php-cs-fixer.cache
psalm-phpqa.xml
.phpunit.result.cache
.phpunit.cache/
composer.lock
vendor/*

Expand Down
44 changes: 24 additions & 20 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,35 @@
}
],
"require": {
"php": "^8.1",
"a2lix/auto-form-bundle": "^0.4",
"php": "^8.5",
"a2lix/auto-form-bundle": "^1.0",
"doctrine/dbal": "^4.0",
"doctrine/orm": "^3.0",
"doctrine/persistence": "^4.0",
"symfony/config": "^5.4.30|^6.3|^7.0",
"symfony/dependency-injection": "^5.4.30|^6.3|^7.0",
"symfony/doctrine-bridge": "^7.3",
"symfony/event-dispatcher": "^5.4.30|^6.3|^7.0",
"symfony/form": "^5.4.30|^6.3|^7.0",
"symfony/http-foundation": "^5.4.30|^6.3|^7.0",
"symfony/http-kernel": "^5.4.30|^6.3|^7.0",
"symfony/options-resolver": "^5.4.30|^6.3|^7.0"
"phpdocumentor/reflection-docblock": "^5.6|^6.0",
"symfony/config": "^7.4|^8.0",
"symfony/dependency-injection": "^7.4|^8.0",
"symfony/doctrine-bridge": "^7.4|^8.0",
"symfony/event-dispatcher": "^7.4|^8.0",
"symfony/form": "^7.4|^8.0",
"symfony/http-foundation": "^7.4|^8.0",
"symfony/http-kernel": "^7.4|^8.0",
"symfony/options-resolver": "^7.4|^8.0",
"symfony/property-info": "^7.4|^8.0",
"symfony/type-info": "^7.4|^8.0"
},
"require-dev": {
"doctrine/orm": "^3.0",
"amphp/dns": "^2.1.2",
"friendsofphp/php-cs-fixer": "^3.45",
"kubawerlos/php-cs-fixer-custom-fixers": "^3.18",
"matthiasnoback/symfony-dependency-injection-test": "^5.0",
"phpstan/phpstan": "^1.10",
"rector/rector": "^0.18",
"symfony/cache": "^5.4.30|^6.3|^7.0",
"symfony/phpunit-bridge": "^5.4.30|^6.3|^7.0",
"symfony/validator": "^5.4.30|^6.3|^7.0",
"matthiasnoback/symfony-dependency-injection-test": "^6.0",
"phpstan/phpstan": "^2.0",
"rector/rector": "^2.0",
"symfony/cache": "^7.4|^8.0",
"symfony/phpunit-bridge": "^7.4|^8.0",
"symfony/validator": "^7.4|^8.0",
"toovalu-github/doctrine-behaviors": "^3.0",
"vimeo/psalm": "^5.18"
"vimeo/psalm": "^6.0"
},
"suggest": {
"knplabs/doctrine-behaviors": "For Knp strategy",
Expand All @@ -68,7 +72,7 @@
"psalm"
],
"phpunit": [
"SYMFONY_DEPRECATIONS_HELPER=max[self]=0 simple-phpunit"
"SYMFONY_DEPRECATIONS_HELPER=max[self]=0 phpunit"
]
},
"config": {
Expand All @@ -82,7 +86,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
"dev-master": "4.x-dev"
}
}
}
53 changes: 22 additions & 31 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,34 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.6/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
>
<php>
<ini name="error_reporting" value="-1" />
</php>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
</listeners>

<filter>
<whitelist>
<directory>src/</directory>
<exclude>
<directory>src/Resources</directory>
</exclude>
</whitelist>
</filter>

<testsuites>
<testsuite name="Bundle Test Suite">
<directory>tests/</directory>
<exclude>tests/Fixtures</exclude>
<exclude>tests/tmp</exclude>
</testsuite>
</testsuites>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/13.1/phpunit.xsd" backupGlobals="false" colors="true" bootstrap="vendor/autoload.php" cacheDirectory=".phpunit.cache">
<php>
<ini name="error_reporting" value="-1"/>
</php>
<extensions>
<bootstrap class="Symfony\Bridge\PhpUnit\SymfonyExtension"/>
</extensions>
<testsuites>
<testsuite name="Bundle Test Suite">
<directory>tests/</directory>
<exclude>tests/Fixtures</exclude>
<exclude>tests/tmp</exclude>
</testsuite>
</testsuites>
<source>
<include>
<directory>src/</directory>
</include>
<exclude>
<directory>src/Resources</directory>
</exclude>
</source>
</phpunit>
23 changes: 2 additions & 21 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\Core\ValueObject\PhpVersion;
use Rector\Doctrine\Set\DoctrineSetList;
use Rector\PHPUnit\Set\PHPUnitLevelSetList;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Symfony\Set\SymfonyLevelSetList;
use Rector\Symfony\Set\SymfonySetList;
use Rector\Symfony\Set\TwigSetList;
use Rector\ValueObject\PhpVersion;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->parallel();
Expand All @@ -21,17 +14,5 @@
$rectorConfig->importNames();
$rectorConfig->importShortClasses(false);

$rectorConfig->phpVersion(PhpVersion::PHP_82);
$rectorConfig->sets([
LevelSetList::UP_TO_PHP_82,

DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES,
// DoctrineSetList::DOCTRINE_CODE_QUALITY,
DoctrineSetList::DOCTRINE_ORM_214,
DoctrineSetList::DOCTRINE_DBAL_30,

PHPUnitLevelSetList::UP_TO_PHPUNIT_91,
// PHPUnitSetList::PHPUNIT_CODE_QUALITY,
// PHPUnitSetList::PHPUNIT_YIELD_DATA_PROVIDER,
]);
$rectorConfig->phpVersion(PhpVersion::PHP_85);
};
4 changes: 2 additions & 2 deletions src/DependencyInjection/A2lixTranslationFormExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public function load(array $configs, ContainerBuilder $container): void
$container->setParameter('a2lix_translation_form.locale_provider', $config['locale_provider']);
$container->setParameter('a2lix_translation_form.locales', $config['locales']);
$container->setParameter('a2lix_translation_form.required_locales', $config['required_locales']);
$container->setParameter('a2lix_translation_form.default_locale', $config['default_locale'] ?:
$container->getParameter('kernel.default_locale'));
$container->setParameter('a2lix_translation_form.default_locale', $config['default_locale']
?: $container->getParameter('kernel.default_locale'));

$container->setParameter('a2lix_translation_form.templating', $config['templating']);
}
Expand Down
Loading
Loading