Skip to content

PhpParser\Lexer\Emulative::__construct(): Argument #1 ($options) must be of type array, PhpParser\PhpVersion given #1680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
karrakoliko opened this issue Apr 1, 2025 · 0 comments · Fixed by #1682

Comments

@karrakoliko
Copy link

Maker seems to be unable to create entity from 1st attempt.

1st attempt: exception
2nd attempt: exception
3rd attempt: Your entity already exists! So let's add some new fields! New property name (press <return> to stop adding fields): <...>

terminal log:

karrakoliko@inspiron-3525:~/projects/projectname$ docker compose exec php bin/console make:entity

 Class name of the entity to create or update (e.g. GrumpyChef):
 > EmailAttachment

 created: src/Entity/EmailAttachment.php
 created: src/Repository/EmailAttachmentRepository.php
 
 Entity generated! Now let's add some fields!
 You can always add more fields later manually or by re-running this command.

In Emulative.php line 40:
                                                                                                                                                                                                                              
  PhpParser\Lexer\Emulative::__construct(): Argument #1 ($options) must be of type array, PhpParser\PhpVersion given, called in /srv/projectname/vendor/symfony/maker-bundle/src/Util/ClassSourceManipulator.ph  
  p on line 72                                                                                                                                                                                                                
                                                                                                                                                                                                                              

make:entity [-a|--api-resource] [-b|--broadcast] [--regenerate] [--overwrite] [--with-uuid] [--with-ulid] [--] [<name>]


karrakoliko@inspiron-3525:~/projects/projectname$ docker compose exec php bin/console make:entity

 Class name of the entity to create or update (e.g. TinyPopsicle):
 > EmailAttachment

 Your entity already exists! So let's add some new fields!

In Emulative.php line 40:
                                                                                                                                                                                                                              
  PhpParser\Lexer\Emulative::__construct(): Argument #1 ($options) must be of type array, PhpParser\PhpVersion given, called in /srv/projectname/vendor/symfony/maker-bundle/src/Util/ClassSourceManipulator.ph  
  p on line 72                                                                                                                                                                                                                
                                                                                                                                                                                                                              

make:entity [-a|--api-resource] [-b|--broadcast] [--regenerate] [--overwrite] [--with-uuid] [--with-ulid] [--] [<name>]


karrakoliko@inspiron-3525:~/projects/projectname$ docker compose exec php bin/console make:entity

 Class name of the entity to create or update (e.g. BraveGnome):
 > EmailAttachment

 Your entity already exists! So let's add some new fields!

 New property name (press <return> to stop adding fields):
 > 

composer.json:

{
    "type": "project",
    "license": "proprietary",
    "minimum-stability": "stable",
    "prefer-stable": true,
    "require": {
        "php": ">=8.3",
        "ext-ctype": "*",
        "ext-iconv": "*",
        "ext-mbstring": "*",
        "ext-pcntl": "*",
        "ext-simplexml": "*",
        "ext-sodium": "*",
        "ext-jsonpath": "*",
        "aws/aws-sdk-php": "^3.315",
        "bref/symfony-messenger": "^1.3",
        "doctrine/dbal": "^4.2",
        "doctrine/doctrine-bundle": "^2.13",
        "doctrine/doctrine-migrations-bundle": "^3.3",
        "doctrine/orm": "^3.2",
        "happyr/message-serializer": "^0.5.2",
        "nyholm/psr7": "^1.8",
        "phpoffice/phpspreadsheet": "^3.5",
        "psr/http-client": "^1.0",
        "sentry/sentry-symfony": "^5.0",
        "symfony/amazon-sqs-messenger": "7.1.*",
        "symfony/asset": "7.1.*",
        "symfony/asset-mapper": "7.1.*",
        "symfony/cache": "7.1.*",
        "symfony/console": "7.1.*",
        "symfony/doctrine-messenger": "7.1.*",
        "symfony/dotenv": "7.1.*",
        "symfony/expression-language": "7.1.*",
        "symfony/finder": "7.1.*",
        "symfony/flex": "^2",
        "symfony/form": "7.1.*",
        "symfony/framework-bundle": "7.1.*",
        "symfony/http-client": "7.1.*",
        "symfony/intl": "7.1.*",
        "symfony/messenger": "7.1.*",
        "symfony/monolog-bundle": "^3.0",
        "symfony/process": "7.1.*",
        "symfony/property-access": "7.1.*",
        "symfony/property-info": "7.1.*",
        "symfony/runtime": "7.1.*",
        "symfony/security-bundle": "7.1.*",
        "symfony/serializer": "7.1.*",
        "symfony/string": "7.1.*",
        "symfony/twig-bundle": "7.1.*",
        "symfony/uid": "7.1.*",
        "symfony/validator": "7.1.*",
        "symfony/web-link": "7.1.*",
        "symfony/yaml": "7.1.*",
        "twig/extra-bundle": "^3.13",
        "twig/twig": "^3.14",
        "zbateson/mail-mime-parser": "^3.0"
    },
    "config": {
        "allow-plugins": {
            "php-http/discovery": true,
            "symfony/flex": true,
            "symfony/runtime": true,
            "dealerdirect/phpcodesniffer-composer-installer": true
        },
        "sort-packages": true
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Tests\\": "tests/"
        }
    },
    "replace": {
        "symfony/polyfill-ctype": "*",
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php72": "*",
        "symfony/polyfill-php73": "*",
        "symfony/polyfill-php74": "*",
        "symfony/polyfill-php80": "*",
        "symfony/polyfill-php81": "*",
        "symfony/polyfill-php82": "*",
        "symfony/polyfill-php83": "*"
    },
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install %PUBLIC_DIR%": "symfony-cmd",
            "importmap:install": "symfony-cmd"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "allow-contrib": false,
            "require": "7.1.*"
        }
    },
    "require-dev": {
        "dama/doctrine-test-bundle": "^8.2",
        "deptrac/deptrac": "^3.0",
        "nikic/php-parser": "^5.3",
        "php-http/mock-client": "^1.6",
        "phpstan/phpstan": "^1.12",
        "phpunit/phpunit": "11.*",
        "rector/rector": "^1.2",
        "slevomat/coding-standard": "8.15",
        "squizlabs/php_codesniffer": "^3.11",
        "symfony/browser-kit": "7.1.*",
        "symfony/css-selector": "7.1.*",
        "symfony/debug-bundle": "7.1.*",
        "symfony/lock": "7.1.*",
        "symfony/maker-bundle": "^1.61",
        "symfony/phpunit-bridge": "^7.1",
        "symfony/stopwatch": "7.1.*",
        "symfony/type-info": "7.1.*",
        "symfony/web-profiler-bundle": "7.1.*",
        "zenstruck/foundry": "^2.2"
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant