0

I'm using Magento 2.4.2-p1, Apache 2.4.54, php 7.4, and am getting a ParseError: syntax error when a class name is declared with a property declaration - is this expected? is there a work around?

From what I can tell you should be able to use a classname as of 7.4, and the same code is working in an nginx environment:

use Magento\Customer\Api\Data\GroupInterfaceFactory;
...
class CreateCustomerGroup
{
    protected GroupInterfaceFactory $groupFactory;

Thx for any insights -

1
  • This seems to have been an issue with stale code - I removed generated/*, var/cache and var/page_cache and the error is no longer visible.
    – theJoey
    Commented Nov 17, 2022 at 15:47

1 Answer 1

0

Removed generated/*, var/cache and var/page_cache and the error is no longer visible

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.