Problem/Motivation

Our \Drupal\FunctionalJavascriptTests\DrupalSelenium2Driver::uploadFileAndGetRemoteFilePath() copies \Drupal\Core\Php8\Behat\MinkSelenium2Driver\Selenium2Driver::uploadFile() and has the same problem as https://github.com/minkphp/MinkSelenium2Driver/pull/320

Proposed resolution

Switch to using \ZipArchive::OVERWRITE

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

N/a

CommentFileSizeAuthor
#2 3174038-2.patch757 bytesalexpott
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Gábor Hojtsy’s picture

Hm, that's odd. What else would you have when you are creating it but an empty archive?

Status: Needs review » Needs work

The last submitted patch, 2: 3174038-2.patch, failed testing. View results

alexpott’s picture

Status: Needs work » Needs review

I think this is the result of upstream changes in the zip library php is using. Anyhow code that used to create an empty file and then open it with a \ZipArchive::CREATE flag is triggering a deprecation. I think the new behaviour is actually consistent. You're telling ZipArchive to create a file but a file is already there.

Gábor Hojtsy’s picture

True, the file would of course already be created by tempnam(). The change makes sense. And the fail was a random one. Awaiting this pass now :)

Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +PHP 8.0

  • catch committed 2d8c912 on 9.1.x
    Issue #3174038 by alexpott, Gábor Hojtsy: ZipArchive::open(): Using...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed 2d8c912 and pushed to 9.1.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.