我正在使用wamp64,我想升级到cakephp3的最新稳定版本。我目前的版本是3.2.x
我从安装了cakephp应用程序名为crm的地方运行命令。我从文档中运行它,但它不起作用。
php composer.phar需要“cakephp / cakephp:3.4。*”
错误:无法打开输入文件:composer.phar 查看问题,有人可以告诉我在wamp64上运行升级的官方方法是什么?
Running Composer returns: "Could not open input file: composer.phar"
{
"name": "cakephp/app",
"description": "CakePHP skeleton app",
"homepage": "http://cakephp.org",
"type": "project",
"license": "MIT",
"require": {
"php": ">=5.5.9",
"cakephp/cakephp": "~3.2",
"mobiledetect/mobiledetectlib": "2.*",
"cakephp/migrations": "~1.0",
"cakephp/plugin-installer": "*"
},
"require-dev": {
"psy/psysh": "@stable",
"cakephp/debug_kit": "~3.2",
"cakephp/bake": "~1.1"
},
"suggest": {
"phpunit/phpunit": "Allows automated tests to be run without system-wide install.",
"cakephp/cakephp-codesniffer": "Allows to check the code against the coding standards used in CakePHP."
},
"autoload": {
"psr-4": {
"App\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"App\\Test\\": "tests",
"Cake\\Test\\": "./vendor/cakephp/cakephp/tests"
}
},
"scripts": {
"post-install-cmd": "App\\Console\\Installer::postInstall",
"post-create-project-cmd": "App\\Console\\Installer::postInstall",
"post-autoload-dump": "Cake\\Composer\\Installer\\PluginInstaller::postAutoloadDump"
},
"minimum-stability": "stable",
"prefer-stable": true
}
答案 0 :(得分:0)
您需要将composer.phar文件放在运行命令的目录中。假设这是在您的代码目录中,请验证composer.phar文件是否存在。 .phar是一个php存档文件,或者为了更简单的理解,它是一个自包含的应用程序。如果该文件不存在,您将无法运行和编写器命令。
您可能需要做的就是安装composer。https://getcomposer.org/doc/00-intro.md#installation-windows
答案 1 :(得分:0)