@gaurav_harsh1 Still getting the same error,
app/code/Gta/Solver/Search/Dynamic/Algorithm.php
Code : https://justpaste.it/4ho58
@gaurav_harsh1 shall i do this rm -rf generated/
Yes, please !
and run setup:upgrade as well if this module is not registered yet !
I just tested and able to do compilation, please check it must be a typo mistake.
Hello @Aveeva
Please try to disable this module and try Searchanise_SearchAutocomplete :
php bin/magento module:dsiable Searchanise_SearchAutocomplete php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento cache:flush
If it start working then issue with module, but the weird part it, it was working when doing it with vendor file ?
just give it a try and let us know here .
@gaurav_harsh1 After disabled searchanise module then run di:compile cmd,
Then there is no dependency of any module, you are doing some type mistake as it is getting Improved keyword, it neither in Algorithm class nor in preference, please check in your code with this keyword.
Please share core code as well.
@gaurav_harsh1 Module :
app/code/Gta/Solver/etc/di.xml
<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <preference for="Magento\Framework\Search\Dynamic\Algorithm" type="Gta\Solver\Search\Dynamic\Algorithm" /> </config>
app/code/Gta/Solver/etc/module.xml
<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> <module name="Gta_Solver" schema_version="0.0.1" setup_version="0.0.1"></module> </config>
app/code/Gta/Solver/registration.php
<?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, 'Gta_Solver', __DIR__ );
app/code/Gta/Solver/Search/Dynamic/Algorithm.php
@gaurav_harsh1 Apart from this, anything else i need to check?
Check again by copying code to vendor (remove current preference if using vendor), is it working fine then ?
PS : add correct namespace .