Download the PHP package k-adam/entity-transpiler without Composer
On this page you can find all versions of the php package k-adam/entity-transpiler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download k-adam/entity-transpiler
More information about k-adam/entity-transpiler
Files in k-adam/entity-transpiler
Package entity-transpiler
Short Description Converts php classes to typescript classes/interfaces
License MIT
Informations about the package entity-transpiler
EntityTranspiler
EntityTranspiler converts your Php classes to classes for your frontend project, so you don't have to define them manually. For example it makes it possible to generate Typescript classes from Doctrine entities, but it works independently from any Php framework.
The project is still a work in progress. The api may change based on feedbacks and be simplified for easier usage. I aim to reach 100% test coverage before the 1.0
release.
Installation
Using Composer:
Usage
Annotate your php classes and its properties, from which you would like to generate frontend class definitions:
Create a configuration file:
Run entity transpiler:
The result should look like this:
Example project
For more advanced examples, see the example project
Todo
Some features are still missing from the project, but I plan to implement them in the future:
- Configurable Inheritance Mapping
- Interfaces
- Enum as object key
- Use covariant returns and contravariant parameters in the Php 7.4 release ( PathResolver / Transformer / etc... )
All versions of entity-transpiler with dependencies
doctrine/annotations Version ^1.5
hanneskod/classtools Version ^1.2
splitbrain/php-cli Version ^1.1