Magento – Error during compilation after upgrade in magento 2.2.3

compilationmagento2.2.3upgrade

Got error during compilation after upgrade in magento 2.2.3

Interception cache generation… 6/7 [========================>—] 85% 42 secs 342.0 MiBErrors during compilation:
Magento\Backend\Model\View\Layout\GeneratorPool
Incompatible argument type: Required type: \Magento\Framework\View\Layout\Condition\ConditionFactory. Actual type: \Magento\Framework\App\Config\ScopeConfigInterface; File:
/chroot/home/discount/m223/html/vendor/magento/module-backend/Model/View/Layout/GeneratorPool.php

Total Errors Count: 1

[Magento\Framework\Validator\Exception]
Error during compilation

AND also, it's changed Cache folder permission 777 to 775 during compile.

Best Answer

If you upgrade Magento older version to Magento 2.2.3 and you fetching same error in compile then below step you should follow to resolve this error.

Magento older version have 2 directories and 2 files in this path

vendor\magento\module-backend\Model\View\Layout

  1. Filter
  2. Reader
  3. Builder.php
  4. GeneratorPool.php

And Magento version 2.2.3 have 1 directory and 2 files

  1. Reader
  2. Builder.php file
  3. StructureManager.php

So after merge files and folder, you should delete "filter" folder and "GeneratorPool.php" from Magento version 2.2.3 on this path.

vendor/magento/module-backend/Model/View/Layout/GeneratorPool.php

then run the compile command

then no error will show.

Related Topic