I'm using magento 2.2.5 and try to create customer theme, I added the registration.php inside app/design/frontend/Test/mine/
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::THEME,
'frontend/Test/mine',
__DIR__
);
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.
Explore related questions
See similar questions with these tags.