Drupal\eca\Service\ExportRecipe::__construct(): Argument #2 ($fileSystem) must be of type Drupal\Core\File\FileSystem

Created on 5 September 2024, 3 months ago
Updated 6 September 2024, 3 months ago

Problem/Motivation

When running database updates after updating to core v10.3.2 and eca v2.0.4 we received the following error.

Could not instantiate Drupal\eca\Drush\Commands\EcaCommands: Drupal\eca\Service\ExportRecipe::__construct(): Argument #2 ($fileSystem) must be of type Drupal\Core\File\FileSystem, Drupal\s3fs\S3fsFileSystemD103 given

On digging in a little, I found that ExportRecipe needs to instantiate against the FileSystemInterface.

πŸ“Œ Task
Status

Needs work

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States edmund.dunn Olympia, WA

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

Comments & Activities

  • Issue created by @edmund.dunn
  • πŸ‡ΊπŸ‡ΈUnited States edmund.dunn Olympia, WA

    Adding a patch. Posting the static patch because using the MR doesn't allow pinning to a specific commit, so anyone can submit pretty much anything and inject it into our codebase IIRC.

  • Status changed to Needs review 3 months ago
  • πŸ‡ΊπŸ‡ΈUnited States edmund.dunn Olympia, WA
  • Status changed to Needs work 3 months ago
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    Thanks for reporting this. But there are a couple of things that need correction:

    • I can't see that being a bug in ECA. There must be something in your installation that interferes with the file_system service, which turns it into S3fsFileSystemD103 that's not an extension of the FileSystem. Yes, using the interface instead may be healing this, but the S3 behaviour is suspicious.
    • Development always works against the latest release, and then we can decide which commits will be back ported. This one certainly will.
    • Patches are a thing of the past. We only work with issue forks and MRs.
    • An off-topic note: using patch files directly from d.o in a local process is strongly discouraged by the DA and nobody guarantees that those file will always be there. You need to download patch files and use them from a local location. In that context, MRs are just as good as you have full control of which file you download. Nobody can change that by an additional commit to the MR.
Production build 0.71.5 2024