bartlett / php-reflect
Adds the ability to reverse-engineer classes, interfaces, functions, constants, namespaces, traits and more.
Installs: 93 111
Dependents: 1
Suggesters: 0
Security: 0
Stars: 59
Watchers: 5
Forks: 13
Open Issues: 0
Requires
- php: ^7.1.3|^8.0
- ext-date: *
- ext-json: *
- ext-pcre: *
- ext-phar: *
- ext-reflection: *
- ext-spl: *
- ext-tokenizer: *
- doctrine/collections: ^1.4
- justinrainbow/json-schema: ^5.2
- nikic/php-parser: ^4.5
- phpdocumentor/reflection-docblock: ^4.3|^5.2
- phpdocumentor/type-resolver: ~0.4 || ^1.0.0
- psr/log: ^1.0
- sebastian/version: ^2.0
- seld/jsonlint: ^1.4
- symfony/console: ^4.4|^5.0
- symfony/dependency-injection: ^4.4|^5.0
- symfony/event-dispatcher: ^4.4|^5.0
- symfony/finder: ^4.4|^5.0
- symfony/stopwatch: ^4.4|^5.0
Requires (Dev)
- monolog/monolog: ^1.10
Suggests
- bartlett/monolog-callbackfilterhandler: Advanced filtering strategies for Monolog
- bartlett/monolog-growlhandler: Sends notifications to Growl for Monolog
- bartlett/phpunit-loggertestlistener: Allow logging unit tests to your favorite PSR-3 logger interface
- bartlett/umlwriter: Allow writing UML class diagrams (Graphviz or PlantUML)
- doctrine/cache: Allow caching results
This package is auto-updated.
Last update: 2022-02-11 05:44:26 UTC
README
PHP Reflect
PHP Reflect is a library that adds the ability to reverse-engineer classes, interfaces, functions, constants, namespaces, traits and more.
Running on PHP greater than 7.1 for parsing source code in a format PHP 5.2 to PHP 7.4
Requirements
- PHP 7.1.3 or greater
- PHPUnit 7 or greater (if you want to run unit tests)
Installation
The recommended way to install this library is through composer. If you don't know yet what is composer, have a look on introduction.
composer require bartlett/php-reflect
Build PHAR distribution
To build PHAR distribution, you'll need to get a copy of this project https://github.com/humbug/box
WARNING: Don't forget to run following command (before compiling archive), if you want to have a PHAR manifest up-to-date !
php phar-manifest.php > manifest.txt
Run following command
box.phar compile
You should get output that look like
Box version 3.8.4@120b0a3 2019-12-13 17:22:43 UTC
// Loading the configuration file "/shared/backups/bartlett/php-reflect/box.json.dist".
🔨 Building the PHAR "/shared/backups/bartlett/php-reflect/bin/phpreflect.phar"
? No compactor to register
? Adding main file: /shared/backups/bartlett/php-reflect/bin/phpreflect
? Adding requirements checker
? Adding binary files
> No file found
? Auto-discover files? No
? Exclude dev files? No
? Adding files
> 890 file(s)
? Using stub file: /shared/backups/bartlett/php-reflect/phar-stub.php
? Skipping dumping the Composer autoloader
? Removing the Composer dump artefacts
? Compressing with the algorithm "GZ"
> Warning: the extension "zlib" will now be required to execute the PHAR
? Setting file permissions to 0755
* Done.
No recommendation found.
No warning found.
// PHAR: 916 files (987.43KB)
// You can inspect the generated PHAR with the "info" command.
// Memory usage: 20.52MB (peak: 21.40MB), time: 1sec
Documentation
The documentation for PHP Reflect 4.2 is available in English to read it online or download to read it later (multiple formats).
AsciiDoc source code are available on docs
folder of the repository.
Contributors
- Laurent Laville (Lead Dev)
- Thanks to Nikita Popov who wrote a marvellous PHP Parser and simplify the job of PHP Reflect.
- Thanks also to Remi Collet, a contributor of first hours.
License
This project is licensed under the BSD-3-Clause License - see the LICENSE file for details