3

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

asked Jan 14, 2019 at 9:10

2 Answers 2

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

answered Jan 15, 2019 at 13:52
0

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

answered Jan 14, 2019 at 12:01

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.