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

PHP 8 compatibility #16429

Closed
ibennetch opened this issue Oct 22, 2020 · 13 comments · Fixed by #16596
Closed

PHP 8 compatibility #16429

ibennetch opened this issue Oct 22, 2020 · 13 comments · Fixed by #16596
Assignees
Labels
waiting on upstream Issues blocked by a third-party
Projects
Milestone

Comments

@ibennetch
Copy link
Member

When using PHP 8.0.0rc1 provided by the Sury repository, I get the following message when running composer update:

    - php-webdriver/webdriver 1.8.3 requires php ^5.6 || ~7.0 -> your PHP version (8.0.0rc1) does not satisfy that requirement.
    - php-webdriver/webdriver 1.8.2 requires php ^5.6 || ~7.0 -> your PHP version (8.0.0rc1) does not satisfy that requirement.
    - php-webdriver/webdriver 1.8.1 requires php ^5.6 || ~7.0 -> your PHP version (8.0.0rc1) does not satisfy that requirement.
    - php-webdriver/webdriver 1.8.0 requires php ^5.6 || ~7.0 -> your PHP version (8.0.0rc1) does not satisfy that requirement.
    - php-webdriver/webdriver 1.8.3 requires php ^5.6 || ~7.0 -> your PHP version (8.0.0rc1) does not satisfy that requirement.
    - Installation request for php-webdriver/webdriver ^1.8 -> satisfiable by php-webdriver/webdriver[1.8.0, 1.8.1, 1.8.2, 1.8.3].
@ibennetch
Copy link
Member Author

ibennetch commented Oct 22, 2020

Looks like some of our developers are already trying to get this resolved :) php-webdriver/php-webdriver#826

@williamdes williamdes changed the title webdriver PHP 8 composer requirements PHP 8 compatibility Oct 22, 2020
@williamdes
Copy link
Member

I renamed this issue to have a central point to track php 8 compatibility issues.

@williamdes
Copy link
Member

Here is one for tcpdf: tecnickcom/TCPDF#222

@williamdes williamdes added the waiting on upstream Issues blocked by a third-party label Oct 22, 2020
@ibennetch
Copy link
Member Author

Maybe we should make a new project for PHP 8 compatibility problems?

@williamdes
Copy link
Member

Maybe we should make a new project for PHP 8 compatibility problems?

One column on the issues board seems a better idea, else the project will be forgotten and empty ;)
Good suggestion

@williamdes williamdes added this to Needs triage in issues via automation Oct 22, 2020
@williamdes williamdes moved this from Needs triage to Waiting on upstream in issues Oct 22, 2020
@williamdes williamdes moved this from Waiting on upstream to PHP 8 in issues Oct 22, 2020
@williamdes
Copy link
Member

Here it is: https://github.com/phpmyadmin/phpmyadmin/projects/7#column-11361204

This issue related to #16268

@williamdes
Copy link
Member

williamdes commented Nov 19, 2020

1) PhpMyAdmin\Tests\Engines\PbxtTest::testResolveTypeSize with data set #2 ('A4', array('0', 'B'))
TypeError: Unsupported operand types: string / int

libraries/classes/Util.php:528
libraries/classes/Engines/Pbxt.php:156
test/classes/Engines/PbxtTest.php:175
vendor/phpunit/phpunit/phpunit:61

2) PhpMyAdmin\Tests\HeaderTest::testEnable
Undefined array key "Servers"

libraries/classes/Navigation/Navigation.php:96
libraries/classes/Header.php:433
test/classes/HeaderTest.php:65
vendor/phpunit/phpunit/phpunit:61

3) PhpMyAdmin\Tests\HeaderTest::testSetBodyId
Undefined array key "Servers"

libraries/classes/Navigation/Navigation.php:96
libraries/classes/Header.php:433
test/classes/HeaderTest.php:78
vendor/phpunit/phpunit/phpunit:61
--

