Problem/Motivation

In Drupal core the new best practice is to use new static in general. Previously using new static was detected as a security issue.
Currently we had a problem extending the class Drupal\flysystem_s3\Flysystem\S3
Due to the new self usage it is now necessary to write a whole new create method, which in many times will be identical to the parent class version.

Steps to reproduce

Try to extend the S3 class, as a result you will see that an instance of Drupal\flysystem_s3\Flysystem\S3 will always be returned unless you copy paste the create method.

Proposed resolution

Adhere to new Drupal core best practice.

Issue fork flysystem-3446032

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

Richard Hoogstad created an issue. See original summary.

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

richardcapricorn’s picture

Status: Active » Closed (won't fix)

Sorry this needed to be in flysystem_s3

lisa.rae’s picture

@richard_hoogstad if you would be kind enough to open this issue in the flysystem_s3 project, and relate it to this issue, I would very much appreciate that.

watergate’s picture

@lhridley, the issue is already created: https://www.drupal.org/project/flysystem_s3/issues/3446367. We accidentally used the create button in the wrong browser tab. Nothing needs to be done here :)

lisa.rae’s picture