“ symfony new --full”和“ composer create-project symfony / website-skeleton testweb”都不会创建项目

时间:2019-11-04 19:31:13

标签: symfony symfony4

在Symfony中做了一年没有做任何事情之后,今天我试图创建一个Symfony 4项目以进行小规模登陆。问题是symfony new --full testwebcomposer 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.

通过symfony new创建项目:

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项目?

1 个答案:

答案 0 :(得分:0)

问题是Composer安装损坏。已成功使用composer self-update将其更新为1.9.1,但显然失败了。全新安装Composer之后,卸载Composer并从Composer中删除AppData目录是非常完美的。