hyva-themes / magento2-hyva-admin

This module aims to make creating grids and forms in the Magento 2 adminhtml area joyful and fast.
https://hyva-themes.github.io/magento2-hyva-admin/
BSD 3-Clause "New" or "Revised" License
168 stars 39 forks source link

Installation ERROR : unexpected 'HyvaGridInterfaceFactory' (T_STRING), expecting function (T_FUNCTION) .. #7

Closed theshreyas closed 3 years ago

theshreyas commented 3 years ago

PHP Parse error: syntax error, unexpected 'HyvaGridInterfaceFactory' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in app/code/Hyva/Admin/Block/Adminhtml/HyvaGrid.php on line 11

Magento Version : 2.3.5-p2 PHP Version : 7.2.34

I am not sure, but does it only support 2.4 ?

paugnu commented 3 years ago

I think the problem is PHP 7.2.

Check this: https://github.com/hyva-themes/magento2-hyva-admin/blob/main/doc/1.%20Overview/1.%20Installation.md

Minimum requirement is PHP 7.3

Vinai commented 3 years ago

Yeah, probably an issue with PHP 7.2, It shouldn't be too hard to backport though.

Since the class is in app/code/, it seems like you cloned the git repo instead of using a composer package installation. That's fine, but I wanted to note that there is a php73 branch which might work better/be less work to backport, compared to the main branch which is for PHP 7.4.

The error you posted actually shows you are on the main branch:

private HyvaGridInterfaceFactory $gridFactory;

Typed properties are only available in PHP 7.4.