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

Error on clean skeleton installation with PHP 8.1 and elie29/zend-phpdi-config #71

Closed
kirkmadera opened this issue Jul 19, 2022 · 19 comments
Assignees
Labels
Bug Something isn't working
Milestone

Comments

@kirkmadera
Copy link

kirkmadera commented Jul 19, 2022

Bug Report

I encountered an error on a clean skeleton installation. I am testing with PHP 8.1 and Composer 2.3.7

image

Q A
Version(s) x.y.z
PHP 8.1
Composer 2.3.7

Summary

I installed Mezzio Skeleton from composer create-project and encountered an error that elie29/zend-phpdi-config was locked at 6.0 and, thus locked into PHP ^7.1. This is not even a module I requested. I requested to use the laminas-servicemanager strategy.

Current behavior

Skeleton not installed. Composer shows an error with an unrequested package. I was able to push through this by manually editing composer.lock and removing the elie29/zend-phpdi-config package entirely.

How to reproduce

  1. Run composer create-project mezzio/mezzio-skeleton mezzio
  2. Select the following: 3 (Modular), 2 (laminas-servicemanager), 1 (FastRoute), n (None of the above), 1 (Whoops)

This is also reproduced with the Minimal installation.

Expected behavior

Skeleton installed.

@kirkmadera kirkmadera added the Bug Something isn't working label Jul 19, 2022
@samsonasik
Copy link
Member

Yes, I think PHPDI support should be dropped. Could you create PR to remove it? Thank you.

@Ocramius
Copy link
Member

@samsonasik it's a quite stable DIC - do we really want to kill it? 🤔

@samsonasik
Copy link
Member

samsonasik commented Jul 20, 2022

Not the PHPDI package itself, but the bridge, as far as I remember, elie29/zend-phpdi-config have different signature configuring service since 5.0, I removed its support from my module as well: ErrorHeroModule since 2021 https://github.com/samsonasik/ErrorHeroModule/releases/tag/4.0.0

@Ocramius
Copy link
Member

Ah, totally agree on the bridge.

Yes, we cannot keep it in there, if it's not maintained.

@elie29
Copy link
Contributor

elie29 commented Aug 2, 2022

@Ocramius the bridge is maintained, I need more info about the error. For PHP 8+, we need the v8 for the bridge

@Ocramius
Copy link
Member

Ocramius commented Aug 3, 2022

Hey @elie29, thanks for the feedback: I think you are already discussing this with @samsonasik in #72, sorry for the duplicate noise.

@someson
Copy link

someson commented Sep 19, 2022

The issue is still open, does anyone work on it?

@froschdesign
Copy link
Member

@someson
It would be nice if the support for PHP-DI would remain. So it would be great if you can help here.
Thanks in advance! 👍🏻

@elie29
Copy link
Contributor

elie29 commented Sep 21, 2022

@froschdesign the bridge needs an update to be compatible with php8.1. I am working on it

@elie29
Copy link
Contributor

elie29 commented Sep 21, 2022

I created the issue : elie29/zend-di-config#55

@elie29
Copy link
Contributor

elie29 commented Sep 24, 2022

@froschdesign @Ocramius elie29/zend-di-config is compatible with PHP 8.1. All tests passed. you can checkout version 9.0.0

@Ocramius
Copy link
Member

See #82

@marian-lippold-C
Copy link

Is this issue resolved? Fresh installed php 8.1.12 and Composer 2.4.4 still produce error about the elie29/zend-phpdi-config being locked to 6.0.0.
I do not know enough about this technology to fix it myself, so i kindly ask for support.

@froschdesign
Copy link
Member

Looks like the configuration for the installer is wrong:

'elie29/zend-phpdi-config' => [
'version' => '^6.0',
],

It must be the same as in the Composer configuration:

"elie29/zend-phpdi-config": "^6.0 || ^8.0 || ^9.0",

@froschdesign
Copy link
Member

@marian-lippold-C

I do not know enough about this technology to fix it myself, so i kindly ask for support.

Edit the composer.json of your new project and change the version constraint for elie29/zend-phpdi-config and then run the update or install command of Composer.

@elie29
Copy link
Contributor

elie29 commented Nov 9, 2022

@froschdesign should I create a PR to correct the config of the installer?

@froschdesign
Copy link
Member

@elie29
Go for it. Thanks in advance! 👍🏻

elie29 added a commit to elie29/mezzio-skeleton that referenced this issue Nov 10, 2022
Signed-off-by: Elie NEHME <elie29@users.noreply.github.com>
@elie29
Copy link
Contributor

elie29 commented Nov 10, 2022

@froschdesign you can find here #99

elie29 added a commit to elie29/mezzio-skeleton that referenced this issue Nov 20, 2022
Signed-off-by: Elie NEHME <elie29@users.noreply.github.com>
Ocramius added a commit that referenced this issue Dec 20, 2022
The configuration for the installer is wrong #71
@Ocramius Ocramius added this to the 3.11.1 milestone Dec 20, 2022
@Ocramius
Copy link
Member

Handled in #99

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants