symfony / polyfill

PHP polyfills

Home Page:https://symfony.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not scan for classes inside "...polyfill-php73/Resources/stubs" which does not appear to be a fil e nor a folder

dleigh opened this issue · comments

Composer noob trying to start a project with a boilerplate package that requires polyfill-php73 (among other things). I kept getting the error in the title of this issue. I finally deleted everything in the directory and tried to isolate this package to see if it was related to the myriad of other packages. Here's what I got:

composer require symfony/polyfill-php73
Using version ^1.11 for symfony/polyfill-php73
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing symfony/polyfill-php73 (v1.11.0): Loading from cache
Writing lock file
Generating autoload files

Installation failed, deleting ./composer.json.


  [RuntimeException]
  Could not scan for classes inside "/srv/www/wordpress-one/public_html/wp-content/plugins/inpsyde-nonces/vendor/symfony/polyfill-php73/Resources/stubs" which does not appear to be a fil
  e nor a folder


require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

composer -V shows: Composer version 1.8.6 2019-06-11 15:03:05

I don't know if I'm doing something wrong or not. I'm trying to do a project with PHP 7.2 so I don't think I even need this, but I'd like to use this particular boilerplate package to develop with. At any rate if someone could point me in the right direction for how to resolve this I'd be grateful. Thanks!

I never saw this error. Would you be able to provide some steps anyone could run locally to reproduce?

@nicolas-grekas , thanks for your response.

I'm on a VVV vagrant VM that has composer installed at the VM level. I can go into an empty directory and issue the command:

composer require symfony/polyfill-php73

and those are the results I get. If I add the "verbose" switch, it looks like this:

vagrant@vvv:/srv/www/wordpress-one/public_html/wp-content/plugins/temppolyfill$ composer -v require symfony/polyfill-php73
Using version ^1.11 for symfony/polyfill-php73
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Dependency resolution completed in 0.000 seconds
Analyzed 78 packages to resolve dependencies
Analyzed 70 rules to resolve dependencies
Package operations: 1 install, 0 updates, 0 removals
Installs: symfony/polyfill-php73:v1.11.0
  - Installing symfony/polyfill-php73 (v1.11.0): Loading from cache
 Extracting archiveWriting lock file
Generating autoload files

Installation failed, deleting ./composer.json.


  [RuntimeException]
  Could not scan for classes inside "/srv/www/wordpress-one/public_html/wp-content/plugins/temppolyfill/vendor/symfony/polyfill-php73/Resources/stubs" which does not appear to be a file nor a folder


Exception trace:
 () at phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:69
 Composer\Autoload\ClassMapGenerator::createMap() at phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:338
 Composer\Autoload\AutoloadGenerator->generateClassMap() at phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:321
 Composer\Autoload\AutoloadGenerator->addClassMapCode() at phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:266
 Composer\Autoload\AutoloadGenerator->dump() at phar:///usr/local/bin/composer/src/Composer/Installer.php:304
 Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/RequireCommand.php:209
 Composer\Command\RequireCommand->doUpdate() at phar:///usr/local/bin/composer/src/Composer/Command/RequireCommand.php:166
 Composer\Command\RequireCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:245
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:835
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:185
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:258
 Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:117
 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:104
 Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:61
 require() at /usr/local/bin/composer:24

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

Does that help at all?

@nicolas-grekas

I started seeing this problem today when creating project which had no issues on Monday.

I see multiple errors for polyfill and other packages:

[3759.5MiB/65.34s] ocramius/package-versions:  Generating version class...
[3759.5MiB/65.34s] ocramius/package-versions: ...done generating version class
[675.4MiB/217.44s] Could not scan for classes inside "phing/phing/classes/phing/" which does not appear to be a file nor a folder
[675.4MiB/217.44s] Could not scan for classes inside "jdorn/sql-formatter/lib" which does not appear to be a file nor a folder
[675.4MiB/217.44s] Could not scan for classes inside "symfony/intl/Resources/stubs" which does not appear to be a file nor a folder
[675.4MiB/217.44s] Could not scan for classes inside "symfony/polyfill-php73/Resources/stubs" which does not appear to be a file nor a folder

I did notice Symfony 4.3.2 is now being loaded instead of 4.2.1 which was version loaded Monday.

This is concerning as the create project stalled for 2 minutes before printing out these warnings. I had -vvv invoked with --profile, but nothing was occurring on screen.

Using composer version 1.8.6, but it has not been updated recently.

Kind Regards, Dave

Same Problem Here, It's affecting almost every project i try to create, including but not limited to Spryker and Behat, any fix for that?

This is a sulu 2.0 on an FROM php:7.2-fpm-alpine
couldNotScan

