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

Attempted to call an undefined method named "setMiddlewares" of class "Doctrine\DBAL\Configuration". #1491

Closed
Ahummeling opened this issue Mar 31, 2022 · 2 comments

Comments

@Ahummeling
Copy link

Ahummeling commented Mar 31, 2022

With version 2.6.0 of this bundle, I started getting the following error:

Attempted to call an undefined method named "setMiddlewares" of class "Doctrine\DBAL\Configuration".

I suppose this is due to some other Doctrine package not being updated as well on my end. In either way, I think the cause was introduced by #1472 .
I've made a PR that would fix the issue for me.
PR: #1492

Full stack trace:

bin/console lint:container
Symfony\Component\ErrorHandler\Error\UndefinedMethodError {#2659
  #message: "Attempted to call an undefined method named "setMiddlewares" of class "Doctrine\DBAL\Configuration"."
  #code: 0
  #file: "./Tests/App/var/cache/test/ContainerElFnfiZ/getDoctrine_Dbal_DefaultConnection_ConfigurationService.php"
  #line: 25
  trace: {
    ./Tests/App/var/cache/test/ContainerElFnfiZ/getDoctrine_Dbal_DefaultConnection_ConfigurationService.php:25 {
      ContainerElFnfiZ\getDoctrine_Dbal_DefaultConnection_ConfigurationService::do($container, $lazyLoad = true)
      › $instance->setSQLLogger(($container->privates['doctrine.dbal.logger.chain.default'] ?? $container->load('getDoctrine_Dbal_Logger_Chain_DefaultService')));$instance->setMiddlewares([]);
      › 
    }
    ./Tests/App/var/cache/test/ContainerElFnfiZ/Adivare_AdminBundle_Tests_AppKernelTestDebugContainer.php:358 { …}
    ./Tests/App/var/cache/test/ContainerElFnfiZ/getDoctrine_Dbal_DefaultConnectionService.php:23 { …}
    ./Tests/App/var/cache/test/ContainerElFnfiZ/Adivare_AdminBundle_Tests_AppKernelTestDebugContainer.php:358 { …}
    ./Tests/App/var/cache/test/ContainerElFnfiZ/getDoctrine_Orm_DefaultEntityManagerService.php:39 { …}
    ./Tests/App/var/cache/test/ContainerElFnfiZ/getDoctrine_Orm_DefaultEntityManagerService.php:23 { …}
    ./Tests/App/var/cache/test/ContainerElFnfiZ/EntityManager_9a5be93.php:246 { …}
    ./Tests/App/var/cache/test/ContainerElFnfiZ/EntityManager_9a5be93.php:246 { …}
    ./vendor/symfony/doctrine-bridge/CacheWarmer/ProxyCacheWarmer.php:54 { …}
    ./vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php:99 { …}
    ./vendor/symfony/http-kernel/Kernel.php:587 { …}
    ./vendor/symfony/http-kernel/Kernel.php:789 { …}
    ./vendor/symfony/http-kernel/Kernel.php:128 { …}
    ./vendor/symfony/framework-bundle/Console/Application.php:168 { …}
    ./vendor/symfony/framework-bundle/Console/Application.php:74 { …}
    ./vendor/symfony/console/Application.php:171 { …}
    ./vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php:54 { …}
    ./vendor/autoload_runtime.php:36 { …}
    ./Tests/App/bin/console:9 { …}
  }
}

composer.json:

    "require": {
        "php": "^8.0",
        "ext-curl": "*",
        "ext-dom": "*",
        "ext-fileinfo": "*",
        "ext-json": "*",
        "ext-openssl": "*",
        "adivare/billing-client": "^2.4",
        "cocur/slugify": "^4.0",
        "doctrine/dbal": "^2.13",
        "doctrine/doctrine-bundle": "^2.0.0",
        "doctrine/lexer": "^1.1",
        "doctrine/orm": "^2.8",
        "egulias/email-validator": "^2.1.25 | ^3.1.0",
        "erusev/parsedown": "^1.7.2",
        "friendsofsymfony/ckeditor-bundle": "^2.1",
        "liip/imagine-bundle": "^2.7",
        "monolog/monolog": "^1.26.1|^2",
        "omines/datatables-bundle": "^0.5",
        "ramsey/uuid-doctrine": "^1.4",
        "sensio/framework-extra-bundle": "^6.0.0",
        "sentry/sentry-symfony": "^4.0.0",
        "spatie/schema-org": "^3.0.0",
        "symfony/asset": "^5.3",
        "symfony/console": "^5.3",
        "symfony/dependency-injection": "^5.3",
        "symfony/doctrine-bridge": "^5.3",
        "symfony/form": "^5.3",
        "symfony/framework-bundle": "^5.3",
        "symfony/http-kernel": "^5.3.12",
        "symfony/intl": "^5.3",
        "symfony/lock": "^5.3",
        "symfony/monolog-bundle": "^3.5.0",
        "symfony/options-resolver": "^5.3",
        "symfony/property-access": "^5.3",
        "symfony/proxy-manager-bridge": "^5.3",
        "symfony/routing": "^5.3",
        "symfony/security-bundle": "^5.3.12",
        "symfony/twig-bundle": "^5.3",
        "symfony/validator": "^5.3",
        "symfony/webpack-encore-bundle": "^1.7",
        "symfony/yaml": "^5.3",
        "thepixeldeveloper/sitemap": "^5.1"
    },
    "require-dev": {
        "adivare/quality-tools": "^2.1",
        "doctrine/doctrine-fixtures-bundle": "^3.3",
        "doctrine/doctrine-migrations-bundle": "^3.2",
        "escapestudios/symfony2-coding-standard": "^3.4",
        "friendsofphp/php-cs-fixer": "^3.5",
        "league/flysystem": "^2.4",
        "league/flysystem-aws-s3-v3": "^2.0",
        "phpmd/phpmd": "^2.6",
        "phpstan/phpstan": "^1.4",
        "squizlabs/php_codesniffer": "^3.6.1",
        "symfony/browser-kit": "^5.4.2",
        "symfony/css-selector": "^5.4.2",
        "symfony/dotenv": "^5.4.2",
        "symfony/messenger": "^5.4.2",
        "symfony/phpunit-bridge": "^6.0.0",
        "symfony/runtime": "^5.4.1"
    }

composer.lock is not in my vcs, the packages are installed via composer update -n --prefer-stable --no-scripts

@dmaicher
Copy link
Contributor

See #1485.

@Ahummeling
Copy link
Author

See #1485.

Oh shoot sorry, forgot to check the closed issues

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

No branches or pull requests

2 participants