{"id":16695178,"url":"https://github.com/davidepastore/paris-model-generator","last_synced_at":"2026-04-29T01:01:33.080Z","repository":{"id":27274898,"uuid":"30748048","full_name":"DavidePastore/paris-model-generator","owner":"DavidePastore","description":"Paris model generator from database","archived":false,"fork":false,"pushed_at":"2015-02-13T15:18:34.000Z","size":144,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-20T19:31:46.211Z","etag":null,"topics":["database","model","paris","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DavidePastore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-13T08:48:02.000Z","updated_at":"2018-03-06T13:27:41.000Z","dependencies_parsed_at":"2022-08-21T09:50:53.203Z","dependency_job_id":null,"html_url":"https://github.com/DavidePastore/paris-model-generator","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidePastore%2Fparis-model-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidePastore%2Fparis-model-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidePastore%2Fparis-model-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidePastore%2Fparis-model-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DavidePastore","download_url":"https://codeload.github.com/DavidePastore/paris-model-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243501509,"owners_count":20300902,"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","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":["database","model","paris","php"],"created_at":"2024-10-12T17:05:46.551Z","updated_at":"2026-04-29T01:01:33.033Z","avatar_url":"https://github.com/DavidePastore.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# paris-model-generator\n\n[Paris](https://github.com/j4mie/paris) model generator from database.\n\n## Installation\n\n### Using command line\n```sh\n$ composer require davidepastore/paris-model-generator:0.1.*\n```\n\n### Editing composer.json\n\nRequire this generator:\n```json\n\"require\": {\n  \"davidepastore/paris-model-generator\": \"0.1.*\"\n}\n```\n\n## Setup\n\nYou have to setup your application to be sure that the generated classes will be in the right place and with the right\nnamespace. \n**paris-model-generator** uses `composer.json` `extra` property to put its configuration:\n```json\n\"extra\": {\n  \"paris-model-generator\": {\n    \"namespace\": \"VendorName\\\\MyProject\\\\Models\",\n    \"destination-folder\": \"src\\\\\"\n\t}\n}\n```\n\n### namespace\n\nIt is the namespace in which all classes will be generated. It will be also used to create the folder structure to be PSR-4 compliant.\n\n### destination-folder\n\nIt is the folder in which all files (and folder structure) will be generated.\n\n## Usage\n\nBe sure to be in the base directory of the project (where you have your `composer.json` file) and run:\n```sh\n$ vendor/bin/paris-generator models [--force]\n```\nThe generator will ask you information about the database, to be sure to connect to it and to retrieve the list of tables.\nThe list of the supported drivers could be found [here](http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connection-details).\n\n### force option\n\nThe `--force` option will not ask you confirmation to overwrite existing files.\n\n## Include generated files\n\nYou have two chances:\n* psr-4 autoload;\n* classmap autoload.\n\n### PSR-4 autoload\n\nIf your namespace property is set you can use `psr-4` composer autoload:\n```json\n\"autoload\" : {\n  \"psr-4\" : {\n    \"\" : \"your-destination-folder/\"\n  }\n}\n```\n\nDon't forget to set `Model::$auto_prefix_models` to be sure that your model is recognized properly when you use \n`Model::factory` method:\n```php\nModel::$auto_prefix_models = 'YourAmazing\\\\Namespace\\\\';\n```\n\n### Classmap autoload\n\nIf your namespace property is empty or not set, you have to autoload using:\n```json\n\"autoload\": {\n  \"classmap\" : [\n    \"your-destination-folder/\"\n  ]\n}\n```\n\n## Issues\n\nIf you have issues, just open one [here](https://github.com/DavidePastore/paris-model-generator/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidepastore%2Fparis-model-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidepastore%2Fparis-model-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidepastore%2Fparis-model-generator/lists"}