Could not scan for classes inside "jdorn/sql-formatter/lib" which does not appear to be a file nor a folder
Could not scan for classes inside "symfony/intl/Resources/stubs" which does not appear to be a file nor a folder
Could not scan for classes inside "symfony/polyfill-php73/Resources/stubs" which does not appear to be a file nor a folder
Class Sulu\Bundle\CoreBundle\Composer\ScriptHandler is not autoloadable, can not call post-create project-cmd script
Class Sulu\Bundle\CoreBundle\Composer\ScriptHandler is not autoloadable, can not call post-create project-cmd script

I'm sorry there is not enough info here for me to reproduce. Please give exact steps.

This does not appear to be a symfony/polyfill issue, given that it also affects other packages.

I suspect this is an issue with the VM filesystem corrupting things, as these folders definitely exist in each of these packages.

I agree with @stof, please tell us if you find the root issue.

image
I haven't found any solution to that.

Cleaning composer cache worked for me:
composer clearcache

remove vendor folder and composer.lock help me

[RuntimeException]
Could not scan for classes inside "C:\Users<users>\AppData\Roaming\Composer\vendor/symfony/polyfill-php73/Resources/stubs" which does not appear to be a file
nor a folder

E agora ?

commented

[RuntimeException]
Could not scan for classes inside "C:\Users\AppData\Roaming\Composer\vendor/symfony/polyfill-php73/Resources/stubs" which does not appear to be a file
nor a folder

E agora ?

나는 당신과 똑같은 에러를 겪고 있는 개발자이다.
이 문제는 composer에 버전 문제로 보인다.
나는 winodw os 환경에서 composer 2.0.5 버전 사용시 이러한 문제가 있었고
composer를 2.0.4 로 다운그레이드 하니 해결되었다.

composer 홈페이지에서 2.0.4 버전의 composer.phar 파일을 다운로드 받아서 composer 설치폴더에 덮어 쓴후
터미널을 다시 열어 명령을 실행해 보기 바란다.

I am a developer who is getting the same error as you.
This problem seems to be a version problem with composer.
I had this problem when using composer 2.0.5 version in winodw os environment
Downgrading composer to 2.0.4 solved it.

Download the 2.0.4 version of composer.phar file from the composer homepage and overwrite it in the composer installation folder.
Please open the terminal again and run the command.

[RuntimeException]
Could not scan for classes inside "C:\Users\AppData\Roaming\Composer\vendor/symfony/polyfill-php73/Resources/stubs" which does not appear to be a file
nor a folder
E agora ?

나는 당신과 똑같은 에러를 겪고 있는 개발자이다.
이 문제는 composer에 버전 문제로 보인다.
나는 winodw os 환경에서 composer 2.0.5 버전 사용시 이러한 문제가 있었고
composer를 2.0.4 로 다운그레이드 하니 해결되었다.

composer 홈페이지에서 2.0.4 버전의 composer.phar 파일을 다운로드 받아서 composer 설치폴더에 덮어 쓴후
터미널을 다시 열어 명령을 실행해 보기 바란다.

I am a developer who is getting the same error as you.
This problem seems to be a version problem with composer.
I had this problem when using composer 2.0.5 version in winodw os environment
Downgrading composer to 2.0.4 solved it.

Download the 2.0.4 version of composer.phar file from the composer homepage and overwrite it in the composer installation folder.
Please open the terminal again and run the command.

version 2.0.4 work at me
i update at version 2.0.4 composer self-update 2.0.4

[RuntimeException]
Could not scan for classes inside "C:\Users\AppData\Roaming\Composer\vendor/symfony/polyfill-php73/Resources/stubs" which does not appear to be a file
nor a folder
E agora ?

나는 당신과 똑같은 에러를 겪고 있는 개발자이다.
이 문제는 composer에 버전 문제로 보인다.
나는 winodw os 환경에서 composer 2.0.5 버전 사용시 이러한 문제가 있었고
composer를 2.0.4 로 다운그레이드 하니 해결되었다.

composer 홈페이지에서 2.0.4 버전의 composer.phar 파일을 다운로드 받아서 composer 설치폴더에 덮어 쓴후
터미널을 다시 열어 명령을 실행해 보기 바란다.

I am a developer who is getting the same error as you.
This problem seems to be a version problem with composer.
I had this problem when using composer 2.0.5 version in winodw os environment
Downgrading composer to 2.0.4 solved it.

Download the 2.0.4 version of composer.phar file from the composer homepage and overwrite it in the composer installation folder.
Please open the terminal again and run the command.

감사합니다, 너무너무 감사합니다!!!!!

Please use english on this repository.

[RuntimeException]
Could not scan for classes inside "C:\Users\AppData\Roaming\Composer\vendor/symfony/polyfill-php73/Resources/stubs" which does not appear to be a file

Version downgrade worked for me " 2.0.4 "

Composer 2.0.6 is now out with a fix.