Error : composer require --dev zendframework/zend-expressive-tooling

I want to install ----- zend-expressive-tooling,
Enter – $ composer require --dev zendframework/zend-expressive-tooling
Result :
Install nothing or upgrade
The http-interop / http-middleware package is left, you should avoid using it. Use http-
interop / http-server-middleware instead.
The phpunit / phpunit-mock-objects package is not used, it should be avoided. No
replacement has been proposed.
The webimpress / http-middleware-compatibility package is abandoned, you should avoid using it. Use psr / http-server-middleware instead.

Open Server / php 5.6 / Windows 10/

Seems like it’s already installed then :wink:

1 Like

zend-expressive-tooling needs PHP in version 7.1 or higher:

You are using an old and unsupported version of PHP.

1 Like

Why is there no entry in composer.json about this?

“scripts”: {
“post-create-project-cmd”: [
@development-enable
],
“development-disable”: “zf-development-mode disable”,
“development-enable”: “zf-development-mode enable”,
“development-status”: “zf-development-mode status”,

    "check": [
        "@cs-check",
        "@test"
    ],
    "clear-config-cache": "php bin/clear-config-cache.php",
    "cs-check": "phpcs",
    "cs-fix": "phpcbf",
    "serve": "php -S 0.0.0.0:8080 -t public public/index.php",
    "test": "phpunit --colors=always",
    "test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
}

Which composer.json do you mean?

composer.json for your project is your responsibility.
Settings like versions of PHP are something you have to change yourself.
So, as an example, open the .composer.json file in your project root and add line 24 from above example to the top of your "require" section.
After that run a composer update and see what happens. Probably not much, since you are running PHP5.6 on your machine, in that case I would start with updating that first.

1 Like

Thanks, I did everything as you wrote, But still does not work. I think that my Windows is not compatible … I don’t know what to think already …

**composer expressive handler:create "App\Handler\HelloHandler"**

result :
[Symfony\Component\Console\Exception\CommandNotFoundException]
Command “expressive” is not defined.

and so all the teams

file at the root of the project - composer.json
Such

{
“name”: “zendframework/zend-expressive-skeleton”,
“description”: “Zend expressive skeleton. Begin developing PSR-7 middleware applications in seconds!”,
“type”: “project”,
“homepage”: “https://github.com/zendframework/zend-expressive-skeleton”,
“license”: “BSD-3-Clause”,
“config”: {
“sort-packages”: true
},
“require”: {
“php”: “^5.6 || ^7.0”,
“http-interop/http-middleware”: “^0.4.1”,
“roave/security-advisories”: “dev-master”,
“zendframework/zend-component-installer”: “^2.0”,
“zendframework/zend-config-aggregator”: “^1.1”,
“zendframework/zend-expressive”: “^2.2”,
“zendframework/zend-expressive-helpers”: “^4.0”,
“zendframework/zend-expressive-platesrenderer”: “^1.3.1”,
“zendframework/zend-expressive-zendrouter”: “^2.2”,
“zendframework/zend-servicemanager”: “^3.3”,
“zendframework/zend-stdlib”: “^3.1”
},
“require-dev”: {
“filp/whoops”: “^2.1.7”,
“phpunit/phpunit”: “^6.0.8 || ^5.7.15”,
“squizlabs/php_codesniffer”: “^2.8.1”,
“zendframework/zend-expressive-tooling”: “^0.4.7”,
“zfcampus/zf-development-mode”: “^3.1”
},
“autoload”: {
“psr-4”: {

        "App\\": "src/App/src/"
    }
},
"autoload-dev": {
    "psr-4": {
        "AppTest\\": "test/AppTest/"
    }
},
"scripts": {
    "post-create-project-cmd": [
        "@development-enable"
    ],
    "development-disable": "zf-development-mode disable",
    "development-enable": "zf-development-mode enable",
    "development-status": "zf-development-mode status",
    "check": [
        "@cs-check",
        "@test"
    ],
    "clear-config-cache": "php bin/clear-config-cache.php",
    "cs-check": "phpcs",
    "cs-fix": "phpcbf",
    "serve": "php -S 0.0.0.0:8080 -t public public/index.php",
    "test": "phpunit --colors=always",
    "test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
}

}

This command is wrong. For the expressive tool Composer is not needed.

Try the following in your project directory:

vendor/bin/expressive handler:create "App\Handler\HelloHandler"

(If you look in the directory vendor\bin you will find expressive.bat and this is the executable program from expressive for Windows.)