Commit 9d2ea5e5 authored by David Prévot's avatar David Prévot

Merge tag 'upstream/2.0.0'

Upstream version 2.0.0

# gpg: Signature faite le ven. 05 févr. 2016 14:57:49 AST
# gpg:                avec la clef RSA 058C1CF944F6BD3C
# gpg: Bonne signature de « David Prévot <david@tilapin.org> »
# gpg:                 alias « David Prévot <davidp@altern.org> »
# gpg:                 alias « David Prévot <davidp@no-log.org> »
# gpg:                 alias « David Prévot <taffit@debian.org> »
# gpg: Attention : cette clef n'est pas certifiée avec une signature de confiance.
# gpg:             Rien n'indique que la signature appartient à son propriétaire.
# Empreinte de clef principale : AE14 AD01 426D 2BFB 82EF  7E1E B82A 217A FDFE 09F2
#    Empreinte de la sous-clef : 7875 4D07 BC09 5C74 48F7  8D66 058C 1CF9 44F6 BD3C
parents 79160c49 28ff62a3
<?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);
......@@ -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"
}
}
}
......@@ -15,8 +15,19 @@
*/
class Version
{
/**
* @var string
*/
private $path;
/**
* @var string
*/
private $release;
/**
* @var string
*/
private $version;
/**
......@@ -58,7 +69,8 @@ public function getVersion()
}
/**
* @param string $path
* @param string $path
*
* @return bool|string
*/
private function getGitInformation($path)
......@@ -67,11 +79,26 @@ private function getGitInformation($path)
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment