4

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.

-1

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

https://stackoverflow.com/questions/708140/php-fatal-error-cannot-redeclare-class

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 Sep 13 '16 at 8:46
  • please delete di folder in var – Murtuza Zabuawala Sep 13 '16 at 8:52
7

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

Replace:

namespace Migration\Step;

With:

namespace Migration\Step\UrlRewrite;

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.