There were 2 failures:

1) PhpMyAdmin\Tests\Gis\GisMultiPointTest::testPrepareRowAsSvg with data set #0 ('MULTIPOINT(12 35,48 75,69 23,...35 78)', 'svg', '#B02EE0', array(12, 69, 2, 150), '/^(<circle cx="72" cy="138" r...\/>)$/')
Failed asserting that 0 matches expected 1.

test/classes/Gis/GisMultiPointTest.php:302
vendor/phpunit/phpunit/phpunit:61

2) PhpMyAdmin\Tests\Gis\GisPointTest::testPrepareRowAsSvg with data set #0 ('POINT(12 35)', 'svg', '#B02EE0', array(12, 69, 2, 150), '')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-''
+'<circle cx="0" cy="218" r="3" name="svg" id="svg1737950962" class="point vector" fill="white" stroke="#B02EE0" stroke-width="2"/>'

test/classes/Gis/GisPointTest.php:314
vendor/phpunit/phpunit/phpunit:61

--

issues automation moved this from PHP 8 to Closed Nov 19, 2020
@williamdes williamdes reopened this Nov 19, 2020
issues automation moved this from Closed to Needs triage Nov 19, 2020
@williamdes williamdes moved this from Needs triage to High priority in issues Nov 19, 2020
williamdes added a commit that referenced this issue Nov 19, 2020
47) PhpMyAdmin\Tests\Setup\ConfigGeneratorTest::testGetConfigFile
TypeError: preg_replace(): Argument #3 ($subject) must be of type array|string, int given

libraries/classes/Setup/ConfigGenerator.php:61
test/classes/Setup/ConfigGeneratorTest.php:55
vendor/phpunit/phpunit/phpunit:61

Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Nov 19, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Nov 19, 2020
… / int

1) PhpMyAdmin\Tests\Engines\PbxtTest::testResolveTypeSize with data set #2 ('A4', array('0', 'B'))
TypeError: Unsupported operand types: string / int

libraries/classes/Util.php:528
libraries/classes/Engines/Pbxt.php:156
test/classes/Engines/PbxtTest.php:175
vendor/phpunit/phpunit/phpunit:61

Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Dec 12, 2020
Cherry-pick: e4bd8b5
Cherry-pick: b826234

Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Dec 12, 2020
… / int

Cherry-pick: d402c0f

Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Dec 12, 2020
47) PhpMyAdmin\Tests\Setup\ConfigGeneratorTest::testGetConfigFile
TypeError: preg_replace(): Argument #3 ($subject) must be of type array|string, int given

libraries/classes/Setup/ConfigGenerator.php:61
test/classes/Setup/ConfigGeneratorTest.php:55
vendor/phpunit/phpunit/phpunit:61
Cherry-pick: cd3a0e4
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Dec 12, 2020
Cherry-pick: 2df5ce0

Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Dec 12, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit to williamdes/phpmyadmintest that referenced this issue Jan 26, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Jan 28, 2021
Diff: tecnickcom/TCPDF@6.3.5...456b794

Pull-request: #16596
Fixes: #16429

Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Jan 28, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from High priority to Closed Jan 28, 2021
@williamdes williamdes self-assigned this Jan 28, 2021
@williamdes williamdes added this to the 5.1.0 milestone Jan 28, 2021
@williamdes williamdes linked a pull request Jan 28, 2021 that will close this issue
@JohnRDOrazio
Copy link

JohnRDOrazio commented Mar 15, 2021

now that PHP 8 compatibility has been fixed in php-webdriver 1.9.0 and 1.10.0, can the requirement in composer.json please be bumped now to "php-webdriver/webdriver": "^1.10",. I had to do this manually in order for composer update to succeed with PHP 8.

@williamdes
Copy link
Member

