{"id":13562719,"url":"https://github.com/Roave/BetterReflection","last_synced_at":"2025-04-03T19:31:19.245Z","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":"2025-01-21T20:51:37.000Z","size":8264,"stargazers_count":1202,"open_issues_count":16,"forks_count":133,"subscribers_count":29,"default_branch":"6.53.x","last_synced_at":"2025-01-22T00:01:59.306Z","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}},"created_at":"2015-06-04T11:02:42.000Z","updated_at":"2025-01-21T20:51:40.000Z","dependencies_parsed_at":"2023-10-03T08:12:50.947Z","dependency_job_id":"60d9e63b-e168-4eca-83ae-1d25c366551c","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":108,"template":false,"template_full_name":null,"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.53.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247065199,"owners_count":20877723,"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":["hacktoberfest"],"created_at":"2024-08-01T13:01:11.561Z","updated_at":"2025-04-03T19:31:19.202Z","avatar_url":"https://github.com/Roave.png","language":"PHP","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## 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","funding_links":[],"categories":["PHP","Table of Contents","目录","Programming Languages","类库"],"sub_categories":["Code Analysis","代码分析 Code Analysis","[PHP](https://github.com/ziadoz/awesome-php)","代码检查/静态分析"],"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"}