Skip to content

Add support for Symfony 8 #678

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@
"ext-dom": "*",
"ext-libxml": "*",
"php-webdriver/webdriver": "^1.8.2",
"symfony/browser-kit": "^5.4 || ^6.4 || ^7.0",
"symfony/dependency-injection": "^5.4 || ^6.4 || ^7.0",
"symfony/browser-kit": "^5.4 || ^6.4 || ^7.0 || ^8.0",
"symfony/dependency-injection": "^5.4 || ^6.4 || ^7.0 || ^8.0",
"symfony/deprecation-contracts": "^2.4 || ^3",
"symfony/dom-crawler": "^5.4 || ^6.4 || ^7.0",
"symfony/http-client": "^6.4 || ^7.0",
"symfony/http-kernel": "^5.4 || ^6.4 || ^7.0",
"symfony/process": "^5.4 || ^6.4 || ^7.0"
"symfony/dom-crawler": "^5.4 || ^6.4 || ^7.0 || ^8.0",
"symfony/http-client": "^6.4 || ^7.0 || ^8.0",
"symfony/http-kernel": "^5.4 || ^6.4 || ^7.0 || ^8.0",
"symfony/process": "^5.4 || ^6.4 || ^7.0 || ^8.0"
},
"require-dev": {
"symfony/css-selector": "^5.4 || ^6.4 || ^7.0",
"symfony/framework-bundle": "^5.4 || ^6.4 || ^7.0",
"symfony/mime": "^5.4 || ^6.4 || ^7.0",
"symfony/phpunit-bridge": "^7.2.0"
"symfony/css-selector": "^5.4 || ^6.4 || ^7.0 || ^8.0",
"symfony/framework-bundle": "^5.4 || ^6.4 || ^7.0 || ^8.0",
"symfony/mime": "^5.4 || ^6.4 || ^7.0 || ^8.0",
"symfony/phpunit-bridge": "^7.2.0 || ^8.0"
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand Down
2 changes: 2 additions & 0 deletions tests/AssertionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

namespace Symfony\Component\Panther\Tests;

use PHPUnit\Framework\Attributes\DataProvider;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\BrowserKit\AbstractBrowser;

Expand All @@ -29,6 +30,7 @@
}
}

#[DataProvider('clientFactoryProvider')]

Check failure on line 33 in tests/AssertionsTest.php

View workflow job for this annotation

GitHub Actions / Static Analysis

Attribute class PHPUnit\Framework\Attributes\DataProvider does not exist.
/**
* @dataProvider clientFactoryProvider
*/
Expand Down
22 changes: 22 additions & 0 deletions tests/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use Facebook\WebDriver\JavaScriptExecutor;
use Facebook\WebDriver\WebDriver;
use Facebook\WebDriver\WebDriverExpectedCondition;
use PHPUnit\Framework\Attributes\DataProvider;
use Symfony\Component\BrowserKit\AbstractBrowser;
use Symfony\Component\BrowserKit\Cookie;
use Symfony\Component\BrowserKit\CookieJar as BrowserKitCookieJar;
Expand Down Expand Up @@ -56,6 +57,7 @@
$client->waitFor('');
}

#[DataProvider('waitForDataProvider')]

Check failure on line 60 in tests/ClientTest.php

View workflow job for this annotation

GitHub Actions / Static Analysis

Attribute class PHPUnit\Framework\Attributes\DataProvider does not exist.
/**
* @dataProvider waitForDataProvider
*/
Expand Down Expand Up @@ -83,6 +85,7 @@
yield 'xpath expression' => ['locator' => '//*[@id="hello"]'];
}

#[DataProvider('waitForDataProvider')]

Check failure on line 88 in tests/ClientTest.php

View workflow job for this annotation

GitHub Actions / Static Analysis

Attribute class PHPUnit\Framework\Attributes\DataProvider does not exist.
/**
* @dataProvider waitForDataProvider
*/
Expand All @@ -95,6 +98,7 @@
$this->assertSame('Hello', $crawler->filter('#hello')->text(null, true));
}

#[DataProvider('waitForDataProvider')]

Check failure on line 101 in tests/ClientTest.php

View workflow job for this annotation

GitHub Actions / Static Analysis

Attribute class PHPUnit\Framework\Attributes\DataProvider does not exist.
/**
* @dataProvider waitForDataProvider
*/
Expand All @@ -107,6 +111,7 @@
$this->assertSame('', $crawler->filter('#hello')->text(null, true));
}

#[DataProvider('waitForDataProvider')]

Check failure on line 114 in tests/ClientTest.php

