Download the PHP package suralc/pvra without Composer
On this page you can find all versions of the php package suralc/pvra. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package pvra
Short Description Detects the php-version requirement of a given piece of code.
License MIT
Informations about the package pvra
If you are looking for a battle-tested library with a possibly cleaner architecture and similar features you may find your app of choice at llaville/php-compat-info for now.
Php Version Requirement Analyser
This repository contains a library and a console application to validate your php files' version requirements. The library makes heavy use of the PHP-Parser library. The api is not yet final, if you want to use the library component yourself you may want to lock your dependencies on a specific tag.
Index
- Installation and usage of the cli app
- Installation and usage of the library
- Build the phar
- Library Api Docs
- Todo
Installation and usage of the cli app
The packed pvra.phar
file is available as a download on the release page. Run
php pvra.phar
to see a list of available commands. If you downloaded or cloned the repository itself run php bin/pvra
from the root of the repository. Make sure all dependencies are available (not required if you run from phar), this
requires you to be able to run <php> composer install --prefer-dist --no-dev
on your machine.
Pvra can be installed globally using the composer global require suralc/pvra:dev-master
command. Be sure to add the
$COMPOSER_HOME/vendor/bin
directory to your $PATH
. Read more about composer global
Example
CLI:
php pvra.phar analyse:file ./tests/readme_example.php --preferRelativePaths
OUTPUT:
CLI - Options
Name | Short name | Description |
---|---|---|
--preventNameExpansion | -p | Prevent the expansion of names. This may improve performance. Some detections might not work. |
--preferRelativePaths | -s | Only show relative paths in the console output. Fall back to absolute paths if no simple relative path can be built |
--analyser | -a | Name of an analyser to attach. If this option is not set, all default analysers will be loaded. Possible values are: php-5.4, php-5.5, php-5.6, php-7.0, lib-php |
--libraryDataSource | -l | Path to a file containing library information. Defaults to the file shipped with the library/phar. |
--messageFormatSourceFile | -m | Path to a file containing message templates. Defaults to the file shipped with the library/phar. |
--saveFormat | Format of the export. Only json is supported at this time. | |
--saveAsFile | If this option is set the results will be saved to the file specified as value. |
Note: Classes within the src/Console directory are not part of the public API
Installation and usage of the library.
Run composer require suralc/pvra --prefer-dist
in the root of your project and include the composer autoloader.
Please be aware that --prefer-dist
will reduce the download size of the loaded package by removing the tests
directory
and other unused files.
Building the phar
Box is required to build the phar. Run box build
in the repository root. Box requires the code to be inside a git
repository.
Api - Documentation
You may find the incomplete API-documentation here. Please be aware that at this time it is incomplete.
Todo
All versions of pvra with dependencies
ext-tokenizer Version *
symfony/console Version ~2.5
symfony/finder Version ~2.5
nikic/php-parser Version ~1.1