Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Description of a manual installation is missing #8

Closed
weierophinney opened this issue Dec 31, 2019 · 9 comments
Closed

Description of a manual installation is missing #8

weierophinney opened this issue Dec 31, 2019 · 9 comments

Comments

@weierophinney
Copy link
Contributor

I'm trying to include zend-expressive in my project, but unsuccessfully.
When i require zend-expressive via console ( composer require zendframework/zend-expressive ), i get the following error:

Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - zendframework/zend-expressive 3.0.0 requires zendframework/zend-httphandlerrunner ^1.0.1 -> satisfiable by zendframework/zend-httphandlerrunner[1.0.1].
    - zendframework/zend-expressive 3.0.1 requires zendframework/zend-httphandlerrunner ^1.0.1 -> satisfiable by zendframework/zend-httphandlerrunner[1.0.1].
    - zendframework/zend-expressive 3.0.2 requires zendframework/zend-httphandlerrunner ^1.0.1 -> satisfiable by zendframework/zend-httphandlerrunner[1.0.1].
    - zendframework/zend-httphandlerrunner 1.0.1 requires psr/http-message-implementation ^1.0 -> no matching package found.
    - Installation request for zendframework/zend-expressive ^3.0 -> satisfiable by zendframework/zend-expressive[3.0.0, 3.0.1, 3.0.2].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Code to reproduce the issue

composer require zendframework/zend-expressive

Expected results

Expected composer to install the package

Actual results

Composer returned an error regarding package dependencies


Originally posted by @itapai at zendframework/zend-expressive#624

@weierophinney
Copy link
Contributor Author

It's not broken, you are missing a psr/http-message-implementation, e.g. zendframework/zend-diactoros

So I guess this would do:
composer require zendframework/zend-expressive zendframework/zend-diactoros


Originally posted by @JoeBengalen at zendframework/zend-expressive#624 (comment)

@weierophinney
Copy link
Contributor Author

@ksemeks One new tool for you: composer why-not <package>. This will give you detailed information on what blocks installation of a package.

That said, your error message indicates the issue:

zendframework/zend-httphandlerrunner 1.0.1 requires psr/http-message-implementation ^1.0 -> no matching package found.

We do not currently cover installation within an existing project, which tells me this should be documented. I'm adding the "documentation" and "help wanted" labels presently, so somebody can pick that up.


Originally posted by @weierophinney at zendframework/zend-expressive#624 (comment)

@arueckauer
Copy link

Currently Mezzio requires an implementation of psr/http-message-implementation as well as laminas/laminas-httphandlerrunner. This can be achieved with e.g.:

composer require laminas/laminas-diactoros laminas/laminas-httphandlerrunner mezzio/mezzio

However, this does not add the same value as utilizing mezzio/mezzio-skeleton which in addition sets up a directory structure and installs a DI, a router and optionally a template engine and error handler.

The documentation of this process is cumbersome and of little value, since it first adds little value for very few users using this scenario and secondly it is much easier to run the mezzio/mezzio-skeleton installer and copy the necessary components over to the existing project.

IMO this is a won't fix of an edge case.

@froschdesign
Copy link
Member

@arueckauer

The documentation of this process is cumbersome and of little value, since it first adds little value for very few users using this scenario and secondly it is much easier to run the mezzio/mezzio-skeleton installer and copy the necessary components over to the existing project.

A documentation page for the installation is still missing and a manual installation should also be added there.

composer require laminas/laminas-diactoros laminas/laminas-httphandlerrunner mezzio/mezzio

laminas-httphandlerrunner can be omitted from this command:

mezzio/composer.json

Lines 39 to 43 in d5bf81f

"require": {
"php": "~7.4.0||~8.0.0||~8.1.0",
"fig/http-message-util": "^1.1.5",
"laminas/laminas-httphandlerrunner": "^2.1",
"laminas/laminas-stratigility": "^3.5",

@froschdesign froschdesign changed the title composer require zendframework/zend-expressive broken Description of a manual installation is missing Sep 7, 2022
@arueckauer
Copy link

A documentation page for the installation is still missing and a manual installation should also be added there.

I am missing something here. What is the value of adding only mezzio/mezzio to an existing project? Would the documentation cover routing and DI, application structure, ...?

composer require laminas/laminas-diactoros laminas/laminas-httphandlerrunner mezzio/mezzio

laminas-httphandlerrunner can be omitted from this command:

mezzio/composer.json

Lines 39 to 43 in d5bf81f

"require": {
"php": "~7.4.0||~8.0.0||~8.1.0",
"fig/http-message-util": "^1.1.5",
"laminas/laminas-httphandlerrunner": "^2.1",
"laminas/laminas-stratigility": "^3.5",

You are right. Good catch!

@froschdesign
Copy link
Member

I am missing something here. What is the value of adding only mezzio/mezzio to an existing project? Would the documentation cover routing and DI, application structure, ...?

Sorry, I was a bit unclear here. I mean only the manual installation, not any integration. I think an integration or a migration can be a topic for blog post or something similar.

@arueckauer
Copy link

So, adding this to documentation would suffice?

Prior to manually installing Mezzio, check if the project has an implementation of psr/http-message-implementation. If does not, add one of your choice, e.g.:

composer require laminas/laminas-diactoros mezzio/mezzio

@froschdesign
Copy link
Member

So, adding this to documentation would suffice?

We need a separate page which shows the different ways for an installation. Creating a project via the skeleton application is one of them. The manual installation may be another.
An entry "Installation" is completely missing in the navigation: https://docs.mezzio.dev/mezzio/

@froschdesign
Copy link
Member

Will be fixed with #119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants