{"id":17117041,"url":"https://github.com/c-lodder/joomlatypehints","last_synced_at":"2025-08-24T00:16:10.631Z","repository":{"id":87373571,"uuid":"99146661","full_name":"C-Lodder/joomlatypehints","owner":"C-Lodder","description":"TypeHint Helper for Joomla! - Generate typehints for deprecated core Joomla! classes, make your IDE happy","archived":false,"fork":false,"pushed_at":"2017-08-02T16:59:32.000Z","size":570,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-29T07:30:04.507Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/C-Lodder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2017-08-02T18:03:31.000Z","updated_at":"2017-08-02T18:03:33.000Z","dependencies_parsed_at":"2023-03-27T13:05:09.579Z","dependency_job_id":null,"html_url":"https://github.com/C-Lodder/joomlatypehints","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/C-Lodder%2Fjoomlatypehints","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/C-Lodder%2Fjoomlatypehints/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/C-Lodder%2Fjoomlatypehints/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/C-Lodder%2Fjoomlatypehints/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/C-Lodder","download_url":"https://codeload.github.com/C-Lodder/joomlatypehints/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245191633,"owners_count":20575248,"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-14T17:50:27.845Z","updated_at":"2025-03-24T00:54:41.360Z","avatar_url":"https://github.com/C-Lodder.png","language":"PHP","funding_links":["https://paypal.me/nicholasakeeba"],"categories":[],"sub_categories":[],"readme":"# TypeHint Helper for Joomla!\n\nGenerate code type hints for deprecated core Joomla! API classes\n\n**Did you find this useful? [Please buy me coffee or lunch :)](https://paypal.me/nicholasakeeba)** Include your Twitter handle for a public thank-you!\n\n## What does it do?\n\nIt lets your IDE provide code completion for the old core Joomla! API classes which have been deprecated and replaced with their\nnamespaced counterparts.\n\nA picture is worth a thousand words. Here's Joomla! 3.8 staging branch on phpStorm.\n\n**Before**\n\n![Before applying any typehints. Boo!](https://raw.githubusercontent.com/nikosdion/joomlatypehints/master/docs/before.png)\n\n**After**\n\n![Code hinting, type checks and deprecated warnings? Check!](https://raw.githubusercontent.com/nikosdion/joomlatypehints/master/docs/after_01.png)\n\n![Code completion and method hints? Check!](https://raw.githubusercontent.com/nikosdion/joomlatypehints/master/docs/after_02.png)\n\n## Usage\n\n### Installation and first use\n\nClone this repository and initialize Composer dependencies in it\n\n```bash\ngit clone https://github.com/nikosdion/joomlatypehints.git\ncd joomlatypehints\ncomposer install\n```\n\nYou can create typehints against either a published version of Joomla! or a Joomla! installation on your computer. The latter is\nuseful for core development against the staging branch.\n\nAgainst a published Joomla! version, e.g. 3.7.4\n```bash\nphp typehint.php --for-version=3.7.4\n```\n\nNinja developer tip: The `--for-version` argument also accepts any published GitHub branch name for the joomla/joomla-cms repository. For example, if you want to generate typehints for the current staging branch:\n\n```bash\nphp typehint.php --for-version=staging\n``` \n\nAgainst a Joomla! installation, e.g. /var/www/joomla-cms\n```bash\nphp typehint.php --for-site=/var/www/joomla-cms\n```\n\nBy default the typehint classes are output in the `generated_hints` folder. You can change that by passing a folder name to the\ncommand (the folder must already exist). For example:\n```bash\nphp typehint.php --for-site=/var/www/joomla-cms /var/www/joomla-cms/typehints\n```\n\nInvoke the application without any parameters to get help. It's self-documenting!\n\n### Using the typehints with phpStorm\n\n* Go to File, Settings.\n* From the left hand tree select Language \u0026 Frameworks, PHP.\n* Click on the Include Path tab.\n* Click the [+] button to the right hand of the include path list.\n* Select _Specify Other..._ and select the generated class hints folder.\n\n## How does it do it?\n\nIt reads Joomla's libraries/classmap.php file and generates fake class files so that the deprecated class extends from the new,\nnamespaced class. **You have to include these files in your IDE's class search path for code completion to work**. \n\nFor example, `JRegistry` stopped existing as a standalone class in Joomla! 3.3.0. It was replaced by `\\Joomla\\Registry\\Registry`.\nAny code which was typehinted to JRegistry stopped showing code hints to developers since 3.3.0.\n\nThis utility creates a fake class definition file for this class in the form\n```php\n/**\n * @deprecated 4.0\n */\nclass JRegistry extends \\Joomla\\Registry\\Registry {}\n``` \n\nThis lets your IDE know that even if you have used `JRegistry` in your DocBlocks / PHP 7.x type hints it should provide code\ncompletion for the new `\\Joomla\\Registry\\Registry` class. At the same time your IDE will mark the old `JRegistry` class as\ndeprecated (if it supports such a feature) so you can eventually refactor it to the new class name.\n\n## Joomla! trademark disclaimer\n\nThis project is not affiliated with or endorsed by the Joomla! Project. It is not supported or warranted by the Joomla! Project or Open Source Matters. Open Source Matters is the trademark holder of the Joomla! name and logo in the United States and other countries. The Joomla! name is used by this project according to the [fair use](https://en.wikipedia.org/wiki/Fair_use) doctrine.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc-lodder%2Fjoomlatypehints","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc-lodder%2Fjoomlatypehints","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc-lodder%2Fjoomlatypehints/lists"}