I have an error during the compilation due to a not completed developed module. As I'm still working on the module I would disable it and continue the compilation. I used to do that on magento1.

I tried:

  1. disable it with magento module:disable
  2. run magento setup:upgrade
  3. run the compilation again
  4. Check app/etc/config.php the module name is not included

but magento keeps reporting error.

Is the only way to get rid of the module folder?

  • which error are you facing ? – Manthan Dave Aug 22 '17 at 8:26
  • Post the error message here please – PY Yick Aug 22 '17 at 8:31
  • I think the error is not important as I'm still working on the module, I just want to disable it and run the compilation [Exception] Warning: Declaration of Module::save should be compatible with AbstractModel::save() in /Volumes/M2/mage22/app/code Module/model.php on line 16 – Antonio Pedicini Aug 22 '17 at 8:36
  • can you show your file code? – Rakesh Jesadiya Aug 22 '17 at 8:37
  • @RakeshJesadiya I can, but I think it's not important as I'm still working on the module, I only would like to disable it and continue with compilation – Antonio Pedicini Aug 22 '17 at 8:39

if you want to get rid of any of the module from compilation,

You just need to remove registration.php file from your module. Removing registration.php file from module, module will not consideration inside di:compile

if you just disable module using command at that time compilation consider all of those files of module.

Best way is remove registration.php file or rename it to get rid off from compilation.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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