View workflow job for this annotation

GitHub Actions / Static Analysis

Attribute class PHPUnit\Framework\Attributes\DataProvider does not exist.
/**
* @dataProvider waitForDataProvider
*/
Expand All @@ -119,6 +124,7 @@
$this->assertSame('Hello new content', $crawler->filter('#hello')->text(null, true));
}

#[DataProvider('waitForDataProvider')]

Check failure on line 127 in tests/ClientTest.php

View workflow job for this annotation

GitHub Actions / Static Analysis

Attribute class PHPUnit\Framework\Attributes\DataProvider does not exist.
/**
* @dataProvider waitForDataProvider
*/
Expand All @@ -131,6 +137,7 @@
$this->assertSame('Hello', $crawler->filter('#hello')->text(null, true));
}

#[DataProvider('waitForDataProvider')]
/**
* @dataProvider waitForDataProvider
*/
Expand All @@ -143,6 +150,7 @@
$this->assertTrue($crawler->filter('#hello')->isEnabled());
}

#[DataProvider('waitForDataProvider')]
/**
* @dataProvider waitForDataProvider
*/
Expand All @@ -155,6 +163,7 @@
$this->assertFalse($crawler->filter('#hello')->isEnabled());
}

#[DataProvider('waitForDataProvider')]
/**
* @dataProvider waitForDataProvider
*/
Expand All @@ -167,6 +176,7 @@
$this->assertSame('42', $crawler->filter('#hello')->getAttribute('data-old-price'));
}

#[DataProvider('waitForDataProvider')]
/**
* @dataProvider waitForDataProvider
*/
Expand All @@ -179,6 +189,7 @@
$this->assertSame('36', $crawler->filter('#hello')->getAttribute('data-old-price'));
}

#[DataProvider('waitForDataProvider')]
/**
* @dataProvider waitForDataProvider
*/
Expand Down Expand Up @@ -244,6 +255,7 @@
];
}

#[DataProvider('waitForExceptionsProvider')]
/**
* @dataProvider waitForExceptionsProvider
*/
Expand Down Expand Up @@ -288,6 +300,7 @@
$this->assertSame('P1', $innerText);
}

#[DataProvider('clientFactoryProvider')]
/**
* @dataProvider clientFactoryProvider
*/
Expand Down Expand Up @@ -319,6 +332,7 @@
$this->assertSame('Hello', $refreshedCrawler->filter('h1')->text(null, true));
}

#[DataProvider('clientFactoryProvider')]
/**
* @dataProvider clientFactoryProvider
*/
Expand All @@ -337,6 +351,7 @@
$this->assertSame(self::$baseUri.'/basic.html#e12', $crawler->getUri());
}

#[DataProvider('clientFactoryProvider')]
/**
* @dataProvider clientFactoryProvider
*/
Expand Down Expand Up @@ -392,6 +407,7 @@
$this->assertSame('I1: n/a', $crawler->filter('#result')->text(null, true));
}

#[DataProvider('clientFactoryProvider')]
/**
* @dataProvider clientFactoryProvider
*/
Expand All @@ -418,6 +434,7 @@
$this->assertSame('I1: Reclus', $crawler->filter('#result')->text(null, true));
}

#[DataProvider('clientFactoryProvider')]
/**
* @dataProvider clientFactoryProvider
*/
Expand Down Expand Up @@ -445,6 +462,7 @@
$this->assertSame(self::$baseUri.'/link.html', $crawler->getUri());
}

#[DataProvider('clientFactoryProvider')]
/**
* @dataProvider clientFactoryProvider
*/
Expand Down Expand Up @@ -497,6 +515,7 @@
$this->assertNull($cookieJar->get('foo'));
}

#[DataProvider('clientFactoryProvider')]
/**
* @dataProvider clientFactoryProvider
*/
Expand All @@ -507,6 +526,7 @@
$this->assertEquals($expectedPort, mb_substr(self::$baseUri, -4));
}

#[DataProvider('clientFactoryProvider')]
/**
* @dataProvider clientFactoryProvider
*/
Expand Down Expand Up @@ -596,6 +616,7 @@
]);
}

#[DataProvider('providePrefersReducedMotion')]
/**
* @dataProvider providePrefersReducedMotion
*/
Expand All @@ -608,6 +629,7 @@
$this->assertStringEndsWith('#clicked', $client->getCurrentURL());
}

#[DataProvider('providePrefersReducedMotion')]
/**
* @dataProvider providePrefersReducedMotion
*/
Expand Down
Loading
Loading