I'm running into following fatal error when trying to execute the setup:di:compile command:

Fatal error: Cannot declare class Migration\Step\Version11410to2000Test, because the name is already in use in /var/www/html/magento/vendor/magento/data-migration-tool/tests/unit/testsuite/Migration/Step/UrlRewrite/Version11410to2000Test.php on line 109

I tried to re-compile because I was getting an 404 on backend (triggered by magento, not apache websever).

Any help appreciated.

Edit: It is a fresh Magento 2 install, except for adding the official (and correct) data-migration-tool.


2 Answers 2


change and give different class name for your controller class

this might be issue because your controller class name also used by some other controller

example shown in below url


And if this is the not case then

please delete di folder in var

  • I didn't name anything, it is a fresh install except for installing data-migration-tool (which comes from magento) - sorry I didn't mention this.
    – TobiasJ
    Commented Sep 13, 2016 at 8:46
  • please delete di folder in var Commented Sep 13, 2016 at 8:52

A more direct answer to this problem is:

At the top of the file: {magento-base}/vendor/magento/data-migration-tool/tests/unit/testsuite/Migration/Step/UrlRewrite/Version11410to2000Test.php


namespace Migration\Step;


namespace Migration\Step\UrlRewrite;

Your Answer

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

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