Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

PHP 8 support #429

Closed
goba opened this issue Oct 13, 2020 · 10 comments · Fixed by #430
Closed

PHP 8 support #429

goba opened this issue Oct 13, 2020 · 10 comments · Fixed by #430

Comments

@goba
Copy link

goba commented Oct 13, 2020

Goutte is one of the few Drupal 9.1 dependencies left that does not yet support PHP 8. It would be great to start running CI with PHP 8 to see what needs to be changed.

@fabpot
Copy link
Member

fabpot commented Oct 13, 2020

As Goutte is empty now, I suppose that we are talking about Symfony instead:

namespace Goutte;

use Symfony\Component\BrowserKit\HttpBrowser;

/**
 * @author Fabien Potencier <fabien@symfony.com>
 */
class Client extends HttpBrowser
{
}

@goba
Copy link
Author

goba commented Oct 13, 2020

Hm, Drupal 9.1 depends on fabpot/goutte 3.3.0 indirectly.

$ composer why fabpot/goutte
behat/mink-goutte-driver  v1.2.1  requires  fabpot/goutte (~1.0.4|~2.0|~3.1)  
$ composer why behat/mink-goutte-driver
drupal/drupal  9.1.x-dev  requires (for development)  behat/mink-goutte-driver (^1.2)  

I guess we need to convince behat/mink-goutte-driver then to stop depending on fabpot/goutte?

@fabpot
Copy link
Member

fabpot commented Oct 13, 2020

I can do changes on the latest 3.3 version if that could help; I just need to know what does not work right now to evaluate the amount of work.

@goba
Copy link
Author

goba commented Oct 13, 2020

Looks like the only way to get PHP 8 into the travis file is to use the "master" version. As per https://travis-ci.community/t/php-8-0-missing/10132 it is not yet available as its own version. Others added it as "nightly" also https://github.com/pimcore/pimcore/pull/7096/files

@andypost
Copy link
Contributor

Better to use 'nightly' as it most used within php extensions

@goba
Copy link
Author

goba commented Oct 13, 2020

Alex Pott suggested we look into moving to https://packagist.org/packages/behat/mink-browserkit-driver instead which does not depend on Goutte (and itself is a dependency of behat/mink-goutte-driver already). Looking into that now. If that works out, there is nothing to change with Goutte. Thanks for the quick response @fabpot.

@goba
Copy link
Author

goba commented Oct 13, 2020

Exploring untying Drupal 9.1 from Goutte entirely at https://www.drupal.org/project/drupal/issues/3176655 which sounds like is the best way forward either way.

@fabpot fabpot closed this as completed in f117817 Oct 14, 2020
fabpot added a commit that referenced this issue Oct 14, 2020
This PR was merged into the 4.0-dev branch.

Discussion
----------

Allow use PHP 8

Closes #429

Commits
-------

f117817 Allow use PHP 8
alexpott pushed a commit to alexpott/Goutte that referenced this issue Oct 31, 2020
Closes FriendsOfPHP#429

(cherry picked from commit f117817)
@alexpott
Copy link

@fabpot you wrote

I can do changes on the latest 3.3 version if that could help; I just need to know what does not work right now to evaluate the amount of work.

That would be fantastic. We've run the entire Drupal test suite on PHP 8 using v3 Goutte on PHP 8 and there are no problems. I've run the Goutte v3 test suite locally on PHP 8 and there are no issues either. I've created #432 that hopefully will run PHP 8 tests on something close to the v3 - but there's no v3 branch to target.

@fabpot
Copy link
Member

fabpot commented Nov 1, 2020

v3.3.1 has just been released to "support" PHP 8.

@goba
Copy link
Author

goba commented Nov 1, 2020

@fabpot Thanks a lot! This allows us to cleanly update for PHP 8 compatibility in Drupal 9.1 without the need to do a Goutte major version update or remove Goutte use entirely.

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

Successfully merging a pull request may close this issue.

4 participants