在Symfony中做了一年没有做任何事情之后,今天我试图创建一个Symfony 4项目以进行小规模登陆。问题是symfony new --full testweb
和composer create-project symfony/website-skeleton testweb
均返回成功,但未创建所有项目文件。
J:\_online\aaaform.testy.ovh>composer create-project symfony/website-skeleton testweb
Installing symfony/website-skeleton (v4.3.99)
- Installing symfony/website-skeleton (v4.3.99): Loading from cache
Created project in testweb
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.3.*"
Package operations: 1 install, 0 updates, 0 removals
- Installing symfony/flex (v1.4.6): Loading from cache
Writing lock file
Generating autoload files
Symfony operations: 1 recipe (16fe55e9bbdda89a25a3cc57ebd8163c)
- Configuring symfony/flex (>=1.0): From github.com/symfony/recipes:master
Some files may have been created or updated to configure your new packages.
Please review, edit and commit them: these files are yours.
J:\_online\aaaform.testy.ovh>symfony new --full testweb
* Creating a new Symfony project with Composer
(running C:\ProgramData\ComposerSetup\bin\composer.bat create-project symfony/website-skeleton testweb)
* Setting up the project under Git version control
(running git init testweb)
[OK] Your project is now ready in J:\_online\aaaform.testy.ovh\testweb
.git
vendor
.env
composer.json
composer.lock
symfony.lock
我成功composer clearcache
清除了作曲家缓存几次,但仍然没有任何变化。就像flex无法使用配方一样。我使用的是php 7.3.11,控制台和composer -vvv about
返回的版本相同。
composer diagnose
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 1.9.1
PHP version: 7.3.11
PHP binary path: C:\php\php.exe
那我想念什么?为什么不创建Symfony项目?
答案 0 :(得分:0)
问题是Composer
安装损坏。已成功使用composer self-update
将其更新为1.9.1,但显然失败了。全新安装Composer之后,卸载Composer并从Composer
中删除AppData
目录是非常完美的。