Download the PHP package leongersen/entity-generator without Composer
On this page you can find all versions of the php package leongersen/entity-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download leongersen/entity-generator
More information about leongersen/entity-generator
Files in leongersen/entity-generator
Download leongersen/entity-generator
More information about leongersen/entity-generator
Files in leongersen/entity-generator
Vendor leongersen
Package entity-generator
Short Description Database-first Doctrine entity generator with oneToMany and manyToOne support
License MIT
Package entity-generator
Short Description Database-first Doctrine entity generator with oneToMany and manyToOne support
License MIT
Please rate this library. Is it a good library?
Informations about the package entity-generator
Entity Generator
The Doctrine Project will be removing support for generating entities in Doctrine 3.
Not all development workflows will fit the proposed entity-first database management strategy.
To keep supporting a database-first workflow this project implements an alternative database oriented entity generator.
Features
- Generate entities with type annotations, getters, setters, adders and removers;
- Supports
oneToMany
andmanyToOne
relationships, including pluralization of properties and methods.
License
This project is licensed MIT and can be used for free in any personal or commercial project.
Usage
Options
dsn
Accepts the same format as Doctrine, so the value configured in.env
can be usednamespace
Namespace for the generated entities (DefaultApp\Entity
)directory
Output directory for the generated entities (Defaultsrc/Entity
)collection-interface
Interface name for the collection type to use in the generated entities (Default\Doctrine\Common\Collections\Collection
)collection-implementation
(Default\Doctrine\Common\Collections\ArrayCollection
)
Using a DSN from a .env file
Implementation
- A mapping is generated from an existing database using
SHOW CREATE TABLE
. - Entity classes are rendered using a Twig template.
Limitations
- Only provides a
\PDO
based driver and an mapper forMySQL
-like sql dialects. - Annotations for (unique) indexes are not (yet) implemented
ManyToMany
relations are not (yet) supported (motivation)- Doctrine Custom types are not supported
Open issues
- Naming conflicts on
xyx_id
with a foreign key and fieldxyx
(both becomexyz
) - Naming conflicts on multiple foreign keys from one table to another (
xyz.abc_1_id
andxyz.abc_2_id
both becomexyz.abcs
) - Blobs are not yet implemented
All versions of entity-generator with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.1
greenlion/php-sql-parser Version ^4.3
nyholm/dsn Version ^1.0
symfony/console Version ^4.0|^5.0
symfony/filesystem Version ^4.0|^5.0
twig/twig Version ^2.12|^3.0
greenlion/php-sql-parser Version ^4.3
nyholm/dsn Version ^1.0
symfony/console Version ^4.0|^5.0
symfony/filesystem Version ^4.0|^5.0
twig/twig Version ^2.12|^3.0
The package leongersen/entity-generator contains the following files
Loading the files please wait ....