fw2 / glimpse
A lightweight static reflection library for PHP.
0.17.3
2025-04-19 11:38 UTC
Requires
- nikic/php-parser: ^5.4
Requires (Dev)
- mockery/mockery: ^1.6
- pestphp/pest: ^3.7
- pestphp/pest-plugin-type-coverage: ^3.5
- phpstan/phpstan: ^2.1
- slevomat/coding-standard: ^8.17
- squizlabs/php_codesniffer: ^3.12
- symfony/var-dumper: ^7.2
README
fw2/glimpse
is a static reflection library for PHP. It uses nikic/php-parser
to analyze source code without executing it.
Installation
Use Composer to install the package:
composer require fw2/glimpse
Example Usage
use Fw2\Glimpse\Reflector; $reflector = Reflector::createInstance(); $reflection = $reflector->reflect('MyClass');
Development
Running phpstan
$ vendor/bin/phpstan analyze src --level=6
Running code-style
Show violations
$ vendor/bin/phpcs
Autofix if possible
$ vendor/bin/phpcbf
Running tests
$ vendor/bin/pest
Coverage
$ vendor/bin/pest --coverage
License
This package is licensed under the MIT license.