1

This is my first time trying out Magento 2 and I tried creating a basic custom module, but when I tried to execute the php bin/magento setup:upgrade it, I got an error:

Parse error: syntax error, unexpected ''Jurgis_Twilio'' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ')' in C:\wamp64\www\magento2\app\code\Jurgis\Twilio\registration.php on line 4

C:\wamp64\www\magento2\app\code\Jurgis\Twilio\registration.php:

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Jurgis_Twilio',
    __DIR__
);

my php version (php -v):

PHP 7.0.10 (cli) (built: Aug 18 2016 09:48:53) ( ZTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
3

1 Answer 1

4

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::MODULE, 'Jurgis_Twilio', __DIR__);
1

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.