{"id":28766954,"url":"https://github.com/shipmonk-rnd/phpstan-dev","last_synced_at":"2026-01-29T17:10:59.265Z","repository":{"id":298850047,"uuid":"1000133769","full_name":"shipmonk-rnd/phpstan-dev","owner":"shipmonk-rnd","description":"Smooth tests for PHPStan rules: inplace fixture asserts and autofix!","archived":false,"fork":false,"pushed_at":"2026-01-22T18:23:02.000Z","size":29,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-23T11:28:38.969Z","etag":null,"topics":["assert","fixture","inplace","phpstan","rule","static-analysis"],"latest_commit_sha":null,"homepage":"","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/shipmonk-rnd.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-11T10:09:31.000Z","updated_at":"2026-01-22T18:22:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"a6b6ba58-f3e0-4ea9-98e4-0521e19e5992","html_url":"https://github.com/shipmonk-rnd/phpstan-dev","commit_stats":null,"previous_names":["shipmonk-rnd/phpstan-dev"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/shipmonk-rnd/phpstan-dev","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipmonk-rnd%2Fphpstan-dev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipmonk-rnd%2Fphpstan-dev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipmonk-rnd%2Fphpstan-dev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipmonk-rnd%2Fphpstan-dev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shipmonk-rnd","download_url":"https://codeload.github.com/shipmonk-rnd/phpstan-dev/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipmonk-rnd%2Fphpstan-dev/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28881367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T16:41:59.663Z","status":"ssl_error","status_checked_at":"2026-01-29T16:39:39.641Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["assert","fixture","inplace","phpstan","rule","static-analysis"],"created_at":"2025-06-17T12:37:43.728Z","updated_at":"2026-01-29T17:10:59.259Z","avatar_url":"https://github.com/shipmonk-rnd.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHPStan Rules Development Utilities\n\nInplace fixture asserts and autofix for PHPStan rules.\nNo more manual line adjustments in tests when new code is added to rule fixtures.\n\n## Installation\n\n```bash\ncomposer require --dev shipmonk/phpstan-dev\n```\n\n## Usage\n\n```php\n\u003c?php declare(strict_types = 1);\n\nuse PHPStan\\Rules\\Rule;\n\n/**\n * @extends RuleTestCase\u003cYourRule\u003e\n */\nclass YourRuleTest extends \\ShipMonk\\PHPStanDev\\RuleTestCase\n{\n    public function testRule(): void\n    {\n        $this-\u003eanalyzeFiles([__DIR__ . '/Data/code.php']);\n    }\n}\n```\n\nCreate test fixture at `code.php`:\n\n```php\n\u003c?php\n\n$valid = 'This is valid code';\n$invalid = something(); // error: Rule error message\n```\n\n## Key Features\n\n### In-fixture error asserts of  via `// error:`\n\nMark expected errors directly in test files via PHP comments:\n\n```php\n\u003c?php\n\n$validCode = 'No error expected here';\n$invalidCode = forbidden(); // error: Rule error message\n$alsoInvalid = another(); // error: Rule error message // error: Same-line multi errors\n```\n\n### Autofix\n\nAutomatically generate inplace error comments during development:\n\n```php\npublic function testRule(): void\n{\n    $this-\u003eanalyzeFiles([...], autofix: true);\n}\n```\n\n**⚠️ Important**: Remove `autofix: true` before committing - tests will fail if autofix is enabled.\n\n## Contributing\n- Check your code by `composer check`\n- Autofix coding-style by `composer fix:cs`\n- All functionality must be tested\n\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshipmonk-rnd%2Fphpstan-dev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshipmonk-rnd%2Fphpstan-dev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshipmonk-rnd%2Fphpstan-dev/lists"}