now that PHP 8 compatibility has been fixed in php-webdriver 1.9.0 and 1.10.0, can the requirement in composer.json please be bumped now to "php-webdriver/webdriver": "^1.10",. I had to do this manually in order for composer update --no-dev to succeed with PHP 8.

I do not see where this does make sense, what branch are you using ?
Are you up to date ?

@JohnRDOrazio
Copy link

JohnRDOrazio commented May 3, 2021

I am using the master branch. The composer.json on master has a "caret version range" on webdriver:

"php-webdriver/webdriver": "^1.8",

Running a composer update under PHP 8 I was getting the errors indicated in this issue:

When using PHP 8.0.0rc1 provided by the Sury repository, I get the following message when running composer update:

    - php-webdriver/webdriver 1.8.3 requires php ^5.6 || ~7.0 -> your PHP version (8.0.0rc1) does not satisfy that requirement.
    - php-webdriver/webdriver 1.8.2 requires php ^5.6 || ~7.0 -> your PHP version (8.0.0rc1) does not satisfy that requirement.
    - php-webdriver/webdriver 1.8.1 requires php ^5.6 || ~7.0 -> your PHP version (8.0.0rc1) does not satisfy that requirement.
    - php-webdriver/webdriver 1.8.0 requires php ^5.6 || ~7.0 -> your PHP version (8.0.0rc1) does not satisfy that requirement.
    - php-webdriver/webdriver 1.8.3 requires php ^5.6 || ~7.0 -> your PHP version (8.0.0rc1) does not satisfy that requirement.
    - Installation request for php-webdriver/webdriver ^1.8 -> satisfiable by php-webdriver/webdriver[1.8.0, 1.8.1, 1.8.2, 1.8.3].

And I see that there has been a fix in webdriver in the meantime: #16429 (comment)

Looks like some of our developers are already trying to get this resolved :) php-webdriver/php-webdriver#826

The fix in webdriver is announced here: php-webdriver/php-webdriver#828 (comment)

I manually bumped the version of webdriver in composer.json to "php-webdriver/webdriver": "^1.10".

I was then able to run composer update successfully without errors.

williamdes added a commit that referenced this issue May 28, 2021
Ref: #16429
Signed-off-by: William Desportes <williamdes@wdes.fr>
@williamdes
Copy link
Member

I pushed a commit for that: 8529c01

But for me it makes no sense at all, maybe you can let me know why you need this ?
Since composer update is the command everyone runs (in dev mode) 🤔

@JohnRDOrazio
Copy link

I pushed a commit for that: 8529c01

But for me it makes no sense at all, maybe you can let me know why you need this ?
Since composer update is the command everyone runs (in dev mode) 🤔

I'm not sure I understand. Are you saying nobody else has errors, when issuing composer update under PHP 8, with a composer.json requirement for 'webdriver: ^1.8'?
Or maybe I understand, that this wouldn't be necessary to simply install with a composer update --no-dev, as the webdriver won't be installed anyway with --no-dev. Well, I'm not not going to make a big deal out of this issue because I don't actually do development (so far anyways) on the PhpMyAdmin repository, but it will prevent errors for anyone running a simple composer update, so I wouldn't be too picky about bumping the version because it can only help. If there's no harm done, there's only benefits to avoiding errors in any case...

@williamdes
Copy link
Member

I'm not sure I understand. Are you saying nobody else has errors, when issuing composer update under PHP 8, with a composer.json requirement for 'webdriver: ^1.8'?

Exactly, because it updates to the latest version. Nobody else had this error while updating 🤔

composer update --no-dev

Sure, this is the right command to run in production. Devs can just use composer update

so I wouldn't be too picky about bumping the version because it can only help. If there's no harm done, there's only benefits to avoiding errors in any case...

Sure, this will help because if someone used the prefer lowest option of composer I think the error would then be accurate

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
waiting on upstream Issues blocked by a third-party
Projects
issues
  
Closed
Development

Successfully merging a pull request may close this issue.

3 participants