Composer install for roots/roots-wrapper-toolbar


#1

I’m learning to use composer for all plugins but hitting many roadblocks.

The latest is trying to install the roots/roots-wrapper-toolbar plugin.

composer require roots/roots-wrapper-toolbar

returns:

[InvalidArgumentException]                                                                                                             
  Could not find package roots/roots-wrapper-toolbar at any version for your minimum-stability (stable). Check the package spelling or   
  your minimum-stability 

I’m also wondering often bedrock users end up just using the admin panel to install plugins, as private and github based ones so often are difficult to install via the composer require command.

EDIT

I misunderstood where composer looks. I added the git repo to the repositories list in the composer.json:

  "repositories": [{
    "type": "composer",
    "url": "https://wpackagist.org"
  },{
    "type": "vcs",
    "name": "roots/roots-wrapper-toolbar",
    "url": "https://github.com/roots/roots-wrapper-toolbar"
  }]

and this allowed composer to find it.
note: I used composer require roots/roots-wrapper-toolbar:dev-sagesupport


#2

I haven’t been able to use the ‘must use’ autoloader either. Did you manage to ever get this working as described in the docs?


#3

We’ll need to know more about your environment to effectively troubleshoot this. Is this a Trellis setup? If not, what version of PHP does your host run?

What else have you tried?


#4

The edit explains how I fixed it. this works for pulling plugins from GitHub, but I’ve never been able to use the mu autoloader as its described in the docs.

require{“wpackagist-plugin/wordpress-plugin”:“1.x.x”} works as expected however, just not when put into “web/app/mu-plugins/{$name}/” array

I don’t know if its just poorly worded and I’m missing something or it never worked properly.

I made a post/question about this but I don’t think it was ever seen. Bedrock mu-plugin autolader ignoring wpackagist

Have a look at what I wrote in there. if is not working for you as well, it may be worth asking a question in there - perhaps someone with more of a clue will see it!