I've followed the following steps (using the latest version of Drupal 8: 8.0.5):

  • drush dl oembed
  • drush en oembed -y
  • drush cache-rebuild

This generates the error:

PHP Fatal error:  Class 'Bangpound\\oEmbed\\Provider\\ProviderResolver' not found in /srv/drupal-clamav/htdocs/core/lib/Drupal/Component/DependencyInjection/Container.php on line 261

The site stops operating, there doesn't seem to be any way of running the site with this module enabled.
This is using the latest version of Drupal 8.0.5 and Oembed 8.x-1.x-dev.

In short, unless I'm missing something, the 8.x branch cannot be enabled without triggering a fatal error across the entire site.

Comments

manarth created an issue.

ignat.volosky’s picture

It looks like composer doesn't load bangpound/oembed library correctly. I also had that error after installing module. When I tried to install library manually with composer, I got error: "The requested package bangpound/oembed ^0.0.0@dev exists as bangpound/oembed[dev-master, 0.0.x-dev] but these are rejected by your constraint.". I changed line in composer.json from "bangpound/oembed": "~0.0@dev" to "bangpound/oembed": "*" and module started to work as well.

dman’s picture

Installation troubleshooting

Downloading via drush (traditionally) on a new Drupal8 site (8.3) *will not work* because you need the additional composer dependency. There is/was a drush plugin for composer manager that may help, but really

The only way to get new stuff (well, anything that includes further dependencies anyway) is going to be
composer require drupal/oembed:1.x-dev

However, today that was failing for me:

Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - drupal/oembed 1.x-dev requires bangpound/oembed ~0.0@dev -> satisfiable by bangpound/oembed[0.0.x-dev].
    - Conclusion: remove symfony/dom-crawler v3.2.8
    - Conclusion: don't install symfony/dom-crawler v2.8.20
    - Installation request for drupal/oembed 1.x-dev -> satisfiable by drupal/oembed[1.x-dev].
    - Conclusion: don't install symfony/dom-crawler v3.2.8
...
..

I've been running PHP7 on the CLI, and using a BLT Drupal Composer site setup, which comes with a lot of baggage. Baggage that includes some testing kit, and some constraints that may be the problem:

composer why symfony/dom-crawler
behat/mink-browserkit-driver  v1.3.2  requires  symfony/dom-crawler (~2.3|~3.0)  
fabpot/goutte                 v3.2.1  requires  symfony/dom-crawler (~2.1|~3.0)  
symfony/browser-kit           v3.2.8  requires  symfony/dom-crawler (~2.8|~3.0)  

It seems I'd been running symfony/dom-crawler v3.2.8 on my new clean build, thanks to composer making some guesses for me.
I was able to DOWNGRADE the running version of symfony/dom-crawler to the point where bangpound/oembed was able to allow it.

composer require symfony/dom-crawler:~2.8
composer require drupal/oembed

...
So that got me somewhere functional successfully.

It looks like the desirable thing to to would be for bangpound/oembed to become upwardly compatible with the more recent symfony/dom-crawler version.
bangpound/oembed dev-master requires symfony/dom-crawler (~2.7)

dman’s picture

Calling on open issues for feedback #2884829: Offering to maintain the oEmbed module