init without trunk

This commit is contained in:
Kevin Adametz 2020-07-09 12:49:32 +02:00
parent ed24ac4994
commit bb809e7233
14652 changed files with 177862 additions and 94817 deletions

View file

@ -0,0 +1,120 @@
# CHANGELOG
## 1.1.3 - 2017-09-06
This release fixes a bug that caused PackageVersions to prevent
the `composer remove` and `composer update` commands to fail when
this package is removed.
In addition to that, mutation testing has been added to the suite,
ensuring that the package is accurately and extensively tested.
Total issues resolved: **3**
- [40: Mutation testing, PHP 7.1 testing](https://github.com/Ocramius/PackageVersions/pull/40) thanks to @Ocramius
- [41: Removing this package on install results in file access error](https://github.com/Ocramius/PackageVersions/issues/41) thanks to @Xerkus
- [46: #41 Avoid issues when the package is scheduled for removal](https://github.com/Ocramius/PackageVersions/pull/46) thanks to @Jean85
## 1.1.2 - 2016-12-30
This release fixes a bug that caused PackageVersions to be enabled
even when it was part of a globally installed package.
Total issues resolved: **3**
- [35: remove all temp directories](https://github.com/Ocramius/PackageVersions/pull/35)
- [38: Interferes with other projects when installed globally](https://github.com/Ocramius/PackageVersions/issues/38)
- [39: Ignore the global plugin when updating local projects](https://github.com/Ocramius/PackageVersions/pull/39)
## 1.1.1 - 2016-07-25
This release removes the [`"files"`](https://getcomposer.org/doc/04-schema.md#files) directive from
[`composer.json`](https://github.com/Ocramius/PackageVersions/commit/86f2636f7c5e7b56fa035fa3826d5fcf80b6dc72),
as it is no longer needed for `composer install --classmap-authoritative`.
Also, that directive was causing issues with HHVM installations, since
PackageVersions is not compatible with it.
Total issues resolved: **1**
- [34: Fatal error during travis build after update to 1.1.0](https://github.com/Ocramius/PackageVersions/issues/34)
## 1.1.0 - 2016-07-22
This release introduces support for running `composer install --classmap-authoritative`
and `composer install --no-scripts`. Please note that performance
while using these modes may be degraded, but the package will
still work.
Additionally, the package was tuned to prevent the plugin from
running twice at installation.
Total issues resolved: **10**
- [18: Fails when using composer install --no-scripts](https://github.com/Ocramius/PackageVersions/issues/18)
- [20: CS (spacing)](https://github.com/Ocramius/PackageVersions/pull/20)
- [22: Document the way the require-dev section is treated](https://github.com/Ocramius/PackageVersions/issues/22)
- [23: Underline that composer.lock is used as source of information](https://github.com/Ocramius/PackageVersions/pull/23)
- [27: Fix incompatibility with --classmap-authoritative](https://github.com/Ocramius/PackageVersions/pull/27)
- [29: mention optimize-autoloader composer.json config option in README](https://github.com/Ocramius/PackageVersions/pull/29)
- [30: The version class is generated twice during composer update](https://github.com/Ocramius/PackageVersions/issues/30)
- [31: Remove double registration of the event listeners](https://github.com/Ocramius/PackageVersions/pull/31)
- [32: Update the usage of mock APIs to use the new API](https://github.com/Ocramius/PackageVersions/pull/32)
- [33: Fix for #18 - support running with --no-scripts flag](https://github.com/Ocramius/PackageVersions/pull/33)
## 1.0.4 - 2016-04-23
This release includes a fix/workaround for composer/composer#5237,
which causes `ocramius/package-versions` to sometimes generate a
`Versions` class with malformed name (something like
`Versions_composer_tmp0`) when running `composer require <package-name>`.
Total issues resolved: **2**
- [16: Workaround for composer/composer#5237 - class parsing](https://github.com/Ocramius/PackageVersions/pull/16)
- [17: Weird Class name being generated](https://github.com/Ocramius/PackageVersions/issues/17)
## 1.0.3 - 2016-02-26
This release fixes an issue related to concurrent autoloader
re-generation caused by multiple composer plugins being installed.
The issue was solved by removing autoloader re-generation from this
package, but it may still affect other packages.
It is now recommended that you run `composer dump-autoload --optimize`
after installation when using this particular package.
Please note that `composer (install|update) -o` is not sufficient
to avoid autoload overhead when using this particular package.
Total issues resolved: **1**
- [15: Remove autoload re-dump optimization](https://github.com/Ocramius/PackageVersions/pull/15)
## 1.0.2 - 2016-02-24
This release fixes issues related to installing the component without
any dev dependencies or with packages that don't have a source or dist
reference, which is usual with packages defined directly in the
`composer.json`.
Total issues resolved: **3**
- [11: fix composer install --no-dev PHP7](https://github.com/Ocramius/PackageVersions/pull/11)
- [12: Packages don't always have a source/reference](https://github.com/Ocramius/PackageVersions/issues/12)
- [13: Fix #12 - support dist and missing package version references](https://github.com/Ocramius/PackageVersions/pull/13)
## 1.0.1 - 2016-02-01
This release fixes an issue related with composer updates to
already installed versions.
Using `composer require` within a package that already used
`ocramius/package-versions` caused the installation to be unable
to write the `PackageVersions\Versions` class to a file.
Total issues resolved: **6**
- [2: remove unused use statement](https://github.com/Ocramius/PackageVersions/pull/2)
- [3: Remove useless files from dist package](https://github.com/Ocramius/PackageVersions/pull/3)
- [5: failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly](https://github.com/Ocramius/PackageVersions/issues/5)
- [6: Fix/#5 use composer vendor dir](https://github.com/Ocramius/PackageVersions/pull/6)
- [7: Hotfix - #5 generate package versions also when in phar context](https://github.com/Ocramius/PackageVersions/pull/7)
- [8: Versions class should be ignored by VCS, as it is an install-time artifact](https://github.com/Ocramius/PackageVersions/pull/8)

View file

@ -0,0 +1,39 @@
---
title: Contributing
---
# Contributing
* Coding standard for the project is [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)
* The project will follow strict [object calisthenics](http://www.slideshare.net/guilhermeblanco/object-calisthenics-applied-to-php)
* Any contribution must provide tests for additional introduced conditions
* Any un-confirmed issue needs a failing test case before being accepted
* Pull requests must be sent from a new hotfix/feature branch, not from `master`.
## Installation
To install the project and run the tests, you need to clone it first:
```sh
$ git clone git://github.com/Ocramius/PackageVersions.git
```
You will then need to run a composer installation:
```sh
$ cd PackageVersions
$ curl -s https://getcomposer.org/installer | php
$ php composer.phar update
```
## Testing
The PHPUnit version to be used is the one installed as a dev- dependency via composer:
```sh
$ ./vendor/bin/phpunit
```
Accepted coverage for new contributions is 80%. Any contribution not satisfying this requirement
won't be merged.

View file

@ -0,0 +1,19 @@
Copyright (c) 2016 Marco Pivetta
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -0,0 +1,55 @@
# Package Versions
This utility provides quick and easy access to version information of composer dependencies.
This information is derived from the ```composer.lock``` file which is (re)generated during ```composer install``` or ```composer update```.
```php
$version = \PackageVersions\Versions::getVersion('ocramius/package-versions');
var_dump($version); // 1.0.0@0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33
```
[![Build Status](https://travis-ci.org/Ocramius/PackageVersions.svg?branch=master)](https://travis-ci.org/Ocramius/PackageVersions)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Ocramius/PackageVersions/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Ocramius/PackageVersions/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/Ocramius/PackageVersions/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/Ocramius/PackageVersions/?branch=master)
[![Downloads](https://img.shields.io/packagist/dt/ocramius/package-versions.svg)](https://packagist.org/packages/ocramius/package-versions)
[![Packagist](https://img.shields.io/packagist/v/ocramius/package-versions.svg)](https://packagist.org/packages/ocramius/package-versions)
[![Packagist Pre Release](https://img.shields.io/packagist/vpre/ocramius/package-versions.svg)](https://packagist.org/packages/ocramius/package-versions)
### Installation
```sh
composer require ocramius/package-versions
```
It is suggested that you use a optimized composer autoloader in order to prevent
autoload I/O when accessing the `PackageVersions\Versions` API:
Therefore you should use `optimize-autoloader: true` in your composer.json:
```
...
"config": {
"optimize-autoloader": true
},
...
```
see https://getcomposer.org/doc/06-config.md#optimize-autoloader
In case you manually generate your autoloader via the CLI use the `--optimize` flag:
```sh
composer dump-autoload --optimize
```
### Use-cases
This repository implements `PackageVersions\Versions::getVersion()` in such a way that no IO
happens when calling it, because the list of package versions is compiled during composer
installation.
This is especially useful when you want to generate assets/code/artifacts that are computed from
the current version of a certain dependency. Doing so at runtime by checking the installed
version of a package would be too expensive, and this package mitigates that.

View file

@ -0,0 +1,42 @@
{
"name": "ocramius/package-versions",
"description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)",
"type": "composer-plugin",
"license": "MIT",
"authors": [
{
"name": "Marco Pivetta",
"email": "ocramius@gmail.com"
}
],
"require": {
"php": "~7.0",
"composer-plugin-api": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^6.4",
"humbug/humbug": "dev-master",
"composer/composer": "^1.3",
"ext-zip": "*"
},
"autoload": {
"psr-4": {
"PackageVersions\\": "src/PackageVersions"
}
},
"autoload-dev": {
"psr-4": {
"PackageVersionsTest\\": "test/PackageVersionsTest"
}
},
"extra": {
"class": "PackageVersions\\Installer",
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"scripts": {
"post-update-cmd": "PackageVersions\\Installer::dumpVersionsClass",
"post-install-cmd": "PackageVersions\\Installer::dumpVersionsClass"
}
}

View file

@ -0,0 +1,12 @@
{
"source": {
"directories": [
"src"
]
},
"timeout": 10,
"logs": {
"text": "humbuglog.txt",
"json": "humbuglog.json"
}
}

View file

@ -0,0 +1,78 @@
<?php
namespace PackageVersions;
/**
* @internal
*
* This is a fallback for {@see \PackageVersions\Versions::getVersion()}
* Do not use this class directly: it is intended to be only used when
* {@see \PackageVersions\Versions} fails to be generated, which typically
* happens when running composer with `--no-scripts` flag)
*/
final class FallbackVersions
{
private function __construct()
{
}
/**
* @param string $packageName
*
* @return string
*
* @throws \OutOfBoundsException if a version cannot be located
* @throws \UnexpectedValueException if the composer.lock file could not be located
*/
public static function getVersion(string $packageName) : string
{
$versions = iterator_to_array(self::getVersions(self::getComposerLockPath()));
if (! array_key_exists($packageName, $versions)) {
throw new \OutOfBoundsException(
'Required package "' . $packageName . '" is not installed: cannot detect its version'
);
}
return $versions[$packageName];
}
/**
* @return string
*
* @throws \UnexpectedValueException
*/
private static function getComposerLockPath() : string
{
// bold assumption, but there's not here to fix everyone's problems.
$checkedPaths = [__DIR__ . '/../../../../../composer.lock', __DIR__ . '/../../composer.lock'];
foreach ($checkedPaths as $path) {
if (file_exists($path)) {
return $path;
}
}
throw new \UnexpectedValueException(sprintf(
'PackageVersions could not locate your `composer.lock` location. This is assumed to be in %s. '
. 'If you customized your composer vendor directory and ran composer installation with --no-scripts, '
. 'then you are on your own, and we can\'t really help you. Fix your shit and cut the tooling some slack.',
json_encode($checkedPaths)
));
}
private static function getVersions(string $composerLockFile) : \Generator
{
$lockData = json_decode(file_get_contents($composerLockFile), true);
$lockData['packages-dev'] = $lockData['packages-dev'] ?? [];
foreach (array_merge($lockData['packages'], $lockData['packages-dev']) as $package) {
yield $package['name'] => $package['version'] . '@' . (
$package['source']['reference']?? $package['dist']['reference'] ?? ''
);
}
yield 'unknown/root-package@UNKNOWN';
}
}

View file

@ -0,0 +1,182 @@
<?php
namespace PackageVersions;
use Composer\Composer;
use Composer\Config;
use Composer\EventDispatcher\EventSubscriberInterface;
use Composer\IO\IOInterface;
use Composer\Package\AliasPackage;
use Composer\Package\Locker;
use Composer\Package\PackageInterface;
use Composer\Package\RootPackageInterface;
use Composer\Plugin\PluginInterface;
use Composer\Script\Event;
use Composer\Script\ScriptEvents;
final class Installer implements PluginInterface, EventSubscriberInterface
{
private static $generatedClassTemplate = <<<'PHP'
<?php
namespace PackageVersions;
/**
* This class is generated by ocramius/package-versions, specifically by
* @see \PackageVersions\Installer
*
* This file is overwritten at every run of `composer install` or `composer update`.
*/
%s
{
const VERSIONS = %s;
private function __construct()
{
}
/**
* @throws \OutOfBoundsException if a version cannot be located
*/
public static function getVersion(string $packageName) : string
{
if (! isset(self::VERSIONS[$packageName])) {
throw new \OutOfBoundsException(
'Required package "' . $packageName . '" is not installed: cannot detect its version'
);
}
return self::VERSIONS[$packageName];
}
}
PHP;
/**
* {@inheritDoc}
*/
public function activate(Composer $composer, IOInterface $io)
{
// Nothing to do here, as all features are provided through event listeners
}
/**
* {@inheritDoc}
*/
public static function getSubscribedEvents()
{
return [
ScriptEvents::POST_INSTALL_CMD => 'dumpVersionsClass',
ScriptEvents::POST_UPDATE_CMD => 'dumpVersionsClass',
];
}
/**
* @param Event $composerEvent
*
* @return void
*
* @throws \RuntimeException
*/
public static function dumpVersionsClass(Event $composerEvent)
{
$composer = $composerEvent->getComposer();
$versions = iterator_to_array(self::getVersions($composer->getLocker(), $composer->getPackage()));
if (!array_key_exists('ocramius/package-versions', $versions)) {
//plugin must be globally installed - we only want to generate versions for projects which specifically
//require ocramius/package-versions
return;
}
self::writeVersionClassToFile(self::generateVersionsClass($versions), $composer, $composerEvent->getIO());
}
private static function generateVersionsClass(array $versions) : string
{
return sprintf(
self::$generatedClassTemplate,
'fin' . 'al ' . 'cla' . 'ss ' . 'Versions', // note: workaround for regex-based code parsers :-(
var_export($versions, true)
);
}
/**
* @param string $versionClassSource
* @param Composer $composer
* @param IOInterface $io
*
* @return void
*
* @throws \RuntimeException
*/
private static function writeVersionClassToFile(string $versionClassSource, Composer $composer, IOInterface $io)
{
$installPath = self::locateRootPackageInstallPath($composer->getConfig(), $composer->getPackage())
. '/src/PackageVersions/Versions.php';
if (! file_exists(dirname($installPath))) {
$io->write('<info>ocramius/package-versions:</info> Package not found (probably scheduled for removal); generation of version class skipped.');
return;
}
$io->write('<info>ocramius/package-versions:</info> Generating version class...');
file_put_contents($installPath, $versionClassSource);
chmod($installPath, 0664);
$io->write('<info>ocramius/package-versions:</info> ...done generating version class');
}
/**
* @param Config $composerConfig
* @param RootPackageInterface $rootPackage
*
* @return string
*
* @throws \RuntimeException
*/
private static function locateRootPackageInstallPath(
Config $composerConfig,
RootPackageInterface $rootPackage
) : string {
if ('ocramius/package-versions' === self::getRootPackageAlias($rootPackage)->getName()) {
return dirname($composerConfig->get('vendor-dir'));
}
return $composerConfig->get('vendor-dir') . '/ocramius/package-versions';
}
private static function getRootPackageAlias(RootPackageInterface $rootPackage) : PackageInterface
{
$package = $rootPackage;
while ($package instanceof AliasPackage) {
$package = $package->getAliasOf();
}
return $package;
}
/**
* @param Locker $locker
* @param RootPackageInterface $rootPackage
*
* @return \Generator|\string[]
*/
private static function getVersions(Locker $locker, RootPackageInterface $rootPackage) : \Generator
{
$lockData = $locker->getLockData();
$lockData['packages-dev'] = $lockData['packages-dev'] ?? [];
foreach (array_merge($lockData['packages'], $lockData['packages-dev']) as $package) {
yield $package['name'] => $package['version'] . '@' . (
$package['source']['reference']?? $package['dist']['reference'] ?? ''
);
}
yield $rootPackage->getName() => $rootPackage->getPrettyVersion() . '@' . $rootPackage->getSourceReference();
}
}

View file

@ -0,0 +1,85 @@
<?php
namespace PackageVersions;
/**
* This class is generated by ocramius/package-versions, specifically by
* @see \PackageVersions\Installer
*
* This file is overwritten at every run of `composer install` or `composer update`.
*/
final class Versions
{
const VERSIONS = array (
'behat/transliterator' => 'v1.3.0@3c4ec1d77c3d05caa1f0bf8fb3aae4845005c7fc',
'composer/ca-bundle' => '1.2.6@47fe531de31fca4a1b997f87308e7d7804348f7e',
'doctrine/annotations' => 'v1.4.0@54cacc9b81758b14e3ce750f205a393d52339e97',
'doctrine/cache' => 'v1.6.2@eb152c5100571c7a45470ff2a35095ab3f3b900b',
'doctrine/collections' => 'v1.4.0@1a4fb7e902202c33cce8c55989b945612943c2ba',
'doctrine/common' => 'v2.7.3@4acb8f89626baafede6ee5475bc5844096eba8a9',
'doctrine/dbal' => 'v2.5.13@729340d8d1eec8f01bff708e12e449a3415af873',
'doctrine/doctrine-bundle' => '1.10.3@907dafe1ba73c4c3b0f0ae8cfc1b9958c002e58c',
'doctrine/doctrine-cache-bundle' => '1.3.2@9baecbd6bfdd1123b0cf8c1b88fee0170a84ddd1',
'doctrine/doctrine-migrations-bundle' => 'v1.2.1@6276139e0b913a4e5120fc36bb5b0eae8ac549bc',
'doctrine/inflector' => 'v1.2.0@e11d84c6e018beedd929cff5220969a3c6d1d462',
'doctrine/instantiator' => '1.0.5@8e884e78f9f0eb1329e445619e04456e64d8051d',
'doctrine/lexer' => '1.0.2@1febd6c3ef84253d7c815bed85fc622ad207a9f8',
'doctrine/migrations' => 'v1.5.0@c81147c0f2938a6566594455367e095150547f72',
'doctrine/orm' => 'v2.5.14@810a7baf81462a5ddf10e8baa8cb94b6eec02754',
'gedmo/doctrine-extensions' => 'v2.4.39@c549b40bff560380c53812283d25ce42ee0992e4',
'gregwar/cache' => 'v1.0.12@305d0f5a12c0beecbbd7e1de236f59f39e0c0ac3',
'gregwar/image' => 'v2.0.25@03534d5760cbea5c96e6292041ff81a3bb205c36',
'gregwar/image-bundle' => 'v2.2.4@cc4bc913b7662d3532b99ce4617de6f13fe1ac7d',
'incenteev/composer-parameter-handler' => 'v2.1.3@933c45a34814f27f2345c11c37d46b3ca7303550',
'jdorn/sql-formatter' => 'v1.2.17@64990d96e0959dff8e059dfcdc1af130728d92bc',
'kriswallsmith/assetic' => 'v1.4.0@e911c437dbdf006a8f62c2f59b15b2d69a5e0aa1',
'monolog/monolog' => '1.25.3@fa82921994db851a8becaf3787a9e73c5976b6f1',
'ocramius/package-versions' => '1.2.0@ad8a245decad4897cc6b432743913dad0d69753c',
'ocramius/proxy-manager' => '2.0.4@a55d08229f4f614bf335759ed0cf63378feeb2e6',
'paragonie/random_compat' => 'v9.99.99@84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95',
'psr/cache' => '1.0.1@d11b50ad223250cf17b86e38383413f5a6764bf8',
'psr/log' => '1.1.2@446d54b4cb6bf489fc9d75f55843658e6f25d801',
'sensio/distribution-bundle' => 'v5.0.25@80a38234bde8321fb92aa0b8c27978a272bb4baf',
'sensio/framework-extra-bundle' => 'v3.0.29@bb907234df776b68922eb4b25bfa061683597b6a',
'sensiolabs/security-checker' => 'v5.0.3@46be3f58adac13084497961e10eed9a7fb4d44d1',
'stof/doctrine-extensions-bundle' => 'v1.2.2@4e7499d25dc5d0862da09fa8e336164948a29a25',
'swiftmailer/swiftmailer' => 'v5.4.12@181b89f18a90f8925ef805f950d47a7190e9b950',
'symfony/assetic-bundle' => 'v2.8.2@2e0a23a4874838e26de6f025e02fc63328921a4c',
'symfony/monolog-bundle' => 'v2.12.1@b0146bdca7ba2a65f3bbe7010423c7393b29ec3f',
'symfony/polyfill-apcu' => 'v1.14.0@f5a6efd9d9f68790120734f80f8fda972981edab',
'symfony/polyfill-ctype' => 'v1.14.0@fbdeaec0df06cf3d51c93de80c7eb76e271f5a38',
'symfony/polyfill-intl-icu' => 'v1.14.0@727b3bb5bfa7ca9eeb86416784cf1c08a6289b86',
'symfony/polyfill-mbstring' => 'v1.14.0@34094cfa9abe1f0f14f48f490772db7a775559f2',
'symfony/polyfill-php56' => 'v1.14.0@16ec91cb06998b609501b55b7177b7d7c02badb3',
'symfony/polyfill-php70' => 'v1.14.0@419c4940024c30ccc033650373a1fe13890d3255',
'symfony/polyfill-util' => 'v1.14.0@ba3cfcea6d0192cae46c62041f61cbb704b526d3',
'symfony/swiftmailer-bundle' => 'v2.6.7@c4808f5169efc05567be983909d00f00521c53ec',
'symfony/symfony' => 'v3.1.10@96e7dede3ddc9e3b3392f5cc93e26eca77545a89',
'tecnickcom/tcpdf' => '6.3.5@19a535eaa7fb1c1cac499109deeb1a7a201b4549',
'twig/twig' => 'v2.12.5@18772e0190734944277ee97a02a9a6c6555fcd94',
'whiteoctober/tcpdf-bundle' => '1.1.2@33e57940af790c0c8ee6a200a1f0661e415d0a5c',
'zendframework/zend-code' => '3.1.0@2899c17f83a7207f2d7f53ec2f421204d3beea27',
'zendframework/zend-eventmanager' => '3.2.1@a5e2583a211f73604691586b8406ff7296a946dd',
'sensio/generator-bundle' => 'v3.1.7@28cbaa244bd0816fd8908b93f90380bcd7b67a65',
'symfony/phpunit-bridge' => 'v3.4.37@ebfd1b428ffc14306e843092763f228bfba168d0',
'symfony/framework-standard-edition' => '3.1.x-dev@a37785b3919b409561bd734eb5bc3f7e287c17ac',
);
private function __construct()
{
}
/**
* @throws \OutOfBoundsException if a version cannot be located
*/
public static function getVersion(string $packageName) : string
{
if (! isset(self::VERSIONS[$packageName])) {
throw new \OutOfBoundsException(
'Required package "' . $packageName . '" is not installed: cannot detect its version'
);
}
return self::VERSIONS[$packageName];
}
}