Download the PHP package color-rabbit/doctrine-helper without Composer
On this page you can find all versions of the php package color-rabbit/doctrine-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download color-rabbit/doctrine-helper
More information about color-rabbit/doctrine-helper
Files in color-rabbit/doctrine-helper
Package doctrine-helper
Short Description instead of `php bin/console doctrine:mapping:import`
License Apache-2.0
Informations about the package doctrine-helper
English | Chinese
This tool provides an alternative to the php bin/console doctrine:mapping:import App\\Entity attribute --path=src/Entity
command in Symfony 7, as the doctrine:mapping:import
command has been removed in the latest versions. It allows for importing entity mappings from existing databases into Symfony applications.
Supported Databases
- MySQL
- PostgreSQL
- SQLServer
- Oracle
- Sqlite3
Supported Field Types
MySQL
- Does not support
bit
andenum
types - Converts similar types (e.g.,
double
tofloat
)
PostgreSQL
- Supports numeric, string, date, currency, JSON, UUID, binary, and boolean types
- Does not support complex or custom types
SQLServer
- Supports exact numeric, approximate numeric, date/time, string (char, varchar), Unicode string (nchar, nvarchar), binary string (binary, varbinary), and other data types
- Does not support deprecated or complex data types
Oracle
- Supports various data types such as NUMBER, FLOAT, CHAR, VARCHAR2, DATE, TIMESTAMP, RAW, CLOB, BLOB, etc.
- Does not support other data types
Sqlite
- Supports integer, real, float, double, decimal, varchar, blob, text, date, datetime, and boolean types
Install
Synchronize database tables to the project
Command Line Options
type
: Type of database field description (attribute, xml, yaml, php) (default:attribute
, currently only supportattribute
)--path
: Path to store Entity With Repository class files (default:src/{Entity|Repository}/{$path}
)--ucfirst=true
: Generate Symfony 6 style Entities (private properties in camelCase) for seamless code migration (default: Symfony 7 style with underscored private properties)--table
: Import specific tables to generate corresponding Entity and Repository classes--without-table-prefix
: Ignore table prefix when generating Entities
In this article, we'll use MySQL as an example to demonstrate the generation result.
Assuming your database contains a table called "test," which includes almost all MySQL data types and has unique indexes, composite indexes, and regular indexes:
To generate the corresponding Entity and Repository class files using the command:
The newly created Test entity class will look like this:
Feel free to explore and utilize this tool for managing Doctrine mappings in your Symfony applications!
Contact Us(QQ)
All versions of doctrine-helper with dependencies
symfony/http-client Version ^7.0
doctrine/dbal Version ^3|^4
symfony/framework-bundle Version ^7.0