Skip to content

Attempted to call an undefined method named "create" of class "PhpParser\ParserFactory" #68

Description

@jackyraimond

PHP Version

8.1 / 8.2

Shopware Version

6.5.X / 6.6.X

Plugin Version

1.0.3

Actual behaviour

In version 5 of the PHP-Parser library, ParserFactory::create() has been removed. This will give an error when creating an OneToOneAssociationField and then create an own entity extensions. It’s caused by this line.

Expected behaviour

Create own entity extension and after that proceed with generating the Entity.

Steps to Reproduce?

  1. Run frosh:make:definition
  2. Add OneToOneAssociationField
  3. Select yes "Create an own entity extensions?"

Output:

In EntityLoader.php line 83:
                                                                                                              
  [Symfony\Component\ErrorHandler\Error\UndefinedMethodError]                                                 
  Attempted to call an undefined method named "create" of class "PhpParser\ParserFactory".                    
  Did you mean to call e.g. "createForHostVersion", "createForNewestSupportedVersion" or "createForVersion"?  

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions