After updated drupal core to 8.2.4 version composer autoloader broken on several namespaces

For exemple missing the Symfony DomCrawler in psr4 definitions...and many others.

Comments

grumpy74 created an issue. See original summary.

alexpott’s picture

Status: Active » Closed (won't fix)

DomCrawler is available for me on 8.2.4...

 (8.2.4)  alex: ~/dev/sites/drupal8alt.dev > d php
Psy Shell v0.7.2 (PHP 7.0.7 — cli) by Justin Hileman
>>> class_exists('\Symfony\Component\DomCrawler\Crawler');
=> true
>>>

@grumpy74 how did you do the upgrade and does vendor/symfony/dom-crawler/Crawler.php exist... I guess not. I think what might have occurred here is due to https://www.drupal.org/blog/drupal-8-will-no-longer-include-dev-dependen.... This was announced in the 8.2.3 release notes - https://www.drupal.org/project/drupal/releases/8.2.3.

grumpy74’s picture

Hi @alexpott,

I just downloaded the drupal 8.2.4 verison and replace the files.

But the folder Symfony component is not there. How did ypu get symfony\compoent folder in yur drupal vendor folder ?

In my vendor folder, missing the folder vendor\symfony\dom-crawler that is a dev version, so your anwer was correct.

But How can I have Symfony\Component\DomCrawler\Crawler in my vendor ?

Thx for help

grumpy74’s picture

Status: Closed (won't fix) » Active

and I got my path to dom-crawler folder due to this :

https://api.drupal.org/api/drupal/namespace/Symfony!Component!DomCrawler...

alexpott’s picture

Category: Bug report » Support request
Priority: Critical » Normal

@grumpy74 what code do you have that is using the dom-crawler? The reason this is no longer included in 8.2.4 is that is it is only needed for running our test suite - so it is a dev dependency. If you download the 8.2.x development tarball it'll be there but it'd be best to work out why you need this. Removing the development only code was a decision based on several factors and by design so this is not a bug and not critical.

grumpy74’s picture

Ok thanks for the reply and explanation.

So I will include symfony domCrawler not in dev version using composer in my project.

Thaks again @alexpott, and sorry for the bad categorization in "critical" (was my first issue post).

grumpy74’s picture

Status: Active » Closed (works as designed)