Symfony 4.3警告:chdir():没有此类文件或目录(错误号2)

时间:2019-09-24 11:38:27

标签: symfony composer-php sylius

我尝试使用Symfony的制造商捆绑包添加一个新实体,但我无法摆脱此错误,请帮忙:/?

它在

之后发生
 php bin/console make:entity

 Class name of the entity to create or update (e.g. GrumpyJellybean):
 > Customer

 Your entity already exists! So let's add some new fields!
PHP Fatal error:  During class fetch: Uncaught ErrorException: Warning: chdir(): No such file or directory (errno......
Error: During class fetch: Uncaught ErrorException: Warning: chdir(): No such file or directory (errno 2) in
   /Users/loic/Documents/TFE/cmi-3/vendor/symfony/debug/DebugClassLoader.php:458
  Stack trace:
  #0 phar:///Users/loic/Documents/TFE/cmi-3/vendor/phpstan/phpstan-shim/phpstan.phar/vendor/nikic/php-parser/l
  ib/PhpParser/Lexer/Emulative.php(12): spl_autoload_call('PhpParser\\Lexer')
  #1 /Users/loic/Documents/TFE/cmi-3/vendor/symfony/maker-bundle/src/Util/ClassSourceManipulator.php(63): spl_
  autoload_call('PhpParser\\Lexer...')
  #2 /Users/loic/Documents/TFE/cmi-3/vendor/symfony/maker-bundle/src/Maker/MakeEntity.php(743): Symfony\Bundle
  \MakerBundle\Util\ClassSourceManipulator->__construct('<?php\n\nnamespac...', false)
  #3 /Users/loic/Documents/TFE/cmi-3/vendor/symfony/maker-bundle/src/Maker/MakeEntity.php(167): Symfony\Bundle
  \MakerBundle\Maker\MakeEntity->createClassManipulator('/Users/loic/Doc...', Object(Symfony\Bundle\MakerBundl
  e\ConsoleStyle), false)

1 个答案:

答案 0 :(得分:0)

目前,我可以使用它

php bin/console make:entity --no-debug

它将完成工作,但我仍然不知道发生了什么。