-
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
Update 2.3.2->2.3.3 Fails on magento setup:di:compile with an error mentioning InvoiceFlexFieldProcessorInterface #24930
Comments
Hi @thomvanderboon. 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. @thomvanderboon do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
I might have solved the problem by accident. While investigating it looks like I found a working solution. At the end of the "use" clauses in /path to website/vendor/vertex/module-tax/Model/FlexField/Processor/OrderCurrencyGetterProcessor.php add the following two lines: use Vertex\Tax\Model\FlexField\Processor\InvoiceFlexFieldProcessorInterface; |
Hi @sudheers-kensium. Thank you for working on this issue.
|
@thomvanderboon Issue is not reproducible, so I am closing this. |
Attached is a patch that should resolve this issue. |
@thomvanderboon Thank you for reporting an issue. May you describe your environment (OS, PHP version, do you use some Docker or Vagrant, etc.)?Seems issue affects only several environments and we are trying to understand what exactly environments are affected. |
Just ran into this issue with a client's site. It's a Kubernetes environment, Ubuntu, PHP 7.2.22. |
Multishop Magento environment with two languages installed. VMware Virtual Server (plain, no docker, vagrant etc.) For "compiling" magento I run following commands: rm -rf var/cache/* |
Cool. |
I'm going to re-open this ticket for now, just because a lot of people are creating duplicates of this issue and having one open ticket might prevent them from doing so :) @navarr: is Magento still sticking to their "let's only allow one specific version of a core-bundled-extension to be included in a specific version of Magento", or is there a way to release a new version of Vertex without having to wait on Magento 2.3.4 ? |
This fix works for me. I was not able to successfully apply the patch given above. This only started happening after I upgraded from 2.3.2 to 2.3.3 Ubuntu 16.04.6 LTS |
I had the same problem here on a fresh installation and the above solution worked for me. Debian GNU/Linux 9 |
I had the same problem too and the above solution worked for me. Debian GNU/Linux 9.9 |
@shahbaztariq, @robsoned, @crdt instead of code modification in a vendor folder it should be possible to fix the issue with running |
Commands: Result: Generating optimized autoload files No fix...... :( |
Hi @engcom-Delta. Thank you for working on this issue.
|
Tested this solution on my system and it works. Second capital F seems to be the "error" and solution. |
Well, yes, that's what the patch posted days ago says as well 😉 |
sigh can't wait for the MacOS developers to come to their senses and start using case-sensitive filesystem (and Windoze developers to stop using windows for development until it provides case sensitive file system) |
@janmyszkier: PHP namespaces are case-insensitive. While I definitely take full blame for the issue, I think it might be a corner-case composer or DI bug |
Whilst that may be true - we should definitely work in a case-sensitive environment. On linux this is the case already. On OSX there is a way to create a disk image that is built on a case sensitive file system and works very well. On windows however, no idea. |
@janmyszkier Unfortunately this issue is more tricky than just case sensitive/insensitive filesystems. We do have a testing infrastructure verifying builds on various Linux distros as well as before release we made manual regression on various environments including Magento Cloud and on all of these environments the issue does not appear. So we still exploring issue and try to find a reason for different behavior on different environments. |
while php is case-insensitive, PSR-4 is not:
So, while php doesn't care about |
We will add static tests to enforce strict case comparisons for PHP code and DI configuration to avoid such issues in the future. |
Faced this issue as well, anyone knows any ETA when it will be solved? |
@pierzakp, unfortunately, we cannot modify code after it was released and the extension bundling mechanism does not allow change version of the bundled extension. Therefore, the best way, for now, is applying a patch provided by @navarr. For sure, Magento 2.3.4 release will have fixed this issue. Magento recently also released a security patch release 2.3.2-p2 which contains a lot of security fixes and not affected by this bug. |
So... why not release a 2.3.3-p1 ? |
Can we not have a patch similar to the patches described here: https://devdocs.magento.com/guides/v2.3/release-notes/release-notes-2-3-3-open-source.html
|
Adding to what @vkublytskyi already said, the issue is definitely more complicated than the case-sensitivity of a file system. As long as the FS on a docker containers (yes, even on Docker for macOS!) is not mounted into the container from the host, the FS is actually case-sensitive since the FS is case-sensitive inside the VM which Docker Desktop runs within. Yet, the DI compilation issue doesn't show up there within the case-sensitive docker volume when running on Docker Desktop for macOS. I first ran across this issue on a Github Action which I have to build Magento demo images after each new version is released, and nobody else on my team could replicate, so I dug deeper and ran the same container image build on Docker Desktop for MacOS, Fedora 30, CoreOS 2191.5.0 (stable), Ubuntu 16.04 and Ubuntu 18.10 and it builds the image successfully on all of these. But it fails when you build this same container image (which executes the DI compile) with docker on Fedora 29 and a Github Actions pipeline. Everything except for the macOS test was run on a completely clean OS install spun up on a Digital Ocean droplet. I hope you can see the disparity there! In every case (including the image build on macOS) the DI compile was running on a case-sensitive FS, yet it only failed in 2 out of 7 host OS environments. Why? I have no idea…my guess since I was reproducing in a docker container is something to do with version of the docker engine. |
@vkublytskyi @navarr If Vertex could publish a dot release fixing the namespace, it would be super simple to use the correct version on 2.3.3 allowing DI to compile for those affected:
The above command would result in composer installing (the currently unreleased) version 3.2.1 instead of 3.2.0 overriding the sub-package dependencies. Simple, no patches, and it would work if a version 3.2.1 of |
I had to adjust the patch to work with being installed with composer. I attached it here. |
I have the same Problem while updating magento to 2.3.3. |
This issue is fixed in Vertex 3.3.0 included in Magento 2.3.4 |
@navarr , @vkublytskyi , @davidalger @vkublytskyi |
I just got this error out of the blue. Earlier in the day, by CircleCI workflow ran fine, with zero issue. One commit later, adding files into a custom module in |
Has there been any progress on this at all? It's January 2020 and I have been trying to upgrade from Magento 2.2.9 to 2.3.3 and this breaks the dependency injection compilation. I find it unacceptable a small typo causing such a bug would remain in a production codebase for so long. I have resorted to forking the Vertex module and pushing the fix myself for my team. |
@dsmithhayes A patch was provided earlier in the comments: #24930 (comment) - a fix will be delivered with 2.3.4 |
Nice. |
The fix will also be part of the security release 2.3.3-p1 (will be released together with 2.3.4, public release is 28 January), which is rather odd as it has nothing to do with security, but anyways, it's good Magento is doing this I think. $ diff -urw magento233/vendor/vertex/ magento233-p1/vendor/vertex/
diff -urw magento233/vendor/vertex/module-tax/Model/FlexField/Processor/OrderCurrencyGetterProcessor.php magento233-p1/vendor/vertex/module-tax/Model/FlexField/Processor/OrderCurrencyGetterProcessor.php
--- magento233/vendor/vertex/module-tax/Model/FlexField/Processor/OrderCurrencyGetterProcessor.php 2019-09-10 10:09:26.000000000 +0200
+++ magento233-p1/vendor/vertex/module-tax/Model/FlexField/Processor/OrderCurrencyGetterProcessor.php 2020-01-07 07:53:48.000000000 +0100
@@ -4,7 +4,7 @@
* @author Mediotype https://www.mediotype.com/
*/
-namespace Vertex\Tax\Model\Flexfield\Processor;
+namespace Vertex\Tax\Model\FlexField\Processor;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Quote\Api\CartRepositoryInterface;
diff -urw magento233/vendor/vertex/module-tax/composer.json magento233-p1/vendor/vertex/module-tax/composer.json
--- magento233/vendor/vertex/module-tax/composer.json 2019-09-10 10:09:26.000000000 +0200
+++ magento233-p1/vendor/vertex/module-tax/composer.json 2020-01-07 07:53:48.000000000 +0100
@@ -3,7 +3,7 @@
"description": "Vertex Tax Links for Magento 2",
"type": "magento2-module",
"license": "proprietary",
- "version": "3.2.0",
+ "version": "3.2.1",
"require": {
"php": "^7.0",
"ext-soap": "*", |
ESO FUNCIONO PARA MI At the end of the "use" clauses in /path to website/vendor/vertex/module-tax/Model/FlexField/Processor/OrderCurrencyGetterProcessor.php add the following two lines: use Vertex\Tax\Model\FlexField\Processor\InvoiceFlexFieldProcessorInterface; This fix works for me. I was not able to successfully apply the patch given above. This only started happening after I upgraded from 2.3.2 to 2.3.3 |
Update 2.3.2 -> 2.3.3 fails with error during magento setup:di:compile
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
No errors during update
Actual result (*)
PHP Fatal error: Interface 'Vertex\Tax\Model\Flexfield\Processor\InvoiceFlexFieldProcessorInterface' not found in /path to website/vendor/vertex/module-tax/Model/FlexField/Processor/OrderCurrencyGetterProcessor.php on line 24
The text was updated successfully, but these errors were encountered: