{"id":17957548,"url":"https://github.com/itinance/doctrine-orm-conv","last_synced_at":"2025-10-05T12:29:16.666Z","repository":{"id":66335492,"uuid":"399764881","full_name":"itinance/doctrine-orm-conv","owner":"itinance","description":"Doctrine-Converter from orm.yml-Files to @Annotations","archived":false,"fork":false,"pushed_at":"2021-12-28T11:35:27.000Z","size":185,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-28T19:09:49.410Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itinance.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-25T09:37:05.000Z","updated_at":"2021-08-29T10:34:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"35df7790-88ba-4c96-b455-e863a9e5f7bd","html_url":"https://github.com/itinance/doctrine-orm-conv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/itinance/doctrine-orm-conv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinance%2Fdoctrine-orm-conv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinance%2Fdoctrine-orm-conv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinance%2Fdoctrine-orm-conv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinance%2Fdoctrine-orm-conv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itinance","download_url":"https://codeload.github.com/itinance/doctrine-orm-conv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinance%2Fdoctrine-orm-conv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278456635,"owners_count":25989948,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-29T10:55:35.393Z","updated_at":"2025-10-05T12:29:16.633Z","avatar_url":"https://github.com/itinance.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"doctrine-orm-conv\n======\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n\n\u003c!-- toc --\u003e\n* [Usage](#usage)\n* [Commands](#commands)\n\u003c!-- tocstop --\u003e\n\n\n# Intro\n\n## The story:\n\nI had to convert a really big bunch of entities across many Symfony and Doctrine based projects from the `orm.yml`-Format into the `@Annotations` format and looked for an approach how to automate. Long story short: there was no proper way instead of migrating everything by myself. \n\nSince the manual migration was very time-consuming and also very error-prone, I decided to automate this.\n\n** DON'T JUDGE ME I AM FAMOUS **\n\nThis tool is just a one-shot-helper-tool. *No clean code*, *no tests*, just a single tool for *fire-and-forget*. \nI decided to publish the tool in case someone else also has the need for it.\n\n*Fun fact: although this tool helps to convert PHP code and was written for PHP projects, I ended up writing it with TypeScript as a NodeJS CLI. \nThe reason is quite funny: I started with PHP, but it was too time-consuming to find a suitable way to parse YML files without having to install any PECL extensions and without needing big frameworks that come with everything for that. NodeJS was the leaner and faster option here (although I am not a Node developer, as you might notice when looking at the code).*\n\n\n# Usage\n\u003c!-- usage --\u003e\n```sh-session\n$ doctrine-orm-conv install -g doctrine-orm-conv\n$ doctrine-orm-conv COMMAND\nrunning command...\n$ doctrine-orm-conv --help [COMMAND]\nUSAGE\n  $ doctrine-orm-conv COMMAND\n...\n```\n\u003c!-- usagestop --\u003e\n# Commands\n\u003c!-- commands --\u003e\n* [`doctrine-orm-conv hello [FILE]`](#doctrine-orm-conver-hello-file)\n* [`doctrine-orm-conv help [COMMAND]`](#doctrine-orm-convicer-help-command)\n\n## `doctrine-orm-conv hello [FILE]`\n\ndescribe the command here\n\n```\nUSAGE\n  $ doctrine-orm-conv hello [FILE]\n\nOPTIONS\n  -c, --columns    include columns\n  -h, --help       show CLI help\n  -n, --name=name  name to print\n\nEXAMPLE\n  $ doctrine-orm-conv hello ./doctrine/customer.orm.yml\n```\n\n_See code: [src/commands/hello.ts](https://github.com/itinance/doctrine-orm-conv/blob/v0.0.0/src/commands/hello.ts)_\n\n## `doctrine-orm-conv help [COMMAND]`\n\ndisplay help for doctrine-orm-conv\n\n```\nUSAGE\n  $ doctrine-orm-conv help [COMMAND]\n\nARGUMENTS\n  COMMAND  command to show help for\n\nOPTIONS\n  --all  see all commands in CLI\n```\n\n## Example Outout\n\nClass Header:\n\n```PHP\n /* \n * @ORM\\Table(\n *     name=\"transaction\",\n *     indexes={\n *         @ORM\\Index(name=\"idx_state\", columns={\"state\"}),\n *         @ORM\\Index(name=\"idx_txid\", columns={\"txid\"}),\n *         @ORM\\Index(name=\"idx_created\", columns={\"created\"}),\n *         @ORM\\Index(name=\"idx_broadcasted\", columns={\"broadcasted\"}),\n *         @ORM\\Index(name=\"idx_finished\", columns={\"finished\"}),\n *         @ORM\\Index(name=\"idx_attempts\", columns={\"attempts\"}),\n *     },\n *     uniqueConstraints={\n *         @ORM\\UniqueConstraint(name=\"idx_hash\", columns={\"hash\"}),\n *     },\n * )\n * */\n```\n\nColumns / Proprties:\n\n```PHP\n    /** @ORM\\Column( type=\"string\", length=255, name=\"hash\", nullable=false ) */\n    private string $hash ;\n\n    /** @ORM\\Column( type=\"text\", name=\"data\", nullable=true ) */\n    private ?string $data ;\n\n    /**\n     * @ORM\\ManyToOne(targetEntity=\"TransactionType\")\n     * @ORM\\JoinColumn(name=\"type_id\", referencedColumnName=\"id\", nullable=false)\n     */\n    private TransactionType $type;\n\n    /**\n     * @ORM\\ManyToOne(targetEntity=\"Customer\")\n     * @ORM\\JoinColumn(name=\"customer_id\", referencedColumnName=\"id\", nullable=true)\n     */\n    private ?Customer $customer;\n```\n\n_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.2/src/commands/help.ts)_\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitinance%2Fdoctrine-orm-conv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitinance%2Fdoctrine-orm-conv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitinance%2Fdoctrine-orm-conv/lists"}