18

I have installed the new Magento 2.3.3 version.

After I have run the command:

php bin/magento setup:di:compile

I have Faced the following error:

PHP Fatal error: Interface 'Vertex\Tax\Model\Flexfield\Processor\InvoiceFlexFieldProcessorInterface' not found in /var/www/html/magento2/vendor/vertex/module-tax/Model/FlexField/Processor/OrderCurrencyGetterProcessor.php on line 24

Please refer the following screenshot: enter image description here

How to solve this.

Thanks in Advance.

2
  • 1
    Can you please check this file available there ? vendor/vertex/module-tax/Model/FlexField/Processor/InvoiceFlexFieldProcessorInterface.php Oct 21, 2019 at 5:08
  • Yes, this file is available there Oct 21, 2019 at 5:11

5 Answers 5

37

Go to Below File

/vendor/vertex/module-tax/Model/FlexField/Processor/OrderCurrencyGetterProcessor.php

At the end of the "use" clauses in

add the following two lines:

use Vertex\Tax\Model\FlexField\Processor\InvoiceFlexFieldProcessorInterface;
use Vertex\Tax\Model\FlexField\Processor\TaxCalculationFlexFieldProcessorInterface;

and run again below command

php bin/magento setup:di:compile
4
  • 1
    This solution is worked for me Oct 21, 2019 at 5:21
  • @Rakesh Donga - Thanks Man - it works :) Oct 23, 2019 at 8:09
  • @Rakesh Donga - Thanks it works :)
    – Vivek
    Dec 18, 2019 at 5:45
  • It's useful info. Thank you. Mar 8, 2020 at 7:27
16

I run into the same problem. It seems only a speeling problem: https://github.com/magento/magento2/issues/24930#issuecomment-543949135

So it is better to change only the namespace spelling without adding the two use-lines:

namespace Vertex\Tax\Model\FlexField\Processor;

FlexField instead of Flexfield

It could make a difference for external functions that use this class.

7

If like me you can't edit the file (because our CD will fail) follow these steps:

  1. In the root of your project, create a directory patches/composer
  2. Create a file called vendor-vertex-compilation-issue.diff
  3. In your composer.json add this to the list of "require" "cweagans/composer-patches": "1.6.7"
  4. Still in your composer.json add this to the extras
       "patches": {
           "vertex/module-tax":{
               "MAGETWO: vendor vertex compilation issue": "patches/composer/vendor-vertex-compilation-issue.diff"
           }
       }
  1. Put the following content into the vendor-vertex-compilation-issue.diff file that you created earlier
diff --git a/Model/FlexField/Processor/OrderCurrencyGetterProcessor.php b/Model/FlexField/Processor/OrderCurrencyGetterProcessor.php
index 6fb4944..86a66f4 100644
--- a/Model/FlexField/Processor/OrderCurrencyGetterProcessor.php
+++ b/Model/FlexField/Processor/OrderCurrencyGetterProcessor.php
@@ -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;
  1. run composer install

This should install the vertex module and apply the patch to the module and then you can go on with compiling Magento as you normally would

UPDATE

As of Magento 2.3.4, the vertex/module-tax has been upgraded to 3.3.0 (from 3.2.0) and the issue is corrected and the patch no longer needed

2

Goto file:

/vendor/vertex/module-tax/Model/FlexField/Processor/OrderCurrencyGetterProcessor.php

Add missing line:

use Vertex\Tax\Model\FlexField\Processor\TaxCalculationFlexFieldProcessorInterface;

after

use Vertex\Tax\Model\FlexField\FlexFieldProcessableAttributeFactory;

& Try setup-upgrade & di-compile once again.

For more info you can check module's di.xml file for abstract-interface mapping.

1

If you aren't using the Vertex Tax module in your installation, you can use the replace key in the composer JSON so the module files don't even get pulled into your installation.

// composer.json
{
  "name": "magento2/testing",
  "type": "project",
  "require": {
    "magento/product-community-edition": "2.3.3",
    ...
  },
  ...
  "replace": {
    ...
    "vertex/module-tax": "*", // add other modules to exclude here
    ...
  }
}

This is only a solution if you know your users won't want to use the vertex tax module, instead of patching it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.