{"id":15030897,"url":"https://github.com/roave/betterreflection","last_synced_at":"2026-02-01T15:01:48.230Z","repository":{"id":33222101,"uuid":"36865277","full_name":"Roave/BetterReflection","owner":"Roave","description":":crystal_ball: Better Reflection is a reflection API that aims to improve and provide more features than PHP's built-in reflection API.","archived":false,"fork":false,"pushed_at":"2026-01-27T15:02:44.000Z","size":9171,"stargazers_count":1232,"open_issues_count":23,"forks_count":137,"subscribers_count":26,"default_branch":"6.69.x","last_synced_at":"2026-01-27T21:26:19.430Z","etag":null,"topics":["hacktoberfest"],"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/Roave.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2015-06-04T11:02:42.000Z","updated_at":"2026-01-27T15:06:26.000Z","dependencies_parsed_at":"2023-10-03T08:12:50.947Z","dependency_job_id":"4ecc9c7d-d365-42df-9391-7ba7f09c70df","html_url":"https://github.com/Roave/BetterReflection","commit_stats":{"total_commits":2643,"total_committers":67,"mean_commits":39.44776119402985,"dds":0.6424517593643586,"last_synced_commit":"128f4f26cfb28226c606b31958267458f4f2d663"},"previous_names":[],"tags_count":122,"template":false,"template_full_name":null,"purl":"pkg:github/Roave/BetterReflection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roave%2FBetterReflection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roave%2FBetterReflection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roave%2FBetterReflection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roave%2FBetterReflection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Roave","download_url":"https://codeload.github.com/Roave/BetterReflection/tar.gz/refs/heads/6.69.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roave%2FBetterReflection/sbom","scorecard":{"id":121442,"data":{"date":"2025-08-11","repo":{"name":"github.com/Roave/BetterReflection","commit":"0f0ba0a9f69b3f06a4665650ead384ba0139a85e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.3,"checks":[{"name":"Maintained","score":10,"reason":"30 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/22 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch '6.60.x'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T02:31:19.090Z","repository_id":33222101,"created_at":"2025-08-16T02:31:19.090Z","updated_at":"2025-08-16T02:31:19.090Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28980855,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T13:38:33.235Z","status":"ssl_error","status_checked_at":"2026-02-01T13:38:32.912Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["hacktoberfest"],"created_at":"2024-09-24T20:14:28.481Z","updated_at":"2026-02-01T15:01:48.224Z","avatar_url":"https://github.com/Roave.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Better Reflection\n=================\n\n[![Mutation testing badge](https://img.shields.io/endpoint?style=flat\u0026url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2FRoave%2FBetterReflection%2F6.6.x)](https://dashboard.stryker-mutator.io/reports/github.com/Roave/BetterReflection/6.6.x)\n[![Type Coverage](https://shepherd.dev/github/Roave/BetterReflection/coverage.svg)](https://shepherd.dev/github/Roave/BetterReflection)\n[![Latest Stable Version](https://poser.pugx.org/roave/better-reflection/v/stable)](https://packagist.org/packages/roave/better-reflection)\n[![License](https://poser.pugx.org/roave/better-reflection/license)](https://packagist.org/packages/roave/better-reflection)\n\nBetter Reflection is a reflection API that aims to improve and provide more features than PHP's built-in\n[reflection API](https://php.net/manual/en/book.reflection.php).\n\n\u003e [!TIP]\n\u003e Are you reflecting on how to improve your application? We offer consulting on\n\u003e this library, as well as plenty of other development work. If you need any\n\u003e help, feel free to [get in touch](https://roave.com/contact-us/).\n\u003e\n\u003e \\- The Roave Team\n\n## Why is it better?\n\n* You can reflect on classes that are not already loaded, without loading them\n* Ability to reflect on classes directly from a string of PHP code\n* Reflecting directly on closures\n* Ability to extract AST from methods and functions\n* Ability to return AST representation of a class or function\n* Fetch return type declaration and parameter type declarations in PHP 7 code\n* *Moar stuff coming soon!*\n\nTypically you would use Better Reflection for static analysis tooling. It can serve as a baseline to access type\ninformation (e.g. doc blocks, type declarations), method/function body AST fetching etc. for static analysis.\n\nBetter Reflection is **NOT** suited to runtime usage, since performance is **much** worse than PHP built-in reflection.\nIf you do not want to do anything that native PHP reflection can't do, then just use native PHP reflection! The \"Better\"\nin Better Reflection refers to feature, not speed!\n\nBe sure to read more in the [feature documentation](docs/features.md).\n\n## Installation\n\nRequire using composer:\n\n```shell\ncomposer require roave/better-reflection\n```\n\n## Usage\n\n```php\n\u003c?php\n\nuse Roave\\BetterReflection\\BetterReflection;\n\n$classInfo = (new BetterReflection())\n    -\u003ereflector()\n    -\u003ereflectClass(\\Foo\\Bar\\MyClass::class);\n```\n\n## Documentation\n\n* [Compatibility with core Reflection API](docs/compatibility.md)\n* [Basic usage instructions](docs/usage.md)\n* [Using types](docs/types.md)\n* [The features](docs/features.md)\n* [Test suite](https://github.com/Roave/BetterReflection/blob/master/test/README.md)\n\n## Upgrading\n\nPlease refer to the [Upgrade Documentation](UPGRADE.md) documentation to see what is required to upgrade your installed\n`BetterReflection` version.\n\n## Limitations\n\n* PHP cannot autoload functions, therefore we cannot statically reflect functions\n\n## License\n\nThis package is released under the [MIT license](LICENSE).\n\n## Contributing\n\nIf you wish to contribute to the project, please read the [CONTRIBUTING notes](CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froave%2Fbetterreflection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froave%2Fbetterreflection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froave%2Fbetterreflection/lists"}