Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176
This commit is contained in:
commit
9921556621
13277 changed files with 1459781 additions and 0 deletions
1
core/vendor/sebastian/version/.gitattributes
vendored
Normal file
1
core/vendor/sebastian/version/.gitattributes
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.php diff=php
|
10
core/vendor/sebastian/version/.gitignore
vendored
Normal file
10
core/vendor/sebastian/version/.gitignore
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
build/api
|
||||
build/code-browser
|
||||
build/coverage
|
||||
build/logs
|
||||
build/pdepend
|
||||
build/phpdox
|
||||
build/SebastianBergmann
|
||||
build/*.tgz
|
||||
cache.properties
|
||||
/.idea
|
19
core/vendor/sebastian/version/ChangeLog.md
vendored
Normal file
19
core/vendor/sebastian/version/ChangeLog.md
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Version 1.0
|
||||
|
||||
This is the list of changes for the Version 1.0 release series.
|
||||
|
||||
## Version 1.0.3
|
||||
|
||||
* Only look for Git repository in the supplied path (and not in its parent directories).
|
||||
|
||||
## Version 1.0.2
|
||||
|
||||
* Errors from `exec()`uting the Git command are now suppressed.
|
||||
|
||||
## Version 1.0.1
|
||||
|
||||
* Fixed #2: `getVersion()` fails on Windows.
|
||||
|
||||
## Version 1.0.0
|
||||
|
||||
* Initial release.
|
33
core/vendor/sebastian/version/LICENSE
vendored
Normal file
33
core/vendor/sebastian/version/LICENSE
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
Version
|
||||
|
||||
Copyright (c) 2013-2015, Sebastian Bergmann <sebastian@phpunit.de>.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
* Neither the name of Sebastian Bergmann nor the names of his
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
37
core/vendor/sebastian/version/README.md
vendored
Normal file
37
core/vendor/sebastian/version/README.md
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
# Version
|
||||
|
||||
**Version** is a library that helps with managing the version number of Git-hosted PHP projects.
|
||||
|
||||
## Installation
|
||||
|
||||
Simply add a dependency on `sebastian/version` to your project's `composer.json` file if you use [Composer](http://getcomposer.org/) to manage the dependencies of your project.
|
||||
|
||||
## Usage
|
||||
|
||||
The constructor of the `SebastianBergmann\Version` class expects two parameters:
|
||||
|
||||
* `$release` is the version number of the latest release (`X.Y.Z`, for instance) or the name of the release series (`X.Y`) when no release has been made from that branch / for that release series yet.
|
||||
* `$path` is the path to the directory (or a subdirectory thereof) where the sourcecode of the project can be found. Simply passing `__DIR__` here usually suffices.
|
||||
|
||||
Apart from the constructor, the `SebastianBergmann\Version` class has a single public method: `getVersion()`.
|
||||
|
||||
Here is a contrived example that shows the basic usage:
|
||||
|
||||
<?php
|
||||
$version = new SebastianBergmann\Version(
|
||||
'3.7.10', '/usr/local/src/phpunit'
|
||||
);
|
||||
|
||||
var_dump($version->getVersion());
|
||||
?>
|
||||
|
||||
string(18) "3.7.10-17-g00f3408"
|
||||
|
||||
When a new release is prepared, the string that is passed to the constructor as the first argument needs to be updated.
|
||||
|
||||
### How SebastianBergmann\Version::getVersion() works
|
||||
|
||||
* If `$path` is not (part of) a Git repository and `$release` is in `X.Y.Z` format then `$release` is returned as-is.
|
||||
* If `$path` is not (part of) a Git repository and `$release` is in `X.Y` format then `$release` is returned suffixed with `-dev`.
|
||||
* If `$path` is (part of) a Git repository and `$release` is in `X.Y.Z` format then the output of `git describe --tags` is returned as-is.
|
||||
* If `$path` is (part of) a Git repository and `$release` is in `X.Y` format then a string is returned that begins with `X.Y` and ends with information from `git describe --tags`.
|
80
core/vendor/sebastian/version/build.xml
vendored
Normal file
80
core/vendor/sebastian/version/build.xml
vendored
Normal file
|
@ -0,0 +1,80 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="version" default="build">
|
||||
<property name="php" value="php"/>
|
||||
<property name="phpunit" value="phpunit"/>
|
||||
|
||||
<target name="build" depends="prepare,lint,phpcs,phpunit"/>
|
||||
|
||||
<target name="clean" description="Cleanup build artifacts">
|
||||
</target>
|
||||
|
||||
<target name="prepare" depends="clean,phpab" description="Prepare for build">
|
||||
</target>
|
||||
|
||||
<target name="phpab" description="Generate autoloader script">
|
||||
<exec executable="phpab">
|
||||
<arg value="--output" />
|
||||
<arg path="src/autoload.php" />
|
||||
<arg path="src" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="lint">
|
||||
<apply executable="${php}" failonerror="true">
|
||||
<arg value="-l" />
|
||||
|
||||
<fileset dir="${basedir}/src">
|
||||
<include name="**/*.php" />
|
||||
<modified />
|
||||
</fileset>
|
||||
|
||||
<fileset dir="${basedir}/tests">
|
||||
<include name="**/*.php" />
|
||||
<modified />
|
||||
</fileset>
|
||||
</apply>
|
||||
</target>
|
||||
|
||||
<target name="phpcs" description="Find coding standard violations using PHP_CodeSniffer">
|
||||
<exec executable="phpcs">
|
||||
<arg value="--standard=PSR2" />
|
||||
<arg value="--extensions=php" />
|
||||
<arg value="--ignore=autoload.php" />
|
||||
<arg path="${basedir}/src" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="phpunit" description="Run unit tests with PHPUnit">
|
||||
<condition property="phpunit_cmd" value="${php} ${phpunit}" else="${phpunit}">
|
||||
<not>
|
||||
<equals arg1="${phpunit}" arg2="phpunit" />
|
||||
</not>
|
||||
</condition>
|
||||
|
||||
<exec executable="${phpunit_cmd}" failonerror="true">
|
||||
<arg value="--configuration" />
|
||||
<arg path="${basedir}/build/phpunit.xml" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="pear">
|
||||
<mkdir dir="${basedir}/build/SebastianBergmann/Version"/>
|
||||
|
||||
<copy todir="${basedir}/build/SebastianBergmann/Version">
|
||||
<fileset dir="${basedir}/src"/>
|
||||
</copy>
|
||||
|
||||
<copy file="ChangeLog.md" todir="${basedir}/build"/>
|
||||
<copy file="LICENSE" todir="${basedir}/build"/>
|
||||
<copy file="README.md" todir="${basedir}/build"/>
|
||||
|
||||
<exec executable="pear" dir="${basedir}/build">
|
||||
<arg value="package" />
|
||||
</exec>
|
||||
|
||||
<delete dir="${basedir}/build/SebastianBergmann"/>
|
||||
<delete file="${basedir}/build/ChangeLog.md"/>
|
||||
<delete file="${basedir}/build/LICENSE"/>
|
||||
<delete file="${basedir}/build/README.md"/>
|
||||
</target>
|
||||
</project>
|
55
core/vendor/sebastian/version/build/package.xml
vendored
Normal file
55
core/vendor/sebastian/version/build/package.xml
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<package packagerversion="1.4.10" version="2.0"
|
||||
xmlns="http://pear.php.net/dtd/package-2.0"
|
||||
xmlns:tasks="http://pear.php.net/dtd/tasks-1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
|
||||
http://pear.php.net/dtd/tasks-1.0.xsd
|
||||
http://pear.php.net/dtd/package-2.0
|
||||
http://pear.php.net/dtd/package-2.0.xsd">
|
||||
<name>Version</name>
|
||||
<channel>pear.phpunit.de</channel>
|
||||
<summary>Library that helps with managing the version number of Git-hosted PHP projects</summary>
|
||||
<description>Library that helps with managing the version number of Git-hosted PHP projects</description>
|
||||
<lead>
|
||||
<name>Sebastian Bergmann</name>
|
||||
<user>sb</user>
|
||||
<email>sebastian@phpunit.de</email>
|
||||
<active>yes</active>
|
||||
</lead>
|
||||
<date>2014-03-07</date>
|
||||
<version>
|
||||
<release>1.0.3</release>
|
||||
<api>1.0.0</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
<api>stable</api>
|
||||
</stability>
|
||||
<license>The BSD 3-Clause License</license>
|
||||
<notes>http://github.com/sebastianbergmann/version/tree</notes>
|
||||
<contents>
|
||||
<dir name="/">
|
||||
<dir name="SebastianBergmann">
|
||||
<dir name="Version">
|
||||
<file baseinstalldir="/" name="autoload.php" role="php"/>
|
||||
<file baseinstalldir="/" name="Version.php" role="php"/>
|
||||
</dir>
|
||||
</dir>
|
||||
<file baseinstalldir="/" name="ChangeLog.md" role="doc"/>
|
||||
<file baseinstalldir="/" name="LICENSE" role="doc"/>
|
||||
<file baseinstalldir="/" name="README.md" role="doc"/>
|
||||
</dir>
|
||||
</contents>
|
||||
<dependencies>
|
||||
<required>
|
||||
<php>
|
||||
<min>5.3.3</min>
|
||||
</php>
|
||||
<pearinstaller>
|
||||
<min>1.9.4</min>
|
||||
</pearinstaller>
|
||||
</required>
|
||||
</dependencies>
|
||||
<phprelease/>
|
||||
</package>
|
29
core/vendor/sebastian/version/build/phpunit.xml
vendored
Normal file
29
core/vendor/sebastian/version/build/phpunit.xml
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<phpunit bootstrap="../tests/bootstrap.php"
|
||||
backupGlobals="false"
|
||||
backupStaticAttributes="false"
|
||||
strict="true"
|
||||
verbose="true">
|
||||
<testsuites>
|
||||
<testsuite name="Version">
|
||||
<directory suffix="Test.php">../tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<logging>
|
||||
<log type="coverage-html" target="coverage" charset="UTF-8" highlight="true"
|
||||
lowUpperBound="35" highLowerBound="70"/>
|
||||
<log type="coverage-clover" target="logs/clover.xml"/>
|
||||
<log type="junit" target="logs/junit.xml" logIncompleteSkipped="false"/>
|
||||
</logging>
|
||||
|
||||
<filter>
|
||||
<whitelist addUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">../src</directory>
|
||||
<exclude>
|
||||
<file>../src/autoload.php</file>
|
||||
</exclude>
|
||||
</whitelist>
|
||||
</filter>
|
||||
</phpunit>
|
21
core/vendor/sebastian/version/composer.json
vendored
Normal file
21
core/vendor/sebastian/version/composer.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "sebastian/version",
|
||||
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
|
||||
"homepage": "https://github.com/sebastianbergmann/version",
|
||||
"license": "BSD-3-Clause",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/version/issues"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
}
|
||||
}
|
87
core/vendor/sebastian/version/src/Version.php
vendored
Normal file
87
core/vendor/sebastian/version/src/Version.php
vendored
Normal file
|
@ -0,0 +1,87 @@
|
|||
<?php
|
||||
/*
|
||||
* This file is part of the Version package.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace SebastianBergmann;
|
||||
|
||||
/**
|
||||
* @package Version
|
||||
* @author Sebastian Bergmann <sebastian@phpunit.de>
|
||||
* @copyright Sebastian Bergmann <sebastian@phpunit.de>
|
||||
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
|
||||
* @link http://github.com/sebastianbergmann/version
|
||||
* @since Class available since Release 1.0.0
|
||||
*/
|
||||
class Version
|
||||
{
|
||||
private $path;
|
||||
private $release;
|
||||
private $version;
|
||||
|
||||
/**
|
||||
* @param string $release
|
||||
* @param string $path
|
||||
*/
|
||||
public function __construct($release, $path)
|
||||
{
|
||||
$this->release = $release;
|
||||
$this->path = $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
if ($this->version === null) {
|
||||
if (count(explode('.', $this->release)) == 3) {
|
||||
$this->version = $this->release;
|
||||
} else {
|
||||
$this->version = $this->release . '-dev';
|
||||
}
|
||||
|
||||
$git = $this->getGitInformation($this->path);
|
||||
|
||||
if ($git) {
|
||||
if (count(explode('.', $this->release)) == 3) {
|
||||
$this->version = $git;
|
||||
} else {
|
||||
$git = explode('-', $git);
|
||||
|
||||
$this->version = $this->release . '-' . end($git);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $this->version;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $path
|
||||
* @return boolean|string
|
||||
*/
|
||||
private function getGitInformation($path)
|
||||
{
|
||||
if (!is_dir($path . DIRECTORY_SEPARATOR . '.git')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$dir = getcwd();
|
||||
chdir($path);
|
||||
$returnCode = 1;
|
||||
$result = @exec('git describe --tags 2>&1', $output, $returnCode);
|
||||
chdir($dir);
|
||||
|
||||
if ($returnCode !== 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
28
core/vendor/sebastian/version/src/autoload.php
vendored
Normal file
28
core/vendor/sebastian/version/src/autoload.php
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
/*
|
||||
* This file is part of the Version package.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
// @codingStandardsIgnoreFile
|
||||
// @codeCoverageIgnoreStart
|
||||
// this is an autogenerated file - do not edit
|
||||
spl_autoload_register(
|
||||
function($class) {
|
||||
static $classes = null;
|
||||
if ($classes === null) {
|
||||
$classes = array(
|
||||
'sebastianbergmann\\version' => '/Version.php'
|
||||
);
|
||||
}
|
||||
$cn = strtolower($class);
|
||||
if (isset($classes[$cn])) {
|
||||
require __DIR__ . $classes[$cn];
|
||||
}
|
||||
}
|
||||
);
|
||||
// @codeCoverageIgnoreEnd
|
2
core/vendor/sebastian/version/tests/bootstrap.php
vendored
Normal file
2
core/vendor/sebastian/version/tests/bootstrap.php
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?php
|
||||
require __DIR__ . '/../src/autoload.php';
|
Reference in a new issue