Problem/Motivation

Using composer to update core to 10.6.1 produces error:

Gathering patches for root package.
No patches supplied.
Gathering patches for dependencies. This might take a minute.
  - Installing drupal/core (10.6.1): Extracting archive
  - Installing drupal/ds (3.32.0): Extracting archive
  - Installing drupal/entity_reference_revisions (1.13.0): Extracting archive
  - Applying patches for drupal/core
    https://www.drupal.org/files/issues/2025-07-02/refactor-ImageStyleDownloadController-so-derivatives-can-be-generated-by-contrib-modules-2685905-50.patch (Refactor ImageStyleDownloadController)

In StreamContextFactory.php line 56:

  [TypeError]
  stream_context_create(): Argument #1 ($options) must be an array with valid callbacks as values
  , cannot access protected method Composer\Util\RemoteFilesystem::callbackGet()


Exception trace:
  at phar:///usr/local/bin/composer/src/Composer/Util/StreamContextFactory.php:56
 stream_context_create() at phar:///usr/local/bin/composer/src/Composer/Util/StreamContextFactory.php:56
 Composer\Util\StreamContextFactory::getContext() at phar:///usr/local/bin/composer/src/Composer/Util/RemoteFilesystem.php:274
 Composer\Util\RemoteFilesystem->get() at phar:///usr/local/bin/composer/src/Composer/Util/RemoteFilesystem.php:107
 Composer\Util\RemoteFilesystem->copy() at /data/disk/fast2/static/drutopia2-1/vendor/cweagans/composer-patches/src/Patches.php:388
 cweagans\Composer\Patches->getAndApplyPatch() at /data/disk/fast2/static/drutopia2-1/vendor/cweagans/composer-patches/src/Patches.php:324
 cweagans\Composer\Patches->postInstall() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:220
 Composer\EventDispatcher\EventDispatcher->doDispatch() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:150
 Composer\EventDispatcher\EventDispatcher->dispatchPackageEvent() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:399
 Composer\Installer\InstallationManager::{closure:Composer\Installer\InstallationManager::executeBatch():398}() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:414
 Composer\Installer\InstallationManager->executeBatch() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:322
 Composer\Installer\InstallationManager->downloadAndExecuteBatch() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:221
 Composer\Installer\InstallationManager->execute() at phar:///usr/local/bin/composer/src/Composer/Installer.php:839
 Composer\Installer->doInstall() at phar:///usr/local/bin/composer/src/Composer/Installer.php:649
 Composer\Installer->doUpdate() at phar:///usr/local/bin/composer/src/Composer/Installer.php:298
 Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/UpdateCommand.php:281
 Composer\Command\UpdateCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:298
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:1040
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:301
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:396
 Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:136
 Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:93
 require() at /usr/local/bin/composer:29

Steps to reproduce

Use composer to update - core updates to 10.6.1 with error:

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Comments

em-fast1 created an issue. See original summary.

cilefen’s picture

Component: base system » composer
Category: Bug report » Support request
Issue summary: View changes
Issue tags: -10.6.1, -Refactor ImageStyleDownloadController, -refactor-ImageStyleDownloadController-so-derivatives-can-be-generated-by-contrib-modules-2685905-50.patch

With any command failure it’s important to know the command you typed. Add that to the summary.

What is the PHP version and the Composer version?

I am making this a support request pending bug reproduction.

It’s possible the patch itself is to blame but let’s get more information.

cilefen’s picture

Issue tags: +Possible duplicate

Actually I think it’s likely the patch itself breaks something in Drupal, which will make this a duplicate of #2685905: Refactor ImageStyleDownloadController so derivatives can be generated by contrib modules.

quietone’s picture

Status: Active » Fixed

I agree with @cilefen on this. This is trying to download an untested patch from an issue that is current at Needs Work. Effort should be on that issue to fix the problem.

I am closing this per the guidance in Handle or refer a support request in an issue.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.