{"id":13684188,"url":"https://github.com/LordSimal/cakephp-psalm","last_synced_at":"2025-04-30T20:33:22.892Z","repository":{"id":62519061,"uuid":"443187815","full_name":"LordSimal/cakephp-psalm","owner":"LordSimal","description":"A CakePHP plugin for psalm","archived":false,"fork":false,"pushed_at":"2024-07-28T16:26:34.000Z","size":20,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"1.x","last_synced_at":"2024-11-07T02:36:48.837Z","etag":null,"topics":["cakephp","php","psalm-plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/LordSimal.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-12-30T21:24:52.000Z","updated_at":"2024-07-28T16:26:28.000Z","dependencies_parsed_at":"2024-03-15T18:09:30.634Z","dependency_job_id":null,"html_url":"https://github.com/LordSimal/cakephp-psalm","commit_stats":{"total_commits":5,"total_committers":2,"mean_commits":2.5,"dds":"0.19999999999999996","last_synced_commit":"a1ca1b7f686dbc310b08ada3fe50b05e5c1786fa"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":"psalm/psalm-plugin-skeleton","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LordSimal%2Fcakephp-psalm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LordSimal%2Fcakephp-psalm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LordSimal%2Fcakephp-psalm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LordSimal%2Fcakephp-psalm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LordSimal","download_url":"https://codeload.github.com/LordSimal/cakephp-psalm/tar.gz/refs/heads/1.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224224786,"owners_count":17276428,"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":["cakephp","php","psalm-plugin"],"created_at":"2024-08-02T14:00:30.652Z","updated_at":"2025-04-30T20:33:22.885Z","avatar_url":"https://github.com/LordSimal.png","language":"PHP","funding_links":[],"categories":["Code Analysis","Plugins"],"sub_categories":["Code Analysis"],"readme":"# Psalm plugin for CakePHP\n\n[![Latest Stable Version](https://poser.pugx.org/lordsimal/cakephp-psalm/v)](https://packagist.org/packages/lordsimal/cakephp-psalm) [![Total Downloads](https://poser.pugx.org/lordsimal/cakephp-psalm/downloads)](https://packagist.org/packages/lordsimal/cakephp-psalm) [![Latest Unstable Version](https://poser.pugx.org/lordsimal/cakephp-psalm/v/unstable)](https://packagist.org/packages/lordsimal/cakephp-psalm) [![License](https://poser.pugx.org/lordsimal/cakephp-psalm/license)](https://packagist.org/packages/lordsimal/cakephp-psalm)\n\n## Overview\nThis plugin provides correct return types for CakePHP specific methods in psalm.\n\n## Quickstart\nPlease refer to the [full Psalm documentation](https://psalm.dev/quickstart) for a more detailed guide on\nhow to use Psalm in your project.\n\nFirst you need to install the psalm base package and create a `psalm.xml`\n```bash\ncomposer require --dev vimeo/psalm\n./vendor/bin/psalm --init\n```\n\nNext you will need to require this package and enable it in psalm\n```bash\ncomposer require --dev lordsimal/cakephp-psalm\n./vendor/bin/psalm-plugin enable lordsimal/cakephp-psalm\n```\n\nFinally you can try it out\n```bash\n./vendor/bin/psalm\n```\n\n## How it works\n\nCurrently only the following return types are being corrected:\n\n* `Cake\\ORM\\Locator\\LocatorInterface::get()`\n* `Cake\\ORM\\Locator\\LocatorAwareTrait::fetchTable()`\n\nThe functionality for this can be found in `src/Type/TableLocatorHandler.php`\n\nIn there the `getClassLikeNames()` tells psalm on which classes it needs to\nchange return types.\n\nIn the `getMethodReturnType()` we check which method is currently called and\nget the first argument value from that call.\n\nWith that value we get the \"real\" FQCN of the table which is returned in runtime \nand tell psalm to use that instead of the default `Cake\\ORM\\Table`.\n\n## Help needed\n\nI would definitely appreciate help related to the following aspects of this plugin:\n\n* Testing\n* Including more return types like [CakeDC/cakephp-phpstan](https://github.com/CakeDC/cakephp-phpstan) already does for PHPStan\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLordSimal%2Fcakephp-psalm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLordSimal%2Fcakephp-psalm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLordSimal%2Fcakephp-psalm/lists"}