0

I am using wamp64 and I want to upgrade to the latest stable release of cakephp3. I have current version 3.2.x

I ran the command from where the cakephp application called crm is installed. I run this from the docs but it doesnt work.

php composer.phar require "cakephp/cakephp:3.4.*"

error:Could not open input file: composer.phar Looked up the issue annd could someone tell me what the official way to run the upgrade on 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
}
jagguy
  • 183
  • 1
  • 3
  • 16

2 Answers2

0

You would need the composer.phar file to be in the directory you are running the command from. Assuming this is in your code directory verify the composer.phar file exists. .phar is a php archive file or for simpler understanding it is a self contained application. If that file doesn't exist you would not be able to run and composer commands.

Likely all you will need to do is install composer.https://getcomposer.org/doc/00-intro.md#installation-windows

KaffineAddict
  • 436
  • 2
  • 11
0

In my case, i also faced the same problem. I have upgraded my project from cakephp3.5 to 3.7. I have solved it by following command- (to run this command make sure your composer is installed globally)

composer require --update-with-dependencies "cakephp/cakephp:3.7.*"

This is my problem and solution

iamsohel
  • 387
  • 3
  • 7