symfony / maker-bundle

Symfony Maker Bundle
https://symfony.com/
MIT License
3.35k stars 406 forks source link

Symfony 5.1 - make:entity problems MySQL Driver? #638

Closed velreine closed 4 years ago

velreine commented 4 years ago

When trying to run php bin/console make:entity Tenant\ProductNameCountry

I get an exception from PDOMySQL\Driver.php , even though i don't use MySQL anywhere i use Postgres, putting a dump into /vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMysql/Driver.php::connect()

public function connect(array $params...) { dump($params); try .... }

reveals array:8 [ 'host' => 'localhost' 'port' => null 'user' => 'root' 'password' => null 'driver' => 'pdo_mysql' 'driverOptions' => [] 'defaultTableOptions' => array:1 [ 'collate' => 'utf8mb4_unicode_ci' ] 'charset' => 'utf8mb4' ]

For the heck of it i spinned up a MySQL docker container on my localhost with a root user and no password, after doing that make:entity succesfully created: "src/Entity/Tenant/ProductNameCountry.php" and "src/Repository/Tenant/ProductNameCountryRepository.php"

composer info: api-platform/api-pack v1.2.2 A pack for API Platform api-platform/core v2.5.6 Build a fully-featured hypermedia or GraphQL API in minutes blackfire/php-sdk v1.23.0 Blackfire.io PHP SDK brick/math 0.8.15 Arbitrary-precision arithmetic library composer/ca-bundle 1.2.7 Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle. composer/xdebug-handler 1.4.2 Restarts a process without Xdebug. doctrine/annotations 1.10.3 Docblock Annotations Parser doctrine/cache 1.10.1 PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as... doctrine/collections 1.6.5 PHP Doctrine Collections library that adds additional functionality on top of PHP arrays. doctrine/common 2.13.3 PHP Doctrine Common project is a library that provides additional functionality that other Doctrine proje... doctrine/data-fixtures 1.4.3 Data Fixtures for all Doctrine Object Managers doctrine/dbal 2.10.2 Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and m... doctrine/doctrine-bundle 2.1.0 Symfony DoctrineBundle doctrine/doctrine-fixtures-bundle 3.3.1 Symfony DoctrineFixturesBundle doctrine/doctrine-migrations-bundle 3.0.1 Symfony DoctrineMigrationsBundle doctrine/event-manager 1.1.0 The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctri... doctrine/inflector 1.4.3 PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowe... doctrine/instantiator 1.3.1 A small, lightweight utility to instantiate objects in PHP without invoking their constructors doctrine/lexer 1.2.1 PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers. doctrine/migrations 3.0.1 PHP Doctrine Migrations project offer additional functionality on top of the database abstraction layer (... doctrine/orm v2.7.3 Object-Relational-Mapper for PHP doctrine/persistence 1.3.7 The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctr... doctrine/reflection 1.2.1 The Doctrine Reflection project is a simple library used by the various Doctrine projects which adds some... doctrine/sql-formatter 1.1.0 a PHP SQL highlighting library egulias/email-validator 2.1.18 A library for validating emails against several RFCs fig/link-util 1.1.1 Common utility implementations for HTTP links fzaninotto/faker v1.9.1 Faker is a PHP library that generates fake data for you. hautelook/alice-bundle 2.7.2 Symfony bundle to manage fixtures with Alice and Faker. hoa/compiler 3.17.08.08 The Hoa\Compiler library. hoa/consistency 1.17.05.02 The Hoa\Consistency library. hoa/event 1.17.01.13 The Hoa\Event library. hoa/exception 1.17.01.16 The Hoa\Exception library. hoa/file 1.17.07.11 The Hoa\File library. hoa/iterator 2.17.01.10 The Hoa\Iterator library. hoa/math 1.17.05.16 The Hoa\Math library. hoa/protocol 1.17.01.14 The Hoa\Protocol library. hoa/regex 1.17.01.13 The Hoa\Regex library. hoa/stream 1.17.02.21 The Hoa\Stream library. hoa/ustring 4.17.01.16 The Hoa\Ustring library. hoa/visitor 2.17.01.16 The Hoa\Visitor library. hoa/zformat 1.17.01.10 The Hoa\Zformat library. jean85/pretty-package-versions 1.2 A wrapper for ocramius/package-versions to get pretty versions strings jetbrains/phpstorm-stubs v2019.3 PHP runtime & extensions header files for PhpStorm jms/metadata 2.3.0 Class/method/property metadata management in PHP jms/serializer 3.7.0 Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML. justinrainbow/json-schema 5.2.10 A library to validate a json schema. laminas/laminas-code 3.4.1 Extensions to the PHP Reflection API, static code scanning, and code generation laminas/laminas-eventmanager 3.2.1 Trigger and listen to events within a PHP application laminas/laminas-zendframework-bridge 1.0.4 Alias legacy ZF class names to Laminas Project equivalents. lcobucci/jwt 3.3.2 A simple library to work with JSON Web Token and JSON Web Signature lexik/jwt-authentication-bundle v2.8.0 This bundle provides JWT authentication for your Symfony REST API monolog/monolog 2.1.0 Sends your logs to files, sockets, inboxes, databases and various web services myclabs/deep-copy 1.9.5 Create deep copies (clones) of your objects namshi/jose 7.2.3 JSON Object Signing and Encryption library for PHP. nelmio/alice 3.7.1 Expressive fixtures generator nelmio/cors-bundle 2.0.1 Adds CORS (Cross-Origin Resource Sharing) headers support in your Symfony application nette/finder v2.5.2 🔍 Nette Finder: find files and directories with an intuitive API. nette/robot-loader v3.2.3 🍀 Nette RobotLoader: high performance and comfortable autoloader that will search and autoload classes... nette/utils v3.1.2 🛠 Nette Utils: lightweight utilities for string & a rray manipulation, image handling, safe JSON encodi... nikic/php-parser v4.5.0 A PHP parser written in PHP ocramius/package-versions 1.9.0 Composer plugin that provides efficient querying for installed package versions (no runtime IO) ocramius/proxy-manager 2.8.0 A library providing utilities to generate, instantiate and generally operate with Object Proxies ondram/ci-detector 3.4.0 Detect continuous integration environment and provide unified access to properties of current build phpdocumentor/reflection-common 2.1.0 Common reflection classes used by phpdocumentor to reflect the code structure phpdocumentor/reflection-docblock 5.1.0 With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve in... phpdocumentor/type-resolver 1.2.0 A PSR-5 based resolver of Class names, Types and Structural Element Names phpstan/phpdoc-parser 0.4.8 PHPDoc parser with support for nullable, intersection and generic types phpstan/phpstan 0.12.31 PHPStan - PHP Static Analysis Tool phpstan/phpstan-phpunit 0.12.11 PHPUnit extensions and rules for PHPStan psr/cache 1.0.1 Common interface for caching libraries psr/container 1.0.0 Common Container Interface (PHP FIG PSR-11) psr/event-dispatcher 1.0.0 Standard interfaces for event handling. psr/link 1.0.0 Common interfaces for HTTP links psr/log 1.1.3 Common interface for logging libraries psr/simple-cache 1.0.1 Common interfaces for simple caching ramsey/collection 1.0.1 A PHP 7.2+ library for representing and manipulating collections. ramsey/uuid 4.0.1 A PHP library for generating and working with universally unique identifiers (UUIDs). ramsey/uuid-doctrine 1.6.0 Allow the use of ramsey/uuid as a Doctrine field type. rector/rector v0.7.39 Instant upgrade and refactoring of your PHP code sebastian/comparator 4.0.2 Provides the functionality to compare PHP values for equality sebastian/diff 4.0.1 Diff implementation sebastian/exporter 4.0.1 Provides the functionality to export PHP variables for visualization sebastian/recursion-context 4.0.1 Provides functionality to recursively process PHP variables sensio/framework-extra-bundle v5.5.6 This bundle provides a way to configure your controllers with annotations symfony/apache-pack v1.0.1 A pack for Apache support in Symfony symfony/asset v5.1.2 Symfony Asset Component symfony/browser-kit v5.1.2 Symfony BrowserKit Component symfony/cache v5.1.2 Symfony Cache component with PSR-6, PSR-16, and tags symfony/cache-contracts v2.1.2 Generic abstractions related to caching symfony/config v5.1.2 Symfony Config Component symfony/console v5.1.2 Symfony Console Component symfony/css-selector v5.1.2 Symfony CssSelector Component symfony/debug-bundle v5.1.2 Symfony DebugBundle symfony/debug-pack v1.0.8 A debug pack for Symfony projects symfony/dependency-injection v5.1.2 Symfony DependencyInjection Component symfony/deprecation-contracts v2.1.2 A generic function and convention to trigger deprecation notices symfony/doctrine-bridge v5.1.2 Symfony Doctrine Bridge symfony/dom-crawler v5.1.2 Symfony DomCrawler Component symfony/dotenv v5.1.2 Registers environment variables from a .env file symfony/error-handler v5.1.2 Symfony ErrorHandler Component symfony/event-dispatcher v5.1.2 Symfony EventDispatcher Component symfony/event-dispatcher-contracts v2.1.2 Generic abstractions related to dispatching event symfony/expression-language v5.1.2 Symfony ExpressionLanguage Component symfony/filesystem v5.1.2 Symfony Filesystem Component symfony/finder v5.1.2 Symfony Finder Component symfony/flex v1.8.4 Composer plugin for Symfony symfony/form v5.1.2 Symfony Form Component symfony/framework-bundle v5.1.2 Symfony FrameworkBundle symfony/http-foundation v5.1.2 Symfony HttpFoundation Component symfony/http-kernel v5.1.2 Symfony HttpKernel Component symfony/inflector v5.1.2 Symfony Inflector Component symfony/intl v5.1.2 A PHP replacement layer for the C intl extension that includes additional data from the ICU library. symfony/mailer v5.1.2 Symfony Mailer Component symfony/maker-bundle v1.19.0 Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forge... symfony/mime v5.1.2 A library to manipulate MIME messages symfony/monolog-bridge v5.1.2 Symfony Monolog Bridge symfony/monolog-bundle v3.5.0 Symfony MonologBundle symfony/options-resolver v5.1.2 Symfony OptionsResolver Component symfony/orm-pack v1.0.8 A pack for the Doctrine ORM symfony/phpunit-bridge v5.1.2 Symfony PHPUnit Bridge symfony/polyfill-intl-grapheme v1.17.1 Symfony polyfill for intl's grapheme_* functions symfony/polyfill-intl-icu v1.17.1 Symfony polyfill for intl's ICU-related data and classes symfony/polyfill-intl-idn v1.17.1 Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions symfony/polyfill-intl-normalizer v1.17.1 Symfony polyfill for intl's Normalizer class and related functions symfony/polyfill-mbstring v1.17.1 Symfony polyfill for the Mbstring extension symfony/polyfill-php73 v1.17.1 Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions symfony/polyfill-php80 v1.17.1 Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions symfony/polyfill-uuid v1.17.1 Symfony polyfill for uuid functions symfony/process v5.1.2 Symfony Process Component symfony/profiler-pack v1.0.4 A pack for the Symfony web profiler symfony/property-access v5.1.2 Symfony PropertyAccess Component symfony/property-info v5.1.2 Symfony Property Info Component symfony/routing v5.1.2 Symfony Routing Component symfony/security-bundle v5.1.2 Symfony SecurityBundle symfony/security-core v5.1.2 Symfony Security Component - Core Library symfony/security-csrf v5.1.2 Symfony Security Component - CSRF Library symfony/security-guard v5.1.2 Symfony Security Component - Guard symfony/security-http v5.1.2 Symfony Security Component - HTTP Integration symfony/serializer v5.1.2 Symfony Serializer Component symfony/service-contracts v2.1.2 Generic abstractions related to writing services symfony/stopwatch v5.1.2 Symfony Stopwatch Component symfony/string v5.1.2 Symfony String component symfony/test-pack v1.0.6 A pack for functional and end-to-end testing within a Symfony app symfony/translation v5.1.2 Symfony Translation Component symfony/translation-contracts v2.1.2 Generic abstractions related to translation symfony/twig-bridge v5.1.2 Symfony Twig Bridge symfony/twig-bundle v5.1.2 Symfony TwigBundle symfony/uid v5.1.2 Symfony Uid component symfony/validator v5.1.2 Symfony Validator Component symfony/var-dumper v5.1.2 Symfony mechanism for exploring and dumping PHP variables symfony/var-exporter v5.1.2 A blend of var_export() + serialize() to turn any serializable data structure to plain PHP code symfony/web-link v5.1.2 Symfony WebLink Component symfony/web-profiler-bundle v5.1.2 Symfony WebProfilerBundle symfony/yaml v5.1.2 Symfony Yaml Component symplify/auto-bind-parameter v8.0.1 Auto bind parameters for your Symfony applications symplify/autowire-array-parameter v8.0.1 Autowire array parameters for your Symfony applications symplify/console-color-diff v8.0.1 Package to print diffs in console with colors symplify/package-builder v8.0.1 Dependency Injection, Console and Kernel toolkit for Symplify packages. symplify/parameter-name-guard v8.0.1 Prevent silent parameter typos that silently break your app symplify/set-config-resolver v8.0.1 Resolve config and sets from configs and cli opptions for CLI applications symplify/smart-file-system v8.0.1 Sanitized FileInfo with safe getRealPath() and other handy methods theofidry/alice-data-fixtures 1.2.0 Nelmio alice extension to persist the loaded fixtures. tracy/tracy v2.7.5 😎 Tracy: the addictive tool to ease debugging PHP code for cool developers. Friendly design, logging, ... twig/twig v3.0.3 Twig, the flexible, fast, and secure template language for PHP webimpress/safe-writer 2.0.1 Tool to write files safely, to avoid race conditions webmozart/assert 1.9.0 Assertions to validate method input/output with nice error messages. webonyx/graphql-php v0.13.8 A PHP port of GraphQL reference implementation willdurand/negotiation v2.3.1 Content Negotiation tools for PHP provided as a standalone library.

velreine commented 4 years ago

This is probably a doctrine issue i just figured out by running: php bin/console debug:config doctrine

That is setting the default_connection to 'default' , even though i have set that key in my own config.