-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Blank install of Magento 2.4.1 via composer breaks on setup:install command. #30575
Comments
Hi @msyhr. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. Please, add a comment to assign the issue:
🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
As a side note, repeating this above process in the identical environment, but specifying:
will cause the same issue. |
experiencing the same issue |
Hi @sdzhepa. Thank you for working on this issue.
|
Hello @msyhr qsolutions-pl Thank you for collaboration! After multiple attempts on different envs and sked different people to check it on their envs We are not able to reproduce this issue by the provided steps. At this point, I suppose some important steps/configuration/etc. information is missed in the description.
Tested on next envs configurations:
Tested using the next steps
Result: Magento sucessfuly installed. No Fatal errors. Sorefront is available |
Hi @sdzhepa, I have the same bug with PHP 7.4.11. But if I use PHP 7.3 , The class Proxy created correctly. |
Hi @Knase, |
I am using php 7.4.11 |
@Knase could you provide your composer.lock file? |
@ihor-sviziev |
I have same issue on after upgrading Magento Cloud 2.3.6 to 2.4.1 version with PHP 7.3.23.
UPD: |
Re-opening since other people seem to be running into this issue now. Some Information from me about my setup: I'm using https://github.com/cytopia/devilbox for local development OS 20.04.1 LTS (Focal Fossa) `devilbox@php-7.4.9 in /shared/httpd/magento2/htdocs $ php -v Virtual Host Below: magento2.txt Still fails every time for me. Using a version in the composer command (2.4.0) works flawlessly. Upgrade will create the issue, create-project with no version will create the issue. |
✅ Confirmed by @ihor-sviziev Issue Available: @ihor-sviziev, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
I created PR for updating docs in order to highlight that |
Hi @ihor-sviziev. Thank you for working on this issue.
|
Ok... we got responce from the author of So currently we have three options:
For now I think adding just a warning to the docs should be enough, I still thinking about implementation of 2nd or maybe 3rd option. |
@zenfork and any others using Devilbox running into this issue, I can confirm disabling the psr extension solves the issue. You'll need to edit the entry to add "psr" in the .env of your devilbox root.
|
Hey. I have a question. Why we need create proxy for LoggerInterface object? What this profit we have from this "optimization"? Maybe make sense remove proxy from DI class and this is fix problem in install. |
@pusachev TBH I don't really know. Feel free to investigate it 😃 |
This issue is also related to an |
@qsolutions-pl FYI we added info that |
@pusachev @ihor-sviziev I bumped into this same issue and was able to solve it by removing the PSR extension (Ubuntu with PHP 7.3: However, the question of @pusachev intrigued me: Why is the proxy needed in the first place? I tried it and this gave the error |
@jissereitsma I believe the only one valid fix will be introducing some not dynamically created logger proxy with the same logic inside |
Hi @msyhr, @ihor-sviziev, @engcom-Delta. Thank you for your report and collaboration! The related internal Jira ticket The fix will be available with the upcoming |
@sidolov @sivaschenko @gabrieldagama i don’t see any commits related to internal ticket if using search https://github.com/magento/magento2/search?q=MC-38918&type=commits . Could you please provide us some info how we can find the fix ? |
Hi @ihor-sviziev, this issue was manually closed on our Jira Project because the GitHub one was already closed for some time. Apparently, our bot has added the message about the fix, but, there is no fix. If this still an issue, please feel free to reopen it! Thanks! |
@gabrieldagama, @sdzhepa: this is really bad behavior of the bot, I've seen this happening a few times before in other tickets. Placing automated comments like these put people at ease, they believe that an issue will actually be fixed if a bot leaves this comment even if we can't find a reference to it in the commits (because we've grown accustomed by now that publishing code to github can sometimes take a few days or weeks even if a ticket is already closed before that happens). Can you investigate this bot and fix it so it doesn't leave incorrect comments like these anymore in the future? Thanks! |
There was nothing I could do (module:enable etc.) due to this error. |
I got same error , anyone knows how to solve it? |
@ahmedch1 make sure you don't have installed psr php extension. If you have such - please remove it |
@jissereitsma great mate your solution works like charm, a dozen thank you |
Preconditions (*)
Steps to reproduce (*)
composer create-project --repository=https://repo.magento.com/ magento/project-community-edition magento2
php bin/magento setup:install --base-url=http://241.loc/ --db-host=mysql --db-name=241 --db-user=root --db-password= --admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1 --search-engine=elasticsearch7 --elasticsearch-host=elastic --elasticsearch-port=9200
Expected result (*)
Actual result (*)
Fatal error: Declaration of Psr\Log\LoggerInterface\Proxy::emergency($message, array $context) must be compatible with Psr\Log\LoggerInterface::emergency($message, array $context = NULL) in /shared/httpd/24/htdocs/magento2/generated/code/Psr/Log/LoggerInterface/Proxy.php on line 93
The proxy generated has functions like below:
public function alert($message, array $context)
However, if you change them directly to:
public function alert($message, array $context = array())
The command will then run successfully, however it will break all bin/magento setup:xxx commands the next time the code is regenerated.
The text was updated successfully, but these errors were encountered: