我正在使用wamp64,我想升级到cakephp3的最新稳定版本。我的当前版本是3.2.x
我从安装名为crm的cakephp应用程序的位置运行该命令。我从文档中运行了这个,但它不工作。
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
}发布于 2017-07-13 23:20:20
您需要将composer.phar文件放在从中运行命令的目录中。假设它在您的代码目录中,验证composer.phar文件是否存在。.phar是一个php存档文件,或者为了更简单的理解,它是一个自包含的应用程序。如果该文件不存在,您将无法运行和composer命令。
很可能你需要做的就是安装composer.https://getcomposer.org/doc/00-intro.md#installation-windows
发布于 2018-12-17 14:00:54
在我的例子中,我也面临着同样的问题。我已经将我的项目从cakephp3.5升级到3.7。我已经通过以下命令解决了这个问题-(要运行这个命令,请确保您的composer是全局安装的)
composer要求--使用依赖关系更新"cakephp/cakephp:3.7.*“

https://stackoverflow.com/questions/45069637
复制相似问题