Fix merge conflict resolution

This commit is contained in:
Fabien Potencier
2026-06-03 19:55:20 +02:00
parent 455be2c916
commit 971dbcfe92
5 changed files with 1 additions and 54 deletions
-45
View File
@@ -42,51 +42,6 @@ jobs:
- name: "Run tests"
run: vendor/bin/phpunit
tests-phpunit-11:
name: "PHP ${{ matrix.php-version }} (PHPUnit 11.3)"
runs-on: 'ubuntu-latest'
env:
SYMFONY_PHPUNIT_VERSION: '11.3'
strategy:
matrix:
php-version:
- '8.2'
- '8.3'
- '8.4'
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Install PHP with extensions"
uses: shivammathur/setup-php@v2
with:
coverage: "none"
php-version: ${{ matrix.php-version }}
ini-values: memory_limit=-1
- name: "Add PHPUnit matcher"
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- run: composer install
- name: "Switch use_yield to true on PHP ${{ matrix.php-version }}"
if: "matrix.php-version == '8.2'"
run: |
sed -i -e "s/'use_yield' => false/'use_yield' => true/" src/Environment.php
- name: "Install PHPUnit"
run: vendor/bin/simple-phpunit install
- name: "PHPUnit version"
run: vendor/bin/simple-phpunit --version
- name: "Run tests"
run: vendor/bin/simple-phpunit
extension-tests:
needs:
- 'tests'
-1
View File
@@ -20,7 +20,6 @@ namespace Twig\Tests;
* file that was distributed with this source code.
*/
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use Twig\Cache\CacheInterface;
use Twig\Cache\FilesystemCache;
-2
View File
@@ -20,8 +20,6 @@ namespace Twig\Tests;
* file that was distributed with this source code.
*/
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use Twig\Extension\EscaperExtension;
@@ -11,7 +11,6 @@
namespace Twig\Tests\Extension;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use Twig\Environment;
use Twig\Extension\SandboxExtension;
+1 -5
View File
@@ -20,7 +20,7 @@ use Twig\Test\NodeTestCase;
* Guards that the shipped test case classes stay usable on PHPUnit >= 11,
* which rejects non-static data providers.
*/
class DataProviderCompatibilityTest extends TestCase
final class DataProviderCompatibilityTest extends TestCase
{
/**
* @return iterable<array{class-string}>
@@ -32,15 +32,11 @@ class DataProviderCompatibilityTest extends TestCase
}
/**
* @dataProvider provideTestCaseClasses
*
* @param class-string $class
*/
#[DataProvider('provideTestCaseClasses')]
public function testDataProviderAttributesReferenceStaticMethods(string $class): void
{
// Read attribute metadata via reflection without instantiating the attribute,
// so the check also runs under PHPUnit < 10 where the attribute class is absent.
$found = false;
foreach ((new \ReflectionClass($class))->getMethods() as $method) {
foreach ($method->getAttributes(DataProvider::class) as $attribute) {