Skip to content
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

make:user ends with "Undefined constant Doctrine\DBAL\Types\Types::ARRAY" error #1437

Closed
Dreadnoth opened this issue Feb 3, 2024 · 6 comments · Fixed by #1438
Closed

make:user ends with "Undefined constant Doctrine\DBAL\Types\Types::ARRAY" error #1437

Dreadnoth opened this issue Feb 3, 2024 · 6 comments · Fixed by #1438

Comments

@Dreadnoth
Copy link

Hello

During starting a blank new SF 7.0 project , first action that I've did was to secure the newly created app using this link. After running php bin/console make:user and selecting defaults I've received error:
error_maker (for SEO: " Undefined constant Doctrine\DBAL\Types\Types::ARRAY")

I'm attaching project composer.json

@jpmmartin
Copy link

I just installed a symfony 6.4 LTS project and am getting the same error,
Execution of command php bin/console make:entity
My php version is 8.3
My composer.json:

{
    "type": "project",
    "license": "proprietary",
    "minimum-stability": "stable",
    "prefer-stable": true,
    "require": {
        "php": ">=8.1",
        "ext-ctype": "*",
        "ext-iconv": "*",
        "api-platform/core": "^3.2",
        "doctrine/doctrine-bundle": "^2.11",
        "doctrine/doctrine-migrations-bundle": "^3.3",
        "doctrine/orm": "^3.0",
        "nelmio/cors-bundle": "^2.4",
        "phpdocumentor/reflection-docblock": "^5.3",
        "phpstan/phpdoc-parser": "^1.25",
        "symfony/asset": "6.4.*",
        "symfony/console": "6.4.*",
        "symfony/dotenv": "6.4.*",
        "symfony/expression-language": "6.4.*",
        "symfony/flex": "^2",
        "symfony/framework-bundle": "6.4.*",
        "symfony/property-access": "6.4.*",
        "symfony/property-info": "6.4.*",
        "symfony/runtime": "6.4.*",
        "symfony/security-bundle": "6.4.*",
        "symfony/serializer": "6.4.*",
        "symfony/twig-bundle": "6.4.*",
        "symfony/uid": "6.4.*",
        "symfony/validator": "6.4.*",
        "symfony/yaml": "6.4.*"
    },
    "config": {
        "allow-plugins": {
            "php-http/discovery": true,
            "symfony/flex": true,
            "symfony/runtime": 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": "*"
    },
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install %PUBLIC_DIR%": "symfony-cmd"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "allow-contrib": false,
            "require": "6.4.*"
        }
    },
    "require-dev": {
        "symfony/debug-bundle": "6.4.*",
        "symfony/maker-bundle": "^1.53",
        "symfony/stopwatch": "6.4.*",
        "symfony/var-dumper": "6.4.*",
        "symfony/web-profiler-bundle": "6.4.*"
    }
}

Console error output:

[critical] Error thrown while running command "make:entity". Message: "Undefined constant Doctrine\DBAL\Types\Types::ARRAY"
[critical] Uncaught Error: Undefined constant Doctrine\DBAL\Types\Types::ARRAY

In DoctrineHelper.php line 262:
                                                       
Undefined constant Doctrine\DBAL\Types\Types::ARRAY

@njutn95
Copy link
Contributor

njutn95 commented Feb 3, 2024

This is because of the Doctrine 4.0 release which happened a few hours ago.

@onilopic
Copy link

onilopic commented Feb 4, 2024

For me helps on Symfony 6.4 downgrade package dbal
composer require doctrine/dbal ^3.8

@roelandmoors
Copy link

For me helps on Symfony 6.4 downgrade package dbal composer require doctrine/dbal ^3.8

This also worked for Symfony 7

@guirou62
Copy link

guirou62 commented Feb 5, 2024

I have the same issue, I hope they will correct this as quick as possible :)

@element-code
Copy link

Ref doctrine/dbal@763b4ad

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.

7 participants