Laravel version update
Laravel version update
This commit is contained in:
66
vendor/sebastian/version/.php_cs
vendored
Normal file
66
vendor/sebastian/version/.php_cs
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
$finder = Symfony\CS\Finder\DefaultFinder::create()
|
||||
->files()
|
||||
->in('src')
|
||||
->name('*.php');
|
||||
|
||||
return Symfony\CS\Config\Config::create()
|
||||
->level(\Symfony\CS\FixerInterface::NONE_LEVEL)
|
||||
->fixers(
|
||||
array(
|
||||
'align_double_arrow',
|
||||
'align_equals',
|
||||
'braces',
|
||||
'concat_with_spaces',
|
||||
'duplicate_semicolon',
|
||||
'elseif',
|
||||
'empty_return',
|
||||
'encoding',
|
||||
'eof_ending',
|
||||
'extra_empty_lines',
|
||||
'function_call_space',
|
||||
'function_declaration',
|
||||
'indentation',
|
||||
'join_function',
|
||||
'line_after_namespace',
|
||||
'linefeed',
|
||||
'list_commas',
|
||||
'lowercase_constants',
|
||||
'lowercase_keywords',
|
||||
'method_argument_space',
|
||||
'multiple_use',
|
||||
'namespace_no_leading_whitespace',
|
||||
'no_blank_lines_after_class_opening',
|
||||
'no_empty_lines_after_phpdocs',
|
||||
'parenthesis',
|
||||
'php_closing_tag',
|
||||
'phpdoc_indent',
|
||||
'phpdoc_no_access',
|
||||
'phpdoc_no_empty_return',
|
||||
'phpdoc_no_package',
|
||||
'phpdoc_params',
|
||||
'phpdoc_scalar',
|
||||
'phpdoc_separation',
|
||||
'phpdoc_to_comment',
|
||||
'phpdoc_trim',
|
||||
'phpdoc_types',
|
||||
'phpdoc_var_without_name',
|
||||
'remove_lines_between_uses',
|
||||
'return',
|
||||
'self_accessor',
|
||||
'short_array_syntax',
|
||||
'short_tag',
|
||||
'single_line_after_imports',
|
||||
'single_quote',
|
||||
'spaces_before_semicolon',
|
||||
'spaces_cast',
|
||||
'ternary_spaces',
|
||||
'trailing_spaces',
|
||||
'trim_array_spaces',
|
||||
'unused_use',
|
||||
'visibility',
|
||||
'whitespacy_lines'
|
||||
)
|
||||
)
|
||||
->finder($finder);
|
||||
|
8
vendor/sebastian/version/README.md
vendored
8
vendor/sebastian/version/README.md
vendored
@@ -4,7 +4,13 @@
|
||||
|
||||
## 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.
|
||||
You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):
|
||||
|
||||
composer require sebastian/version
|
||||
|
||||
If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:
|
||||
|
||||
composer require --dev sebastian/version
|
||||
|
||||
## Usage
|
||||
|
||||
|
8
vendor/sebastian/version/composer.json
vendored
8
vendor/sebastian/version/composer.json
vendored
@@ -13,9 +13,17 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/version/issues"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.6"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0.x-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
39
vendor/sebastian/version/src/Version.php
vendored
39
vendor/sebastian/version/src/Version.php
vendored
@@ -15,8 +15,19 @@ namespace SebastianBergmann;
|
||||
*/
|
||||
class Version
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $path;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $release;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $version;
|
||||
|
||||
/**
|
||||
@@ -58,7 +69,8 @@ class Version
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $path
|
||||
* @param string $path
|
||||
*
|
||||
* @return bool|string
|
||||
*/
|
||||
private function getGitInformation($path)
|
||||
@@ -67,11 +79,26 @@ class Version
|
||||
return false;
|
||||
}
|
||||
|
||||
$dir = getcwd();
|
||||
chdir($path);
|
||||
$returnCode = 1;
|
||||
$result = @exec('git describe --tags 2>&1', $output, $returnCode);
|
||||
chdir($dir);
|
||||
$process = proc_open(
|
||||
'git describe --tags',
|
||||
[
|
||||
1 => ['pipe', 'w'],
|
||||
2 => ['pipe', 'w'],
|
||||
],
|
||||
$pipes,
|
||||
$path
|
||||
);
|
||||
|
||||
if (!is_resource($process)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$result = trim(stream_get_contents($pipes[1]));
|
||||
|
||||
fclose($pipes[1]);
|
||||
fclose($pipes[2]);
|
||||
|
||||
$returnCode = proc_close($process);
|
||||
|
||||
if ($returnCode !== 0) {
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user