Use new static self in s3 plugin

Created on 8 May 2024, 7 months ago
Updated 13 May 2024, 7 months ago

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.

πŸ› Bug report
Status

Closed: won't fix

Version

3.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands Richard Hoogstad

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024