From b5de4f711f50189832ef030e9a327ff80b4367f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Fri, 21 Nov 2025 14:37:02 +0100 Subject: [PATCH 1/4] PHP 8.5 compatibility, remove EOLed versions --- .github/workflows/ci.yml | 18 +++++++++--------- composer.json | 26 +++++++++++++------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2941bb10..28c24b0f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,7 +73,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-versions: ['8.1', '8.2', '8.3', '8.4'] + php-versions: ['8.1', '8.2', '8.3', '8.4', '8.5'] fail-fast: false name: PHP ${{ matrix.php-versions }} Test dev dependencies on ubuntu-latest steps: @@ -97,7 +97,7 @@ jobs: phpunit-lowest: runs-on: ubuntu-latest - name: PHP 8.4 (lowest) Test on ubuntu-latest + name: PHP 8.5 (lowest) Test on ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 @@ -105,7 +105,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.4' + php-version: '8.5' extensions: zip - name: Install dependencies @@ -120,7 +120,7 @@ jobs: phpunit-windows: runs-on: windows-latest - name: PHP 8.4 Test on windows-latest + name: PHP 8.5 Test on windows-latest env: PANTHER_FIREFOX_BINARY: 'C:\Program Files\Mozilla Firefox\firefox.exe' SKIP_FIREFOX: 1 @@ -131,7 +131,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.4' + php-version: '8.5' extensions: zip - name: Install dependencies @@ -142,7 +142,7 @@ jobs: phpunit-macos: runs-on: macos-latest - name: PHP 8.4 Test on macos-latest + name: PHP 8.5 Test on macos-latest steps: - name: Checkout uses: actions/checkout@v4 @@ -150,7 +150,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.4' + php-version: '8.5' extensions: zip - name: Install Firefox @@ -169,9 +169,9 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-versions: [ '8.1', '8.2', '8.3', '8.4'] + php-versions: ['8.1', '8.2', '8.3', '8.4', '8.5'] fail-fast: false - name: PHP ${{ matrix.php-versions }} (PHPUnit 11) Test on ubuntu-latest + name: PHP ${{ matrix.php-versions }} (PHPUnit 10) Test on ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 diff --git a/composer.json b/composer.json index 41801fec..9dfe6ed4 100644 --- a/composer.json +++ b/composer.json @@ -14,33 +14,33 @@ "authors": [ { "name": "Kévin Dunglas", - "email": "dunglas@gmail.com", - "homepage": "https://dunglas.fr" + "email": "kevin@dunglas.dev", + "homepage": "https://dunglas.dev" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "homepage": "https://dunglas.fr", + "homepage": "https://symfony.com/doc/current/testing/end_to_end.html", "require": { - "php": ">=8.0", + "php": ">=8.1", "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": "^6.4 || ^7.3 || ^8.0", + "symfony/dependency-injection": "^6.4 || ^7.3 || ^8.0", "symfony/deprecation-contracts": "^2.4 || ^3", - "symfony/dom-crawler": "^5.4 || ^6.4 || ^7.0", + "symfony/dom-crawler": "^6.4 || ^7.3 || ^8.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/http-kernel": "^6.4 || ^7.3 || ^8.0", + "symfony/process": "^6.4 || ^7.3 || ^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": "^6.4 || ^7.3 || ^8.0", + "symfony/framework-bundle": "^6.4 || ^7.3 || ^8.0", + "symfony/mime": "^6.4 || ^7.3 || ^8.0", + "symfony/phpunit-bridge": ">=7.3.4" }, "minimum-stability": "dev", "prefer-stable": true, From f0b791757904e0b5b10f6faf5a811afb72c99425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Fri, 21 Nov 2025 14:52:50 +0100 Subject: [PATCH 2/4] remove setAccessible calls --- .php-cs-fixer.dist.php | 2 +- CHANGELOG.md | 2 ++ README.md | 2 +- composer.json | 2 +- examples/basic.php | 2 +- src/Client.php | 4 ++-- src/Cookie/CookieJar.php | 4 ++-- src/DomCrawler/Crawler.php | 4 ++-- src/DomCrawler/Field/ChoiceFormField.php | 4 ++-- src/DomCrawler/Field/FileFormField.php | 2 +- src/DomCrawler/Field/FormFieldTrait.php | 4 ++-- src/DomCrawler/Field/InputFormField.php | 4 ++-- src/DomCrawler/Field/TextareaFormField.php | 4 ++-- src/DomCrawler/Form.php | 4 ++-- src/DomCrawler/Image.php | 4 ++-- src/DomCrawler/Link.php | 4 ++-- src/Exception/ExceptionInterface.php | 2 +- src/Exception/InvalidArgumentException.php | 2 +- src/Exception/LogicException.php | 2 +- src/Exception/RuntimeException.php | 2 +- src/ExceptionThrower.php | 4 ++-- src/PantherTestCase.php | 2 +- src/PantherTestCaseTrait.php | 4 ++-- src/ProcessManager/BrowserManagerInterface.php | 4 ++-- src/ProcessManager/ChromeManager.php | 4 ++-- src/ProcessManager/FirefoxManager.php | 4 ++-- src/ProcessManager/SeleniumManager.php | 2 +- src/ProcessManager/WebServerManager.php | 4 ++-- src/ProcessManager/WebServerReadinessProbeTrait.php | 4 ++-- src/ServerExtension.php | 2 +- src/ServerExtensionLegacy.php | 2 +- src/ServerTrait.php | 2 +- src/WebDriver/PantherWebDriverExpectedCondition.php | 2 +- src/WebDriver/WebDriverCheckbox.php | 4 ++-- src/WebDriver/WebDriverMouse.php | 2 +- src/WebTestAssertionsTrait.php | 4 ++-- tests/AssertionsTest.php | 2 +- tests/ClientTest.php | 8 ++++---- tests/DomCrawler/CrawlerTest.php | 4 ++-- tests/DomCrawler/Field/ChoiceFormFieldTest.php | 2 +- tests/DomCrawler/Field/EmailInputFormFieldTest.php | 2 +- tests/DomCrawler/Field/FileFormFieldTest.php | 2 +- tests/DomCrawler/Field/InputFormFieldTest.php | 2 +- tests/DomCrawler/Field/NumberInputFormFieldTest.php | 2 +- tests/DomCrawler/Field/TextareaFormFieldTest.php | 2 +- tests/DomCrawler/FormTest.php | 4 ++-- tests/DummyKernel.php | 4 ++-- tests/FutureAssertionsTest.php | 2 +- tests/MultiClientsTest.php | 2 +- tests/ProcessManager/ChromeManagerTest.php | 4 ++-- tests/ProcessManager/SeleniumManagerTest.php | 2 +- tests/ProcessManager/WebServerManagerTest.php | 4 ++-- tests/ScreenshotTest.php | 2 +- tests/ServerExtensionTest.php | 2 +- tests/TestCase.php | 4 ++-- tests/WebDriver/WebDriverCheckBoxTest.php | 4 ++-- tests/WebDriver/WebDriverMouseTest.php | 2 +- tests/fixtures/cookie.php | 2 +- tests/fixtures/env.php | 2 +- tests/fixtures/index.php | 2 +- tests/fixtures/security-check.php | 2 +- tests/fixtures/ua.php | 2 +- 62 files changed, 92 insertions(+), 90 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index e591fe77..2fa6d813 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -3,7 +3,7 @@ $header = <<<'HEADER' This file is part of the Panther project. -(c) Kévin Dunglas +(c) Kévin Dunglas For the full copyright and license information, please view the LICENSE file that was distributed with this source code. diff --git a/CHANGELOG.md b/CHANGELOG.md index ca3d0692..c66e63de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ CHANGELOG 2.3.0 ----- +* Add support for PHP 8.5 +* Add support for Symfony 8 * Disable dev-tools by default 2.2.0 diff --git a/README.md b/README.md index 05b8e022..4c566bd9 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ If you like this software, help save the (real) panthers by [donating to the Pan ## Credits -Created by [Kévin Dunglas](https://dunglas.fr). Sponsored by [Les-Tilleuls.coop](https://les-tilleuls.coop). +Created by [Kévin Dunglas](https://dunglas.dev). Sponsored by [Les-Tilleuls.coop](https://les-tilleuls.coop). Panther is built on top of [PHP WebDriver](https://github.com/php-webdriver/php-webdriver) and [several other FOSS libraries](https://symfony.com/blog/introducing-symfony-panther-a-browser-testing-and-web-scrapping-library-for-php#thank-you-open-source). It has been inspired by [Nightwatch.js](http://nightwatchjs.org/), a WebDriver-based testing tool for JavaScript. diff --git a/composer.json b/composer.json index 9dfe6ed4..5345fa08 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "homepage": "https://symfony.com/contributors" } ], - "homepage": "https://symfony.com/doc/current/testing/end_to_end.html", + "homepage": "https://symfony.com/packages/Panther", "require": { "php": ">=8.1", "ext-dom": "*", diff --git a/examples/basic.php b/examples/basic.php index 0f5de120..ad3ae494 100644 --- a/examples/basic.php +++ b/examples/basic.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Client.php b/src/Client.php index a1c53e51..601f93aa 100644 --- a/src/Client.php +++ b/src/Client.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -50,7 +50,7 @@ use Symfony\Component\Panther\WebDriver\WebDriverMouse; /** - * @author Kévin Dunglas + * @author Kévin Dunglas * @author Dany Maillard * * @method PantherCrawler getCrawler() diff --git a/src/Cookie/CookieJar.php b/src/Cookie/CookieJar.php index ef9e75cf..2f4819cc 100644 --- a/src/Cookie/CookieJar.php +++ b/src/Cookie/CookieJar.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -22,7 +22,7 @@ use Symfony\Component\Panther\ExceptionThrower; /** - * @author Kévin Dunglas + * @author Kévin Dunglas */ final class CookieJar extends BaseCookieJar { diff --git a/src/DomCrawler/Crawler.php b/src/DomCrawler/Crawler.php index 06204336..1a435a29 100644 --- a/src/DomCrawler/Crawler.php +++ b/src/DomCrawler/Crawler.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -24,7 +24,7 @@ use Symfony\Component\Panther\ExceptionThrower; /** - * @author Kévin Dunglas + * @author Kévin Dunglas */ final class Crawler extends BaseCrawler implements WebDriverElement { diff --git a/src/DomCrawler/Field/ChoiceFormField.php b/src/DomCrawler/Field/ChoiceFormField.php index 0f456059..a750c5e4 100644 --- a/src/DomCrawler/Field/ChoiceFormField.php +++ b/src/DomCrawler/Field/ChoiceFormField.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -21,7 +21,7 @@ use Symfony\Component\Panther\WebDriver\WebDriverCheckbox; /** - * @author Kévin Dunglas + * @author Kévin Dunglas */ final class ChoiceFormField extends BaseChoiceFormField { diff --git a/src/DomCrawler/Field/FileFormField.php b/src/DomCrawler/Field/FileFormField.php index ac948476..17f74d74 100644 --- a/src/DomCrawler/Field/FileFormField.php +++ b/src/DomCrawler/Field/FileFormField.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/DomCrawler/Field/FormFieldTrait.php b/src/DomCrawler/Field/FormFieldTrait.php index f7a3ed25..9d82c8db 100644 --- a/src/DomCrawler/Field/FormFieldTrait.php +++ b/src/DomCrawler/Field/FormFieldTrait.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -20,7 +20,7 @@ /** * @internal * - * @author Kévin Dunglas + * @author Kévin Dunglas */ trait FormFieldTrait { diff --git a/src/DomCrawler/Field/InputFormField.php b/src/DomCrawler/Field/InputFormField.php index 5da1f6ef..a68e1d74 100644 --- a/src/DomCrawler/Field/InputFormField.php +++ b/src/DomCrawler/Field/InputFormField.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -17,7 +17,7 @@ use Symfony\Component\Panther\Exception\LogicException; /** - * @author Kévin Dunglas + * @author Kévin Dunglas */ final class InputFormField extends BaseInputFormField { diff --git a/src/DomCrawler/Field/TextareaFormField.php b/src/DomCrawler/Field/TextareaFormField.php index 715d3b24..a2fa2999 100644 --- a/src/DomCrawler/Field/TextareaFormField.php +++ b/src/DomCrawler/Field/TextareaFormField.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -17,7 +17,7 @@ use Symfony\Component\Panther\Exception\LogicException; /** - * @author Kévin Dunglas + * @author Kévin Dunglas */ final class TextareaFormField extends BaseTextareaFormField { diff --git a/src/DomCrawler/Form.php b/src/DomCrawler/Form.php index d66647e8..e7ab9288 100644 --- a/src/DomCrawler/Form.php +++ b/src/DomCrawler/Form.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -33,7 +33,7 @@ use Symfony\Component\Panther\WebDriver\WebDriverCheckbox; /** - * @author Kévin Dunglas + * @author Kévin Dunglas */ final class Form extends BaseForm { diff --git a/src/DomCrawler/Image.php b/src/DomCrawler/Image.php index c88ad40e..5cca8862 100644 --- a/src/DomCrawler/Image.php +++ b/src/DomCrawler/Image.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -19,7 +19,7 @@ use Symfony\Component\Panther\ExceptionThrower; /** - * @author Kévin Dunglas + * @author Kévin Dunglas */ final class Image extends BaseImage { diff --git a/src/DomCrawler/Link.php b/src/DomCrawler/Link.php index 78cdc328..d741f7ed 100644 --- a/src/DomCrawler/Link.php +++ b/src/DomCrawler/Link.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -19,7 +19,7 @@ use Symfony\Component\Panther\ExceptionThrower; /** - * @author Kévin Dunglas + * @author Kévin Dunglas */ final class Link extends BaseLink { diff --git a/src/Exception/ExceptionInterface.php b/src/Exception/ExceptionInterface.php index 3bbe2830..24745995 100644 --- a/src/Exception/ExceptionInterface.php +++ b/src/Exception/ExceptionInterface.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/InvalidArgumentException.php b/src/Exception/InvalidArgumentException.php index b1843a07..d55044c2 100644 --- a/src/Exception/InvalidArgumentException.php +++ b/src/Exception/InvalidArgumentException.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/LogicException.php b/src/Exception/LogicException.php index f5ff4760..99f783f6 100644 --- a/src/Exception/LogicException.php +++ b/src/Exception/LogicException.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/RuntimeException.php b/src/Exception/RuntimeException.php index d75d3260..4481dbc9 100644 --- a/src/Exception/RuntimeException.php +++ b/src/Exception/RuntimeException.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ExceptionThrower.php b/src/ExceptionThrower.php index d13069cb..ff579e97 100644 --- a/src/ExceptionThrower.php +++ b/src/ExceptionThrower.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -16,7 +16,7 @@ /** * @internal * - * @author Kévin Dunglas + * @author Kévin Dunglas */ trait ExceptionThrower { diff --git a/src/PantherTestCase.php b/src/PantherTestCase.php index 7bf9d0ca..7cc4cb35 100644 --- a/src/PantherTestCase.php +++ b/src/PantherTestCase.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/PantherTestCaseTrait.php b/src/PantherTestCaseTrait.php index 886d74f9..aaacc517 100644 --- a/src/PantherTestCaseTrait.php +++ b/src/PantherTestCaseTrait.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -26,7 +26,7 @@ /** * Eases conditional class definition. * - * @author Kévin Dunglas + * @author Kévin Dunglas */ trait PantherTestCaseTrait { diff --git a/src/ProcessManager/BrowserManagerInterface.php b/src/ProcessManager/BrowserManagerInterface.php index bf6287b1..acbb9ab9 100644 --- a/src/ProcessManager/BrowserManagerInterface.php +++ b/src/ProcessManager/BrowserManagerInterface.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -19,7 +19,7 @@ /** * A browser manager (for instance using ChromeDriver or GeckoDriver). * - * @author Kévin Dunglas + * @author Kévin Dunglas */ interface BrowserManagerInterface { diff --git a/src/ProcessManager/ChromeManager.php b/src/ProcessManager/ChromeManager.php index 69a9707e..aefb907e 100644 --- a/src/ProcessManager/ChromeManager.php +++ b/src/ProcessManager/ChromeManager.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -22,7 +22,7 @@ use Symfony\Component\Process\Process; /** - * @author Kévin Dunglas + * @author Kévin Dunglas */ final class ChromeManager implements BrowserManagerInterface { diff --git a/src/ProcessManager/FirefoxManager.php b/src/ProcessManager/FirefoxManager.php index 020267fa..065a7288 100644 --- a/src/ProcessManager/FirefoxManager.php +++ b/src/ProcessManager/FirefoxManager.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -22,7 +22,7 @@ use Symfony\Component\Process\Process; /** - * @author Kévin Dunglas + * @author Kévin Dunglas */ final class FirefoxManager implements BrowserManagerInterface { diff --git a/src/ProcessManager/SeleniumManager.php b/src/ProcessManager/SeleniumManager.php index 77e49e66..e51c7519 100644 --- a/src/ProcessManager/SeleniumManager.php +++ b/src/ProcessManager/SeleniumManager.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ProcessManager/WebServerManager.php b/src/ProcessManager/WebServerManager.php index 9000a0ec..5d777c91 100644 --- a/src/ProcessManager/WebServerManager.php +++ b/src/ProcessManager/WebServerManager.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -18,7 +18,7 @@ use Symfony\Component\Process\Process; /** - * @author Kévin Dunglas + * @author Kévin Dunglas */ final class WebServerManager { diff --git a/src/ProcessManager/WebServerReadinessProbeTrait.php b/src/ProcessManager/WebServerReadinessProbeTrait.php index 668a0a8d..24ee602b 100644 --- a/src/ProcessManager/WebServerReadinessProbeTrait.php +++ b/src/ProcessManager/WebServerReadinessProbeTrait.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -21,7 +21,7 @@ /** * @internal * - * @author Kévin Dunglas + * @author Kévin Dunglas */ trait WebServerReadinessProbeTrait { diff --git a/src/ServerExtension.php b/src/ServerExtension.php index c53f3da2..d9e7f556 100644 --- a/src/ServerExtension.php +++ b/src/ServerExtension.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ServerExtensionLegacy.php b/src/ServerExtensionLegacy.php index 7088365c..7708f2cd 100644 --- a/src/ServerExtensionLegacy.php +++ b/src/ServerExtensionLegacy.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ServerTrait.php b/src/ServerTrait.php index 15967732..feaf12d6 100644 --- a/src/ServerTrait.php +++ b/src/ServerTrait.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/WebDriver/PantherWebDriverExpectedCondition.php b/src/WebDriver/PantherWebDriverExpectedCondition.php index a807665c..4702d15a 100644 --- a/src/WebDriver/PantherWebDriverExpectedCondition.php +++ b/src/WebDriver/PantherWebDriverExpectedCondition.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/WebDriver/WebDriverCheckbox.php b/src/WebDriver/WebDriverCheckbox.php index 80a622af..e59573d1 100644 --- a/src/WebDriver/WebDriverCheckbox.php +++ b/src/WebDriver/WebDriverCheckbox.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -27,7 +27,7 @@ * * This class has been proposed to php-webdriver/php-webdriver and will be deleted from this project when it will me merged. * - * @author Kévin Dunglas + * @author Kévin Dunglas * * @internal * diff --git a/src/WebDriver/WebDriverMouse.php b/src/WebDriver/WebDriverMouse.php index f9cd7a58..01b44705 100644 --- a/src/WebDriver/WebDriverMouse.php +++ b/src/WebDriver/WebDriverMouse.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/WebTestAssertionsTrait.php b/src/WebTestAssertionsTrait.php index d66e46f9..fa3dc343 100644 --- a/src/WebTestAssertionsTrait.php +++ b/src/WebTestAssertionsTrait.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,7 +23,7 @@ /** * Tweaks Symfony's WebTestAssertionsTrait to be compatible with Panther. * - * @author Kévin Dunglas + * @author Kévin Dunglas */ trait WebTestAssertionsTrait { diff --git a/tests/AssertionsTest.php b/tests/AssertionsTest.php index 65ee6da1..231e3b16 100644 --- a/tests/AssertionsTest.php +++ b/tests/AssertionsTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/ClientTest.php b/tests/ClientTest.php index e65cef1a..eb58e59f 100644 --- a/tests/ClientTest.php +++ b/tests/ClientTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -34,7 +34,7 @@ use Symfony\Contracts\HttpClient\HttpClientInterface; /** - * @author Kévin Dunglas + * @author Kévin Dunglas */ class ClientTest extends TestCase { @@ -572,11 +572,11 @@ public function testCreateHttpBrowserClientWithHttpClientOptions(): void ], ]); - ($httpClientRef = new \ReflectionProperty($client, 'client'))->setAccessible(true); + ($httpClientRef = new \ReflectionProperty($client, 'client')); /** @var HttpClientInterface $httpClient */ $httpClient = $httpClientRef->getValue($client); - ($httpClientOptionsRef = new \ReflectionProperty($httpClient, 'defaultOptions'))->setAccessible(true); + ($httpClientOptionsRef = new \ReflectionProperty($httpClient, 'defaultOptions')); $httpClientOptions = $httpClientOptionsRef->getValue($httpClient); $this->assertSame('foo:bar', $httpClientOptions['auth_basic']); diff --git a/tests/DomCrawler/CrawlerTest.php b/tests/DomCrawler/CrawlerTest.php index 0347357c..5932e733 100644 --- a/tests/DomCrawler/CrawlerTest.php +++ b/tests/DomCrawler/CrawlerTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -23,7 +23,7 @@ use Symfony\Component\Panther\Tests\TestCase; /** - * @author Kévin Dunglas + * @author Kévin Dunglas */ class CrawlerTest extends TestCase { diff --git a/tests/DomCrawler/Field/ChoiceFormFieldTest.php b/tests/DomCrawler/Field/ChoiceFormFieldTest.php index 2aa39d7d..caa84f19 100644 --- a/tests/DomCrawler/Field/ChoiceFormFieldTest.php +++ b/tests/DomCrawler/Field/ChoiceFormFieldTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/DomCrawler/Field/EmailInputFormFieldTest.php b/tests/DomCrawler/Field/EmailInputFormFieldTest.php index c14f1812..4e2dc84a 100644 --- a/tests/DomCrawler/Field/EmailInputFormFieldTest.php +++ b/tests/DomCrawler/Field/EmailInputFormFieldTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/DomCrawler/Field/FileFormFieldTest.php b/tests/DomCrawler/Field/FileFormFieldTest.php index 7e4ad01b..f6d12051 100644 --- a/tests/DomCrawler/Field/FileFormFieldTest.php +++ b/tests/DomCrawler/Field/FileFormFieldTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/DomCrawler/Field/InputFormFieldTest.php b/tests/DomCrawler/Field/InputFormFieldTest.php index b548f82c..cbe76a02 100644 --- a/tests/DomCrawler/Field/InputFormFieldTest.php +++ b/tests/DomCrawler/Field/InputFormFieldTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/DomCrawler/Field/NumberInputFormFieldTest.php b/tests/DomCrawler/Field/NumberInputFormFieldTest.php index 3e96a754..43296f8f 100644 --- a/tests/DomCrawler/Field/NumberInputFormFieldTest.php +++ b/tests/DomCrawler/Field/NumberInputFormFieldTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/DomCrawler/Field/TextareaFormFieldTest.php b/tests/DomCrawler/Field/TextareaFormFieldTest.php index 101a879f..fa27a22a 100644 --- a/tests/DomCrawler/Field/TextareaFormFieldTest.php +++ b/tests/DomCrawler/Field/TextareaFormFieldTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/DomCrawler/FormTest.php b/tests/DomCrawler/FormTest.php index b4ba3db4..2a07597c 100644 --- a/tests/DomCrawler/FormTest.php +++ b/tests/DomCrawler/FormTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -17,7 +17,7 @@ use Symfony\Component\Panther\Tests\TestCase; /** - * @author Kévin Dunglas + * @author Kévin Dunglas */ class FormTest extends TestCase { diff --git a/tests/DummyKernel.php b/tests/DummyKernel.php index a0ebb123..36eb8a34 100644 --- a/tests/DummyKernel.php +++ b/tests/DummyKernel.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -22,7 +22,7 @@ use Symfony\Component\HttpKernel\KernelInterface; /** - * @author Kévin Dunglas + * @author Kévin Dunglas */ class DummyKernel implements KernelInterface { diff --git a/tests/FutureAssertionsTest.php b/tests/FutureAssertionsTest.php index 93a21348..ec0eea3c 100644 --- a/tests/FutureAssertionsTest.php +++ b/tests/FutureAssertionsTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/MultiClientsTest.php b/tests/MultiClientsTest.php index d3162b1f..0099e1e2 100644 --- a/tests/MultiClientsTest.php +++ b/tests/MultiClientsTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/ProcessManager/ChromeManagerTest.php b/tests/ProcessManager/ChromeManagerTest.php index 5d89128a..7d550166 100644 --- a/tests/ProcessManager/ChromeManagerTest.php +++ b/tests/ProcessManager/ChromeManagerTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -18,7 +18,7 @@ use Symfony\Component\Panther\ProcessManager\ChromeManager; /** - * @author Kévin Dunglas + * @author Kévin Dunglas */ class ChromeManagerTest extends TestCase { diff --git a/tests/ProcessManager/SeleniumManagerTest.php b/tests/ProcessManager/SeleniumManagerTest.php index 47bc439b..4bc66a1c 100644 --- a/tests/ProcessManager/SeleniumManagerTest.php +++ b/tests/ProcessManager/SeleniumManagerTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/ProcessManager/WebServerManagerTest.php b/tests/ProcessManager/WebServerManagerTest.php index 961e1091..27c53901 100644 --- a/tests/ProcessManager/WebServerManagerTest.php +++ b/tests/ProcessManager/WebServerManagerTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -18,7 +18,7 @@ use Symfony\Component\Panther\Tests\TestCase; /** - * @author Kévin Dunglas + * @author Kévin Dunglas */ class WebServerManagerTest extends TestCase { diff --git a/tests/ScreenshotTest.php b/tests/ScreenshotTest.php index aa2cd86f..2067d930 100644 --- a/tests/ScreenshotTest.php +++ b/tests/ScreenshotTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/ServerExtensionTest.php b/tests/ServerExtensionTest.php index a5c9db00..ad5f4593 100644 --- a/tests/ServerExtensionTest.php +++ b/tests/ServerExtensionTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/TestCase.php b/tests/TestCase.php index d59d043f..5075b538 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -19,7 +19,7 @@ use Symfony\Component\Panther\PantherTestCase; /** - * @author Kévin Dunglas + * @author Kévin Dunglas */ abstract class TestCase extends PantherTestCase { diff --git a/tests/WebDriver/WebDriverCheckBoxTest.php b/tests/WebDriver/WebDriverCheckBoxTest.php index d3e1eecf..2d1d8ac4 100644 --- a/tests/WebDriver/WebDriverCheckBoxTest.php +++ b/tests/WebDriver/WebDriverCheckBoxTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -19,7 +19,7 @@ use Symfony\Component\Panther\WebDriver\WebDriverCheckbox; /** - * @author Kévin Dunglas + * @author Kévin Dunglas */ class WebDriverCheckBoxTest extends TestCase { diff --git a/tests/WebDriver/WebDriverMouseTest.php b/tests/WebDriver/WebDriverMouseTest.php index f31fbe36..5c47f4e5 100644 --- a/tests/WebDriver/WebDriverMouseTest.php +++ b/tests/WebDriver/WebDriverMouseTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/fixtures/cookie.php b/tests/fixtures/cookie.php index 5abdd279..29eb0357 100644 --- a/tests/fixtures/cookie.php +++ b/tests/fixtures/cookie.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/fixtures/env.php b/tests/fixtures/env.php index fc7f06a0..6fd2b77a 100644 --- a/tests/fixtures/env.php +++ b/tests/fixtures/env.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/fixtures/index.php b/tests/fixtures/index.php index 36e8ee13..fe0ceaca 100644 --- a/tests/fixtures/index.php +++ b/tests/fixtures/index.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/fixtures/security-check.php b/tests/fixtures/security-check.php index ed470646..51c16063 100644 --- a/tests/fixtures/security-check.php +++ b/tests/fixtures/security-check.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/fixtures/ua.php b/tests/fixtures/ua.php index 6d49fa83..65030177 100644 --- a/tests/fixtures/ua.php +++ b/tests/fixtures/ua.php @@ -3,7 +3,7 @@ /* * This file is part of the Panther project. * - * (c) Kévin Dunglas + * (c) Kévin Dunglas * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. From cc8863d789dd8f88054c040f14a5eb8ec63d5386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Fri, 21 Nov 2025 14:55:17 +0100 Subject: [PATCH 3/4] fix --- tests/ClientTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ClientTest.php b/tests/ClientTest.php index eb58e59f..19e981ca 100644 --- a/tests/ClientTest.php +++ b/tests/ClientTest.php @@ -572,11 +572,11 @@ public function testCreateHttpBrowserClientWithHttpClientOptions(): void ], ]); - ($httpClientRef = new \ReflectionProperty($client, 'client')); + $httpClientRef = new \ReflectionProperty($client, 'client'); /** @var HttpClientInterface $httpClient */ $httpClient = $httpClientRef->getValue($client); - ($httpClientOptionsRef = new \ReflectionProperty($httpClient, 'defaultOptions')); + $httpClientOptionsRef = new \ReflectionProperty($httpClient, 'defaultOptions'); $httpClientOptions = $httpClientOptionsRef->getValue($httpClient); $this->assertSame('foo:bar', $httpClientOptions['auth_basic']); From 52857824450efe741ede50ab9fbd9d418713972d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Fri, 21 Nov 2025 14:56:41 +0100 Subject: [PATCH 4/4] simplify --- tests/ClientTest.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/ClientTest.php b/tests/ClientTest.php index 19e981ca..3096212d 100644 --- a/tests/ClientTest.php +++ b/tests/ClientTest.php @@ -572,12 +572,10 @@ public function testCreateHttpBrowserClientWithHttpClientOptions(): void ], ]); - $httpClientRef = new \ReflectionProperty($client, 'client'); /** @var HttpClientInterface $httpClient */ - $httpClient = $httpClientRef->getValue($client); + $httpClient = (new \ReflectionProperty($client, 'client'))->getValue($client); - $httpClientOptionsRef = new \ReflectionProperty($httpClient, 'defaultOptions'); - $httpClientOptions = $httpClientOptionsRef->getValue($httpClient); + $httpClientOptions = (new \ReflectionProperty($httpClient, 'defaultOptions'))->getValue($httpClient); $this->assertSame('foo:bar', $httpClientOptions['auth_basic']); $this->assertSame($closure, $httpClientOptions['on_progress']);