cancel
Showing results for 
Search instead for 
Did you mean: 

magento 2

magento 2

hy i installed Magento 2.3.7 version on a subdomain using CPanel and after that when ever i try to open frontend and backend it show following error:

(Fatal error: Declaration of Laminas\ServiceManager\ServiceLocatorInterface::get($name) must be compatible with Psr\Container\ContainerInterface::get(string $id) in /home2/alepsports/Gymwear.alepsports.com/vendor/laminas/laminas-servicemanager/src/ServiceLocatorInterface.php on line 16)

Please give me the solution to how can i solve this issue.

Thanks

Ahmed

7 REPLIES 7

Re: magento 2

Did you get a


@ahmedsrazab965 wrote:

hy i installed Magento 2.3.7 version on a subdomain using CPanel and after that when ever i try to open frontend and backend it show following error:

(Fatal error: Declaration of Laminas\ServiceManager\ServiceLocatorInterface::get($name) must be compatible with Psr\Container\ContainerInterface::get(string $id) in /home2/alepsports/Gymwear.alepsports.com/vendor/laminas/laminas-servicemanager/src/ServiceLocatorInterface.php on line 16)

Please give me the solution to how can i solve this issue.

Thanks

Ahmed



@ahmedsrazab965 wrote:

hy i installed Magento 2.3.7 version on a subdomain using CPanel and after that when ever i try to open frontend and backend it show following error:

(Fatal error: Declaration of Laminas\ServiceManager\ServiceLocatorInterface::get($name) must be compatible with Psr\Container\ContainerInterface::get(string $id) in /home2/alepsports/Gymwear.alepsports.com/vendor/laminas/laminas-servicemanager/src/ServiceLocatorInterface.php on line 16)

Please give me the solution to how can i solve this issue.

Thanks

Ahmed




solution for this? I am stuck on the same thing after upgrading from 2.2.7 to 2.3.5

Re: magento 2

I'm also getting this error. I believe it's caused by a 3rd party module. 

__
The only predictable thing about people is their unpredictability.

Re: magento 2

This was caused by running PHP7.1 on setup:di:compile instead of PHP7.3

__
The only predictable thing about people is their unpredictability.

Re: magento 2

I'm having the same problem.

 

Magento 2.3.6 to 2.3.7, php 7.3, composer update.  Fixed some memory issues, but than the composer ran and finished without problems.

The error occures when using   bin/magento setup:upgrade

 

Anyone has a fix???

 

Update: also php 7.4 does not solve my problem. Also removing all vendor packages and   composer upgrade  does not solve the problem.

Re: magento 2

I've managed to get a version of the site working. Not everything seems to show as was in v2.3.6, so I have more digging to do.

 

After making/updating my   composer.json   almost the same by copying lots of lines from the magento-2 github v2.3.7-branche(!) composer.json, I still got the error.

Solution: Then I found a laravel-problem which was similar with Psr/Container.  So I added the line   "psr/container": "1.0.0"   to my   composer.json   and run   composer update

 

Now   bin/magento setup:upgrade   gave a different error (!).  In   setup/src/Magento/Setup/Module.php   was an error at line 80.   I removed the trailing  ,   (comma) in the last line from the array_merge-command and the   bin/magento setup:upgrade  now worked. After entering the command   bin/magento maintenance:disable   I can see the front page again too. Now I just have to do more testing to see if everything works as supposed.

Re: magento 2

I have tried this solution but I got even more errors in the composer update.

 

I have tried adding "psr/container": "1.0.0" in Composer under "require":{ but this did not work either.

 

The following is wah I am getting

 

/home/virtual/58f94e5df1/public_html$ composer update --no-plugins
Loading composer repositories with package information


Warning from repo.magento.com: Your Magento authentication keys are invalid. Please double-check your keys in your Marketplace account. For instructions, visit https://devdocs.magento.com/guides/v2.3/install-gde/prereq/connect-auth.html


Warning from repo.magento.com: Your Magento authentication keys are invalid. Please double-check your keys in your Marketplace account. For instructions, visit https://devdocs.magento.com/guides/v2.3/install-gde/prereq/connect-auth.html


Warning from repo.magento.com: Your Magento authentication keys are invalid. Please double-check your keys in your Marketplace account. For instructions, visit https://devdocs.magento.com/guides/v2.3/install-gde/prereq/connect-auth.html


[Composer\Downloader\TransportException]
The 'https://repo.magento.com/packages.json' URL required authentication.
You must be using the interactive console to authenticate

 

update [--with WITH] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-dev] [--lock] [--no-install] [--no-autoloader] [--no-scripts] [--no-suggest] [--no-progress] [-w|--with-dependencies] [-W|--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...

 

 

 

Re: magento 2

This error indicates an incompatibility between Laminas Service Manager and PSR-11 interfaces in Magento 2.3.7. To resolve, either update to the latest Laminas Service Manager v2 via Composer, or edit your composer.json to remap the incompatible interface name. Clearing caches and running setup upgrades after making Composer changes can also help fix the issue. If the problem persists, consider reverting to an earlier Magento version like 2.3.5-p1 that did not have this conflict.