I have installed Open Social with

composer create-project goalgorilla/social_template:dev-master www-dev-opensocial --no-interaction
cd www-dev-opensocial
composer require drush/drush:9.x
vendor/drush/drush/drush site-install social etc. etc.

When I do a
composer update
whether before or after the site install I receive this error:

Fatal error: Uncaught TypeError: Argument 3 passed to DrupalComposer\DrupalScaffold\PrestissimoFileFetcher::__construct() must implement interface Composer\IO\IOInterface, array given, called in /home/account/www-dev-opensocial/vendor/drupal-composer/drupal-scaffold/src/Handler.php on line 116 and defined in /home/account/www-dev-opensocial/vendor/drupal-composer/drupal-scaffold/src/PrestissimoFileFetcher.php:25
Stack trace:
#0 /home/account/www-dev-opensocial/vendor/drupal-composer/drupal-scaffold/src/Handler.php(116): DrupalComposer\DrupalScaffold\PrestissimoFileFetcher->__construct(Object(Composer\Util\RemoteFilesystem), 'http://cgit.dru...', Array, Object(Composer\IO\ConsoleIO), Object(Composer\Config))
#1 /home/account/www-dev-opensocial/vendor/drupal-composer/drupal-scaffold/src/Handler.php(91): DrupalComposer\DrupalScaffold\Handler->downloadScaffold()
#2 /home/account/www-dev-opensocial/vendor/drupal-composer/drupal-scaffold/src/Plugin.php(66): DrupalComposer\DrupalScaffold\Handler->onPostCmdEvent(Object( in /home/account/www-dev-opensocial/vendor/drupal-composer/drupal-scaffold/src/PrestissimoFileFetcher.php on line 25

By the way, how would one do a composer install of the Beta, I couldn't workout the version - whatever I tried I alway received

[InvalidArgumentException]
Could not find package goalgorilla/social_template with version

Comments

karunadave created an issue. See original summary.

ZeppinM’s picture

I have this error too when I update from 1.16 to 1.17.

ZeppinM’s picture

You probably use an old composer version: composer self-update fixed this issue.

karunadave’s picture

Actually before I started this work I had done a composer self-update

Composer version: 1.6.5
PHP version: 7.1.18

karunadave’s picture

Now that we have established the composer version, for the record here is the error again performing these three commands:

composer create-project goalgorilla/social_template:dev-master www-dev-opensocial --no-interaction
cd www-dev-opensocial
composer update
Fatal error: Uncaught TypeError: Argument 3 passed to DrupalComposer\DrupalScaffold\PrestissimoFileFetcher::__construct() must implement interface Composer\IO\IOInterface, array given, called in /home/account/www-dev-opensocial/vendor/drupal-composer/drupal-scaffold/src/Handler.php on line 116 and defined in /home/account/www-dev-opensocial/vendor/drupal-composer/drupal-scaffold/src/PrestissimoFileFetcher.php:25
Stack trace:
#0 /home/account/www-dev-opensocial/vendor/drupal-composer/drupal-scaffold/src/Handler.php(116): DrupalComposer\DrupalScaffold\PrestissimoFileFetcher->__construct(Object(Composer\Util\RemoteFilesystem), 'http://cgit.dru...', Array, Object(Composer\IO\ConsoleIO), Object(Composer\Config))
#1 /home/account/www-dev-opensocial/vendor/drupal-composer/drupal-scaffold/src/Handler.php(91): DrupalComposer\DrupalScaffold\Handler->downloadScaffold()
#2 /home/account/www-dev-opensocial/vendor/drupal-composer/drupal-scaffold/src/Plugin.php(66): DrupalComposer\DrupalScaffold\Handler->onPostCmdEvent(Object( in /home/account/www-dev-opensocial/vendor/drupal-composer/drupal-scaffold/src/PrestissimoFileFetcher.php on line 25
john.nie’s picture

first, composer update from lightning, it reported error same with you , but i run composer update for third time, it disappear.
The middle time is nothing to do. it fix itself.

bramtenhove’s picture

Hi there,

Thanks for raising this.

I noticed you are using Drush 9.x, but as far as I know there are some compatibility issues with that version. Using Drush 8.x seems to work better.

Next to that there seem to be issues with the latest update of the Drupal Scaffold plugin. Could it be that is is updated to 2.5.0 or higher? It may help if you set it to 2.4.0 and try it again.

hongpong’s picture

I was not on OpenSocial but i had this error today

[Symfony\Component\Debug\Exception\FatalThrowableError]
Type error: Argument 3 passed to DrupalComposer\DrupalScaffold\PrestissimoFileFetcher::__construct() must implement interface Composer\IO\IOInterface, array given, called in /site/vendor/drupal-composer/drupal-scaffold/src/Handler.php on line 116

And then I ran composer update again and it didn't recur. The error came right after "generating autoload files" .

on drush 8.1.17

mlncn’s picture

Same for me (not on Open Social for the project with the error).

It's been filed as a bug at Drupal Scaffold:

https://github.com/drupal-composer/drupal-scaffold/issues/79

Carlos Miranda Levy’s picture

Any update on this?
Running composer update on a fresh composer install of Open Social breaks with the same error.

Carlos Miranda Levy’s picture

Running composer clear-cache before installing fixed it for me

ronaldtebrake’s picture

Status: Active » Fixed

Hi guys,

Thanks for all your input. As pointed out in #9 it was definitely an issue in in Drupal Scaffold.

Status: Fixed » Closed (fixed)

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

podarok’s picture

Downgrade to 2.4.0 version of drupal-scaffold and you'll be fine