Articles on: Magento 2 Pearl Theme User Guide

ReflectionException error on Magento 2.1.x when running bin/magento setup:di:compile

Symptom

Running bin/magento setup:di:compile on Magento 2.1.x fails with:


[ReflectionException] Class Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface does not exist


Cause

This error is triggered by the WeSupply Toolbox module on Magento 2.1.x only. It does not occur on Magento 2.2.x+.




Solutions


Solution 1 — Remove the module (if you don’t use it)

If you do not need the WeSupply Toolbox module:


  1. Remove the directory: app/code/WeSupply/Toolbox
  2. (Optional) Clear generated code and recompile:
  • rm -rf var/generation/* var/di/*
  • bin/magento setup:di:compile


Note: Simply disabling via bin/magento module:disable is not sufficient. The module files must be removed from app/code.




Solution 2 — Upgrade Magento (if you need the module)

If you rely on the WeSupply Toolbox module, upgrade Magento to 2.2.x or 2.3.x (or later), where this error does not occur. After upgrading, re-run bin/magento setup:di:compile.




Affected Versions

  • Magento 2.1.x only (with WeSupply Toolbox present)


Not Affected

  • Magento 2.2.x+

Updated on: 16/09/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!