Problem/Motivation

Follow-up to #3177541-17: stream_open() needs to cope with a failure in \Drupal\Core\StreamWrapper\LocalStream::getLocalPath() better
When $path is empty the ($options & STREAM_REPORT_ERRORS) prevents fatal error on PHP 8.0 and keeps the method BC throwing warning.
With PHP 8.0 as minimally required version opening file with empty path should be fatal error

Steps to reproduce

Proposed resolution

throw additionally deprecation message pointing that in D10 this will be fatal

Remaining tasks

agree/patch/review/commit

User interface changes

no

API changes

the method could throw fatal error

Data model changes

no

Release notes snippet

no

CommentFileSizeAuthor
#14 3178994-14.patch825 bytesandypost

Issue fork drupal-3178994

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

andypost created an issue. See original summary.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Spokje made their first commit to this issue’s fork.

spokje’s picture

Version: 9.4.x-dev » 10.0.x-dev
spokje’s picture

Status: Active » Needs review
andypost’s picture

Status: Needs review » Needs work

The MR changing some other file instead of core/lib/Drupal/Core/StreamWrapper/LocalStream.php

@Spokje looks you're mixed with other issue

spokje’s picture

@andypost Sorry for the noise, was indeed mixing up issues :/

andypost’s picture

Status: Needs work » Needs review
Issue tags: +ContributionWeekend2022
StatusFileSize
new825 bytes

I think reverting commit should be enough

Status: Needs review » Needs work

The last submitted patch, 14: 3178994-14.patch, failed testing. View results

catch’s picture

Category: Feature request » Task
andypost’s picture

Still can't get why the test fails, probably private or temporary directory is missing when htaccess is written

andypost’s picture

Version: 10.0.x-dev » 10.1.x-dev

that's no longer requirement for 10.0

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

andypost’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work

Seems to have a kernel failure.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.