{"id":17226858,"url":"https://github.com/dantleech/phptool","last_synced_at":"2025-03-25T17:48:31.655Z","repository":{"id":66290739,"uuid":"61479274","full_name":"dantleech/phptool","owner":"dantleech","description":"Project inflection and refactoring tool","archived":false,"fork":false,"pushed_at":"2016-06-19T14:51:26.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-30T15:44:24.512Z","etag":null,"topics":[],"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/dantleech.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-19T12:32:59.000Z","updated_at":"2016-06-19T12:33:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"19e15e2a-7667-4a62-81fc-0b80d8ebc206","html_url":"https://github.com/dantleech/phptool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dantleech%2Fphptool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dantleech%2Fphptool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dantleech%2Fphptool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dantleech%2Fphptool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dantleech","download_url":"https://codeload.github.com/dantleech/phptool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245515168,"owners_count":20628116,"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":[],"created_at":"2024-10-15T04:17:25.050Z","updated_at":"2025-03-25T17:48:31.629Z","avatar_url":"https://github.com/dantleech.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"PHPTool\n=======\n\n[![Build Status](https://travis-ci.org/phptool/phptool.svg?branch=master)](https://travis-ci.org/phptool/phptool)\n[![StyleCI](https://styleci.io/repos/\u003crepo-id\u003e/shield)](https://styleci.io/repos/\u003crepo-id\u003e)\n\nRefactoring tool.\n\n- Scans and stores metadata on all classes in your project.\n- Uses static analysis to generate reflection data.\n- Search for a class (and optionally dump metainfo as JSON).\n- Apply refactorings to classes.\n\n**DISCLAIMER**: This was written in haste and without even a single test. It\nis currently just for personal use, in short: \n\n#### DON'T USE IT!!\n\nUsage\n-----\n\nCreate the sqlite datbaase:\n\n```bash\n$ phptool dbal:migrate\n```\n\nScan your project:\n\n```bash\n$ phptool scan path/to/files\n```\n\nFind a class by class or file:\n\n```bash\n$ phptool find \"Symfony\\\\Component\\\\Finder\\\\Glob\"\n$ # or\n$ phptool find vendor/symfony/finder/Glob.php\n+------------------+-------------------------------------------------------------------+\n| path             | /home/daniel/www/dantleech/phptool/vendor/symfony/finder/Glob.php |\n| fqn              | Symfony\\Component\\Finder\\Glob                                     |\n| extends          |                                                                   |\n| interfaces       |                                                                   |\n| property fetches |                                                                   |\n| properties       |                                                                   |\n| methods          | toRegex                                                           |\n+------------------+-------------------------------------------------------------------+\n```\n\nRefactor files:\n\n```bash\n$ /bin/phptool refactor tests/Unit/Scanner/ScannerTest.php --worker=property_fixer\n```\n\nInflecting the file name from a class name (class does not need to exist, uses\ncomposer):\n\n```bash\n$ # inflect the filename from  a class name\n$ phptool inflect:class DTL\\\\PhpTool\\\\Foo\\\\Bar\\\\Bar\nlib/Foo/Bar/Bar.php\n\n$ # uses composer and includes autoload-dev\n$ phptool inflect:class DTL\\\\PhpTool\\\\Tests\\\\Unit\\\\Foo\\\\Bar\\\\Bar\ntests/Unit/Foo/Bar/Bar.php\n\n$ # Inflect class names from filenames\n$ phptool inflect:file lib/Extension/CoreExtension.php\nDTL\\PhpTool\\Extension\\CoreExtension\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdantleech%2Fphptool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdantleech%2Fphptool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdantleech%2Fphptool/lists"}