-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Version 3.11 conflicts with ext-psr #124
Comments
Using old code (in src/autoload) can be a workaround
BTW, I don't see any real benefit in replacing container-interop, user simply should switch away from it, and composer display a warning about this when installed
|
@remicollet the reason why we did Dropping On this end, I must say that I didn't know that a One alternative we could have is to use inheritance with the PSR interfaces, as you suggested, instead of aliasing. |
TBH: I have no idea how to fix this. We also had RFC open for months, almost 1 year and there was no feedback in that direction. That extension also is problematic when it comes to multiple major versions of the PSR standards. So until there is no dedicated extension per RFC, that extension needs to keep BC compat or a hilarious amount of versions to reflect all version combinations. Given the fact, that there are 3 major versions for |
Adding |
Yes, but that will only apply to the 2nd patch of the minor. So 1st patch still installable. :-/
Only for all 3
You see where this is going, right? I would not use such extension. |
Yes, but we can't do much about that anyway. Let's just declare the conflict, since bug reports need to target the latest patch release anyway, in order to be considered: at least we declared where we stand. |
Guess this issue reported here also covers the error "reported" in the commit: |
…ias` to a non-user interface There is a PHP extension around which provides all (most?) PSR interfaces without the need of installing them via composer. Since we do not support this extension and since that extension does not make sense anyways (more details later), we explicitly adding a `conflict` to the `composer.json` so that there are no surprises for projects which do have the `psr` extension installed. closes laminas#124 Now to the problem with the extension: There are multiple PSR standards around. Many of them do have multiple major versions around. The extension has to follow semver to avoid breaks in upstream projects. So as of now (v1.2.0), it only provides the interfaces for the v1 versions of the PSR standards. There is no way to provide multiple major versions of the same PSR interface from within one version of the extension. Therefore, at some point, an upstream project is either stuck with the v1 versions of the PSR standards or the extension needs to create a hilarious amount of major versions to reflect all possible combinations of all major versions (cartesian product). Lets just take the PSR-11 + PSR-6 example, we already would have 6 major versions around because PSR-11 has 2 major versions and PSR-6 has 3 major versions: - psr/cache 1.x + psr/container 1.x - psr/cache 1.x + psr/container 2.x - psr/cache 2.x + psr/container 1.x - psr/cache 2.x + psr/container 2.x - psr/cache 3.x + psr/container 1.x - psr/cache 3.x + psr/container 2.x And these are only 2 packages. I lost track on the current progress, but there will be more major versions in the future and thus the amount of major versions for the extension will grow (and with that, the confusion for upstream projects, maintainers, etc.). We highly recommend to use composer to install the PSR standards per package in the version the upstream project can work with. **Do not use the `psr` extension** Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
…ias` to a non-user interface There is a PHP extension around which provides all (most?) PSR interfaces without the need of installing them via composer. Since we do not support this extension and since that extension does not make sense anyways (more details later), we explicitly adding a `conflict` to the `composer.json` so that there are no surprises for projects which do have the `psr` extension installed. closes #124 Now to the problem with the extension: There are multiple PSR standards around. Many of them do have multiple major versions around. The extension has to follow semver to avoid breaks in upstream projects. So as of now (v1.2.0), it only provides the interfaces for the v1 versions of the PSR standards. There is no way to provide multiple major versions of the same PSR interface from within one version of the extension. Therefore, at some point, an upstream project is either stuck with the v1 versions of the PSR standards or the extension needs to create a hilarious amount of major versions to reflect all possible combinations of all major versions (cartesian product). Lets just take the PSR-11 + PSR-6 example, we already would have 6 major versions around because PSR-11 has 2 major versions and PSR-6 has 3 major versions: - psr/cache 1.x + psr/container 1.x - psr/cache 1.x + psr/container 2.x - psr/cache 2.x + psr/container 1.x - psr/cache 2.x + psr/container 2.x - psr/cache 3.x + psr/container 1.x - psr/cache 3.x + psr/container 2.x And these are only 2 packages. I lost track on the current progress, but there will be more major versions in the future and thus the amount of major versions for the extension will grow (and with that, the confusion for upstream projects, maintainers, etc.). We highly recommend to use composer to install the PSR standards per package in the version the upstream project can work with. **Do not use the `psr` extension** Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Hello all, have added the conflict but still getting same error :( |
Are you on the latest version? Check |
Hi @Ocramius - Just checked the version its 3.11.1 how we can upgrade ? |
By uninstalling |
Hi @Ocramius
|
HI @Ocramius Now all backend command executed, and it seems project setup . but when we go to front end its showing same error on front end Fatal error: Uncaught ValueError: class_alias(): Argument #1 ($class) must be a user-defined class name, internal class name given in /var/www/html/m245/project-community-edition/vendor/laminas/laminas-servicemanager/src/autoload.php:1 |
Fatal error: Uncaught ValueError: class_alias(): Argument #1 ($class) must be a user-defined class name, internal class name given in /var/www/html/m245/project-community-edition/vendor/laminas/laminas-servicemanager/src/autoload.php:13 Stack trace: #0 /var/www/html/m245/project-community-edition/vendor/laminas/laminas-servicemanager/src/autoload.php(13): class_alias() #1 /var/www/html/m245/project-community-edition/vendor/composer/autoload_real.php(59): require('...') #2 /var/www/html/m245/project-community-edition/vendor/composer/autoload_real.php(42): composerRequired13112b11e1877c5fa97a92a7af68de2() #3 /var/www/html/m245/project-community-edition/vendor/autoload.php(12): ComposerAutoloaderInitd13112b11e1877c5fa97a92a7af68de2::getLoader() #4 /var/www/html/m245/project-community-edition/app/autoload.php(51): include('...') #5 /var/www/html/m245/project-community-edition/app/bootstrap.php(43): require_once('...') #6 /var/www/html/m245/project-community-edition/index.php(12): require('...') #7 {main} thrown in /var/www/html/m245/project-community-edition/vendor/laminas/laminas-servicemanager/src/autoload.php on line 13 |
HI @Ocramius Please review above error and guide for the same |
@MeetKamal latest versions of package is not compatible with |
Also, only run |
Thanks, will try on another machine. Have tried the composer install but no luck |
Can I say I am not shocked this was never fixed. Does anything work these days at all? |
@AkashikSeer we explicitly declared a conflict with |
Sorry thanks.. I found out it was a framework I was using. I had to go all
the way to the frameworks github page and clone it just so I could run
composer install and upgrade because there was no friggin composer file in
the download. I had tried downloading it because the composer line they
gave to install it returns that it couldn't be found FFS😡 So
So I eventually googled to find their repo so I could clone it to see
exactly WTF was going on. I only figured it out after this. I didn't see a
way in github to find past comments or whatever they call these.
So, sorry.😂
…On Sat, Aug 6, 2022 at 5:49 AM Marco Pivetta ***@***.***> wrote:
@AkashikSeer we explicitly declared a conflict with ext-psr: it is up to
you to either downgrade this package, or uninstall ext-psr. This issue is
100% solved from this end.
—
Reply to this email directly, view it on GitHub
<#124 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKYQZAV35DX5II442GLJC6DVXYYLLANCNFSM5SYRHOGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
best solution! |
When psr extension is loaded
Fatal error: Uncaught ValueError: class_alias(): Argument #1 ($class) must be a user-defined class name, internal class name given in ......src/autoload.php:13
so
class_alias
cannot be used thereThe text was updated successfully, but these errors were encountered: