PHPackages                             suralc/pvra - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. suralc/pvra

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

suralc/pvra
===========

Detects the php-version requirement of a given piece of code.

v0.1.0(11y ago)716[5 issues](https://github.com/suralc/pvra/issues)MITPHPPHP &gt;=5.4

Since Jan 16Pushed 10y ago2 watchersCompare

[ Source](https://github.com/suralc/pvra)[ Packagist](https://packagist.org/packages/suralc/pvra)[ RSS](/packages/suralc-pvra/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (5)Used By (0)

*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](https://github.com/llaville/php-compat-info) for now.*

Php Version Requirement Analyser
================================

[](#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](https://github.com/nikic/PHP-Parser). 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.

[![Build Status](https://camo.githubusercontent.com/204c622a9f4bfafe005131dc823f72ec845e9c31e4f67eb798be30ec0d85b0b0/68747470733a2f2f7472617669732d63692e6f72672f737572616c632f707672612e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/suralc/pvra)[![Dependency Status](https://camo.githubusercontent.com/4810f88001f72a20226b7712bd6226f53604e23fdd93146fef17ff96c414dca0/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3534363634333933346465356566353032323030303035362f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/546643934de5ef5022000056)[![Code Coverage](https://camo.githubusercontent.com/5fe90080b3e2318111e9a7564f1645e8e1a69f729cf748490873199db618f726/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f737572616c632f707672612f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/suralc/pvra/?branch=master)

Index
-----

[](#index)

1. [Installation and usage of the cli app](#cli-usage)
2. [Installation and usage of the library](#lib-usage)
3. [Build the phar](#build)
4. [Library Api Docs](#api-doc)
5. [Todo](#todo)

 Installation and usage of the cli app
---------------------------------------------------------------------------

[](#-installation-and-usage-of-the-cli-app)

The packed `pvra.phar` file is available as a download on the [release page](https://github.com/suralc/pvra/releases). 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 ` 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](https://getcomposer.org/doc/03-cli.md#global)

### Example

[](#example)

```
