A 500 error pops up in my screen.
The following logs are generated:
2017/11/10 17:12:21 [error] 2807#2807: *27047 FastCGI sent in stderr: "PHP message: PHP Fatal error: Cannot use Magento\Framework\App\Helper\Context as Context because the name is already in use in /public/vendor/magento/module-customer/Model/AttributeChecker.php on line 11" while reading response header from upstream, client: 81.30.47.209, server: example.com, request: "GET /customer/address/new/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php7-fpm.sock:", host: "example.com"
@tig-dennisvanderhammen Are you using a fresh Magento install?
Yes, I get this error on a clean Magento installation.
@tig-dennisvanderhammen, thank you for your report.
We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.
We tested the issue on 2.3.0-dev, 2.1.10, 2.2.1
I was able to reproduce this error with the same steps as above in 2.2.1.
Site was running in production mode and I had run composer dump-autoload -o. The issue is related to an unnecessary use operator in a Customer module Model.
PR added here: https://github.com/magento/magento2/pull/12220
@magento-engcom-team this should be reproduced for sure due to https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/Customer/Model/Context.php class existence. Maybe app/code/Magento/Customer/Model/AttributeChecker.php is not involved in some circumstances with the steps provided though.
Hi @tig-dennisvanderhammen
The issue has been fixed and delivered in 2.2-develop branch. Will be available with upcoming patch release.
Thank you for your time!
Hello,
I'm new to magento..and i'm trying to install magento-2 setup in Windows..but i'm getting error as following:
Fatal error: Cannot use Magento\Payment\Gateway\ConfigInterface as ConfigInterface because the name is already in use in D:\wamp\www\magento2\app\code\Magento\Payment\Model\Method\Logger.php on line 8
Hi @ratnajain, this is already fixed in https://github.com/magento/magento2/commit/a7d4180ce61a7e9027befefac4ef4af6333ee8ff
Please don't use Windows, it is not supported and there could be some issues.
Encountered same result with M2.2.4 and PHP 7.0.8. Used https://github.com/magento/magento2/commit/a7d4180ce61a7e9027befefac4ef4af6333ee8ff for fixxing the error.
Got The Error while installing in Xampp "PHP Fatal error: Cannot use Magento\Payment\Gateway\ConfigInterface as ConfigInterface because the name is already in use in C:\xampp\htdocs\dreamkart\vendor\magento\module-payment\Model\Method\Logger.php on line 8"
Encountered a similar issue in the "Vertex_Tax" Module. There are some classes which are breaking down on PHP7.0 when using setup:upgrade:
Vertex\Tax\Model\Request
They are using the same
"use Magento\Quote\Model\Quote\Address;" statements
@EliasKotlyar: Do you run PHP 7.0.12 or lower?
There was a bug in those versions which is very similar to what you explain here, and this was fixed in PHP 7.0.13: https://bugs.php.net/bug.php?id=66862 & http://php.net/ChangeLog-7.php#7.0.13
Magento is requiring minimum PHP 7.0.13 since this commit: https://github.com/magento/magento2/commit/55657e12abfe3681022ed1e545cbdbb01cba712a (although this commit is not yet released in an official new Magento version)
Hello hostep,
Indeed, i have used PHP7.0.8. I know its a bit outdated, but there should be at least a documentation hint. We are planning to update our project soon to PHP 7.2 as soon as M2.3 gets out.
Greatings
Elias
@EliasKotlyar The issue mentioned does not appear to be present in the latest versions of Vertex.
You should be able to run composer update vertex/module-tax to get the latest version - or if you're not using it you can follow the instructions in the ticket you linked to remove it from your installation.