Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#2 | 3174038-2.patch | 757 bytes | alexpott |
Comments
Comment #2
alexpottComment #3
Gábor HojtsyHm, that's odd. What else would you have when you are creating it but an empty archive?
Comment #5
alexpottI 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.
Comment #6
Gábor HojtsyTrue, 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 :)
Comment #7
Gábor HojtsyComment #9
catchCommitted 2d8c912 and pushed to 9.1.x. Thanks!