I'm using magento 2.2.5 and try to create customer theme, I added the registration.php inside app/design/frontend/Test/mine/


when I ran the php bin/magento setup:upgrade , I got the following error:

PHP Parse error: syntax error, unexpected ''frontend/Test/mine'' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ')' in /var/www/project/app/design/frontend/Test/mine/registration.php on line 4

2 Answers 2


I cannot explain this, but the error was fixed by just rearranging the elements in one line like this:

<?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::THEME, 'frontend/Test/mine', __DIR__ );

Reference here


Your component name should be in the format Vendor_Module, so in your case that would be Mine_Theme instead of frontend/Test/mine.

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.