Skip to content
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

bug: Panther does not work with PHP 8.4 #653

Open
Crovitche-1623 opened this issue Dec 28, 2024 · 2 comments
Open

bug: Panther does not work with PHP 8.4 #653

Crovitche-1623 opened this issue Dec 28, 2024 · 2 comments

Comments

@Crovitche-1623
Copy link

Symfony Panther seems to not work with PHP 8.4. The test that require symfony panther cannot be run because the execution failed mysteriously without any error messages and the server (frankenphp) is closed. There are no logs too. I've tried it under PHP 8.3 and the problem doesn't seem to occur. Do you have any ideas on what I could do or how I could help to contribute?

Related I think: #644

@Miras4207
Copy link

I could run PantherTestCase on PHP 8.4 just fine with both Chrome and Firefox (although not using frankenphp). This is example of a simple test that works in my case:

namespace App\Tests;

use Symfony\Component\Panther\PantherTestCase;

class SimplePantherTest extends PantherTestCase
{
    public function testRequest(string $browser): void
    {
        $client = static::createPantherClient();
        $client->request('GET', '/');

        $this->assertSame(200, $client->getInternalResponse()->getStatusCode());
        $this->assertSelectorExists('body');
    }
}

Are you passing some specific parameters to createPantherClient()?

@Crovitche-1623
Copy link
Author

@Miras4207 Yes, I have a bunch of tests that require Panther. Here is the configuration that is used for all tests :

        return static::createPantherClient(
            options: [
                'external_base_uri' => "https://$hostname/en",
                'browser' => static::CHROME,
            ],
            managerOptions: [
                'chromedriver_arguments' => [
                    '--no-sandbox',
                    '--disable-dev-shm-usage',
                    '--window-size=1920,1080',
                    '--disable-gpu',
                ],
                'capabilities' => [
                    'acceptInsecureCerts' => true,

                    'goog:loggingPrefs' => [
                        'browser' => 'ALL', // calls to console.* methods
                        'performance' => 'ALL', // performance data
                    ],
                ],
            ],
        );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants