fw2/glimpse

A lightweight static reflection library for PHP.

0.17.3 2025-04-19 11:38 UTC

This package is auto-updated.

Last update: 2025-04-19 11:39:20 UTC


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.