From 29f26ab2366914f97fcc0f56903ee68e8cdaaa4c Mon Sep 17 00:00:00 2001 From: Christian Baune Date: Wed, 2 Mar 2016 13:44:15 +0100 Subject: [PATCH 01/13] Start of "reset" command with basic tests. Inspired by existing code and PR45 --- src/GitElephant/Command/ResetCommand.php | 70 +++++++++++++++++++ src/GitElephant/Repository.php | 10 +++ .../GitElephant/Command/ResetCommandTest.php | 33 +++++++++ tests/GitElephant/RepositoryTest.php | 45 ++++++++++++ 4 files changed, 158 insertions(+) create mode 100644 src/GitElephant/Command/ResetCommand.php create mode 100644 tests/GitElephant/Command/ResetCommandTest.php diff --git a/src/GitElephant/Command/ResetCommand.php b/src/GitElephant/Command/ResetCommand.php new file mode 100644 index 00000000..4668a704 --- /dev/null +++ b/src/GitElephant/Command/ResetCommand.php @@ -0,0 +1,70 @@ +clearAll(); + $this->addCommandName(self::GIT_RESET_COMMAND); + // if there are options add them. + if (! is_null($options)) { + foreach ($options as $option) { + $this->addCommandArgument($option); + } + } + if($arg!=null){ + $this->addCommandSubject2($arg); + } + + return $this->getCommand(); + } + + /** + * @return ResetCommand + */ + public static function getInstance() + { + return new self(); + } + + + +} \ No newline at end of file diff --git a/src/GitElephant/Repository.php b/src/GitElephant/Repository.php index 761462ba..e7e0bd03 100644 --- a/src/GitElephant/Repository.php +++ b/src/GitElephant/Repository.php @@ -23,6 +23,7 @@ use \GitElephant\Command\PullCommand; use \GitElephant\Command\PushCommand; use \GitElephant\Command\RemoteCommand; +use GitElephant\Command\ResetCommand; use \GitElephant\Exception\InvalidRepositoryPathException; use \GitElephant\Command\Caller\Caller; use \GitElephant\Objects\Author; @@ -327,6 +328,15 @@ public function isBare() return trim($this->caller->getOutput()) === 'true'; } + /** + * @param TreeishInterface|Commit|string $arg + * @param array $options + */ + public function reset($arg,$options) + { + $this->caller->execute(ResetCommand::getInstance()->reset($arg,$options)); + } + /** * Get the repository status * diff --git a/tests/GitElephant/Command/ResetCommandTest.php b/tests/GitElephant/Command/ResetCommandTest.php new file mode 100644 index 00000000..cf8384ee --- /dev/null +++ b/tests/GitElephant/Command/ResetCommandTest.php @@ -0,0 +1,33 @@ +initRepository(); + $this->getRepository()->init(); + $this->addFile('test'); + $this->getRepository()->commit('test', true); + $this->getRepository()->createBranch('test', 'master'); + } + + public function testResetHard() + { + $rstc = ResetCommand::getInstance(); + $this->assertEquals("reset '--hard' 'dbeac'",$rstc->reset('dbeac',[ResetCommand::OPTION_HARD])); + } +} diff --git a/tests/GitElephant/RepositoryTest.php b/tests/GitElephant/RepositoryTest.php index 4c5751b0..a9523295 100644 --- a/tests/GitElephant/RepositoryTest.php +++ b/tests/GitElephant/RepositoryTest.php @@ -13,6 +13,7 @@ namespace GitElephant; +use GitElephant\Command\ResetCommand; use \GitElephant\Objects\Branch; use \GitElephant\Objects\Object; use \GitElephant\Objects\Tag; @@ -904,6 +905,50 @@ public function testGlobalConfigs() $this->assertEmpty($repo->getGlobalConfigs()); } + /** + * test reset + */ + public function testResetHard() + { + $this->initRepository(); + $repo=$this->getRepository(); + $repo->init(); + $this->addFile('file1'); + $repo->stage(); + $repo->commit('message1'); + $headCommit=$repo->getCommit(); + $this->addFile('file2'); + $repo->stage(); + $repo->commit('message2'); + + $this->assertEquals(2,$repo->countCommits()); + $repo->reset($headCommit,[ResetCommand::OPTION_HARD]); + $this->assertEquals(1,$repo->countCommits()); + $this->assertEmpty($repo->getIndexStatus()->added()); + } + + /** + * test reset + */ + public function testResetSoft() + { + $this->initRepository(); + $repo=$this->getRepository(); + $repo->init(); + $this->addFile('file1'); + $repo->stage(); + $repo->commit('message1'); + $headCommit=$repo->getCommit(); + $this->addFile('file2'); + $repo->stage(); + $repo->commit('message2'); + + $this->assertEquals(2,$repo->countCommits()); + $repo->reset($headCommit,[ResetCommand::OPTION_SOFT]); + $this->assertEquals(1,$repo->countCommits()); + $this->assertNotEmpty($repo->getIndexStatus()->added()); + } + /** * test add, remove and get global options * From e1a74cad004077562b2ab2e0407900789e0df0a8 Mon Sep 17 00:00:00 2001 From: Christian Baune Date: Wed, 2 Mar 2016 14:21:21 +0100 Subject: [PATCH 02/13] Start of "reset" command with basic tests. Inspired by existing code and PR45 Reverted "[]" with "array()" for legacy php versions --- src/GitElephant/Command/ResetCommand.php | 6 +++--- src/GitElephant/Repository.php | 3 +-- tests/GitElephant/Command/ResetCommandTest.php | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/GitElephant/Command/ResetCommand.php b/src/GitElephant/Command/ResetCommand.php index 4668a704..122a0613 100644 --- a/src/GitElephant/Command/ResetCommand.php +++ b/src/GitElephant/Command/ResetCommand.php @@ -10,7 +10,6 @@ use GitElephant\Objects\Commit; -use GitElephant\Objects\Tag; use GitElephant\Objects\TreeishInterface; use \GitElephant\Repository; @@ -58,11 +57,12 @@ public function reset($arg = null, Array $options = array()) } /** + * @param Repository $repository * @return ResetCommand */ - public static function getInstance() + public static function getInstance(Repository $repository) { - return new self(); + return new self($repository); } diff --git a/src/GitElephant/Repository.php b/src/GitElephant/Repository.php index e7e0bd03..c585c2bc 100644 --- a/src/GitElephant/Repository.php +++ b/src/GitElephant/Repository.php @@ -24,7 +24,6 @@ use \GitElephant\Command\PushCommand; use \GitElephant\Command\RemoteCommand; use GitElephant\Command\ResetCommand; -use \GitElephant\Exception\InvalidRepositoryPathException; use \GitElephant\Command\Caller\Caller; use \GitElephant\Objects\Author; use \GitElephant\Objects\Remote; @@ -334,7 +333,7 @@ public function isBare() */ public function reset($arg,$options) { - $this->caller->execute(ResetCommand::getInstance()->reset($arg,$options)); + $this->caller->execute(ResetCommand::getInstance($this)->reset($arg,$options)); } /** diff --git a/tests/GitElephant/Command/ResetCommandTest.php b/tests/GitElephant/Command/ResetCommandTest.php index cf8384ee..c2358200 100644 --- a/tests/GitElephant/Command/ResetCommandTest.php +++ b/tests/GitElephant/Command/ResetCommandTest.php @@ -27,7 +27,7 @@ public function setUp() public function testResetHard() { - $rstc = ResetCommand::getInstance(); - $this->assertEquals("reset '--hard' 'dbeac'",$rstc->reset('dbeac',[ResetCommand::OPTION_HARD])); + $rstc = ResetCommand::getInstance($this->getRepository()); + $this->assertEquals("reset '--hard' 'dbeac'",$rstc->reset('dbeac',array(ResetCommand::OPTION_HARD))); } } From 93ce64feb58434d8c1c769e79c59d8ec414e4354 Mon Sep 17 00:00:00 2001 From: Christian Baune Date: Wed, 2 Mar 2016 14:52:41 +0100 Subject: [PATCH 03/13] Start of "reset" command with basic tests. Inspired by existing code and PR45 Reverted "[]" with "array()" for legacy php versions --- src/GitElephant/Command/ResetCommand.php | 2 +- tests/GitElephant/Command/ResetCommandTest.php | 2 +- tests/GitElephant/RepositoryTest.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/GitElephant/Command/ResetCommand.php b/src/GitElephant/Command/ResetCommand.php index 122a0613..94cdc89b 100644 --- a/src/GitElephant/Command/ResetCommand.php +++ b/src/GitElephant/Command/ResetCommand.php @@ -60,7 +60,7 @@ public function reset($arg = null, Array $options = array()) * @param Repository $repository * @return ResetCommand */ - public static function getInstance(Repository $repository) + public static function getInstance(Repository $repository=null) { return new self($repository); } diff --git a/tests/GitElephant/Command/ResetCommandTest.php b/tests/GitElephant/Command/ResetCommandTest.php index c2358200..6bdea6ba 100644 --- a/tests/GitElephant/Command/ResetCommandTest.php +++ b/tests/GitElephant/Command/ResetCommandTest.php @@ -27,7 +27,7 @@ public function setUp() public function testResetHard() { - $rstc = ResetCommand::getInstance($this->getRepository()); + $rstc = ResetCommand::getInstance(); $this->assertEquals("reset '--hard' 'dbeac'",$rstc->reset('dbeac',array(ResetCommand::OPTION_HARD))); } } diff --git a/tests/GitElephant/RepositoryTest.php b/tests/GitElephant/RepositoryTest.php index a9523295..90db82da 100644 --- a/tests/GitElephant/RepositoryTest.php +++ b/tests/GitElephant/RepositoryTest.php @@ -922,7 +922,7 @@ public function testResetHard() $repo->commit('message2'); $this->assertEquals(2,$repo->countCommits()); - $repo->reset($headCommit,[ResetCommand::OPTION_HARD]); + $repo->reset($headCommit,array(ResetCommand::OPTION_HARD)); $this->assertEquals(1,$repo->countCommits()); $this->assertEmpty($repo->getIndexStatus()->added()); } @@ -944,7 +944,7 @@ public function testResetSoft() $repo->commit('message2'); $this->assertEquals(2,$repo->countCommits()); - $repo->reset($headCommit,[ResetCommand::OPTION_SOFT]); + $repo->reset($headCommit,array(ResetCommand::OPTION_SOFT)); $this->assertEquals(1,$repo->countCommits()); $this->assertNotEmpty($repo->getIndexStatus()->added()); } From ca352c1a259e4eadbbee43c150cbbc4c40224b53 Mon Sep 17 00:00:00 2001 From: Christian Baune Date: Mon, 7 Mar 2016 13:58:37 +0100 Subject: [PATCH 04/13] Changed the "Array" case "Array" becomes "array" :-) --- src/GitElephant/Command/ResetCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GitElephant/Command/ResetCommand.php b/src/GitElephant/Command/ResetCommand.php index 94cdc89b..88138e75 100644 --- a/src/GitElephant/Command/ResetCommand.php +++ b/src/GitElephant/Command/ResetCommand.php @@ -39,7 +39,7 @@ public function __construct(Repository $repo = null) * @throws \RuntimeException * @return string */ - public function reset($arg = null, Array $options = array()) + public function reset($arg = null, array $options = array()) { $this->clearAll(); $this->addCommandName(self::GIT_RESET_COMMAND); @@ -67,4 +67,4 @@ public static function getInstance(Repository $repository=null) -} \ No newline at end of file +} From a6cb47256db54308691b644f6df2d0c631685fd8 Mon Sep 17 00:00:00 2001 From: Redian Date: Thu, 21 Apr 2016 17:04:55 +0100 Subject: [PATCH 05/13] Update Repository.php Update the `push` method documentation --- src/GitElephant/Repository.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/GitElephant/Repository.php b/src/GitElephant/Repository.php index c585c2bc..fe3c09b1 100644 --- a/src/GitElephant/Repository.php +++ b/src/GitElephant/Repository.php @@ -1035,18 +1035,18 @@ public function pull($from = null, $ref = null, $rebase = true) } /** - * Fetch from and merge with another repository or a local branch + * Push changes to remote repository * - * @param string $to - * @param string $ref + * @param string $remote + * @param string $branch * @throws \RuntimeException * @throws \Symfony\Component\Process\Exception\LogicException * @throws \Symfony\Component\Process\Exception\InvalidArgumentException * @throws \Symfony\Component\Process\Exception\RuntimeException */ - public function push($to = null, $ref = null) + public function push($origin = null, $branch = null) { - $this->caller->execute(PushCommand::getInstance($this)->push($to, $ref)); + $this->caller->execute(PushCommand::getInstance($this)->push($origin, $branch)); } /** From 744b899eef980cc501d6af0ef290319dbaec9d66 Mon Sep 17 00:00:00 2001 From: Redian Date: Sat, 23 Apr 2016 19:45:50 +0100 Subject: [PATCH 06/13] Update Repository Fixing the comment. --- src/GitElephant/Repository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GitElephant/Repository.php b/src/GitElephant/Repository.php index fe3c09b1..c41c6580 100644 --- a/src/GitElephant/Repository.php +++ b/src/GitElephant/Repository.php @@ -1037,7 +1037,7 @@ public function pull($from = null, $ref = null, $rebase = true) /** * Push changes to remote repository * - * @param string $remote + * @param string $origin * @param string $branch * @throws \RuntimeException * @throws \Symfony\Component\Process\Exception\LogicException From 642f51c9ee545fe0c0fb3676ee4206ad8228914c Mon Sep 17 00:00:00 2001 From: Redian Date: Sat, 23 Apr 2016 22:50:17 +0100 Subject: [PATCH 07/13] Update Repository For consistency reasons, reverting back the variable naming. --- src/GitElephant/Repository.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/GitElephant/Repository.php b/src/GitElephant/Repository.php index c41c6580..848bfe99 100644 --- a/src/GitElephant/Repository.php +++ b/src/GitElephant/Repository.php @@ -1037,16 +1037,16 @@ public function pull($from = null, $ref = null, $rebase = true) /** * Push changes to remote repository * - * @param string $origin - * @param string $branch + * @param string $to + * @param string $ref * @throws \RuntimeException * @throws \Symfony\Component\Process\Exception\LogicException * @throws \Symfony\Component\Process\Exception\InvalidArgumentException * @throws \Symfony\Component\Process\Exception\RuntimeException */ - public function push($origin = null, $branch = null) + public function push($to = null, $ref = null) { - $this->caller->execute(PushCommand::getInstance($this)->push($origin, $branch)); + $this->caller->execute(PushCommand::getInstance($this)->push($to, $ref)); } /** From 4961cb0c52b19c85f7fe719ab68fa8d200d3e25c Mon Sep 17 00:00:00 2001 From: Matteo Giachino Date: Tue, 26 Apr 2016 23:12:09 +0200 Subject: [PATCH 08/13] php 7.0 support, updated deps --- Dockerfile | 17 ++ composer.json | 7 +- composer.lock | 392 +++++++++++++++++++++++++++++++++------------ docker-compose.yml | 5 + 4 files changed, 310 insertions(+), 111 deletions(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..97fdf181 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM php:7 + +RUN php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php && \ + php composer-setup.php && \ + php -r "unlink('composer-setup.php');" && \ + mv composer.phar /usr/local/bin/composer + +RUN apt-get update && \ + apt-get install -yqq git && \ + git config --global user.email "test@gitelephant.org" && \ + git config --global user.name "GitElephant tests" && \ + rm -rf /var/lib/apt/lists/* + +RUN apt-get update && \ + apt-get install -yqq zlib1g-dev && \ + docker-php-ext-install zip && \ + rm -rf /var/lib/apt/lists/* diff --git a/composer.json b/composer.json index 8a7f0580..9359bdbc 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "phpcollection/phpcollection": "~0.4" }, "require-dev": { - "phpunit/phpunit": "~4.8", + "phpunit/phpunit": "~5.3", "mockery/mockery": "~0.9" }, "minimum-stability": "stable", @@ -26,10 +26,5 @@ "psr-0": { "GitElephant": "src/" } - }, - "config": { - "platform": { - "php": "5.3.3" - } } } diff --git a/composer.lock b/composer.lock index 297e62de..6bb12de8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "dd1c970222d2f3f0621764a098881d98", - "content-hash": "9a13e83dd7398b4e3ec23b95857c0e5d", + "hash": "2bf2f8127980b6d71dee7b0fe9b82293", + "content-hash": "9b20954c13c7dc6f8d490cfdb0ad25f7", "packages": [ { "name": "phpcollection/phpcollection", @@ -109,35 +109,34 @@ }, { "name": "symfony/filesystem", - "version": "v2.6.13", - "target-dir": "Symfony/Component/Filesystem", + "version": "v3.0.4", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "823c035b1a5c13a4924e324d016eb07e70f94735" + "reference": "f82499a459dcade2ea56df94cc58b19c8bde3d20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/823c035b1a5c13a4924e324d016eb07e70f94735", - "reference": "823c035b1a5c13a4924e324d016eb07e70f94735", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/f82499a459dcade2ea56df94cc58b19c8bde3d20", + "reference": "f82499a459dcade2ea56df94cc58b19c8bde3d20", "shasum": "" }, "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "php": ">=5.5.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "3.0-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\Filesystem\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -155,39 +154,38 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2015-07-08 05:59:48" + "time": "2016-03-27 10:24:39" }, { "name": "symfony/finder", - "version": "v2.6.13", - "target-dir": "Symfony/Component/Finder", + "version": "v3.0.4", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "203a10f928ae30176deeba33512999233181dd28" + "reference": "c54e407b35bc098916704e9fd090da21da4c4f52" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/203a10f928ae30176deeba33512999233181dd28", - "reference": "203a10f928ae30176deeba33512999233181dd28", + "url": "https://api.github.com/repos/symfony/finder/zipball/c54e407b35bc098916704e9fd090da21da4c4f52", + "reference": "c54e407b35bc098916704e9fd090da21da4c4f52", "shasum": "" }, "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "php": ">=5.5.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "3.0-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\Finder\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -205,39 +203,38 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2015-07-09 16:02:48" + "time": "2016-03-10 11:13:05" }, { "name": "symfony/process", - "version": "v2.6.13", - "target-dir": "Symfony/Component/Process", + "version": "v3.0.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "57f1e88bb5dafa449b83f9f265b11d52d517b3e9" + "reference": "e6f1f98bbd355d209a992bfff45e7edfbd4a0776" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/57f1e88bb5dafa449b83f9f265b11d52d517b3e9", - "reference": "57f1e88bb5dafa449b83f9f265b11d52d517b3e9", + "url": "https://api.github.com/repos/symfony/process/zipball/e6f1f98bbd355d209a992bfff45e7edfbd4a0776", + "reference": "e6f1f98bbd355d209a992bfff45e7edfbd4a0776", "shasum": "" }, "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "php": ">=5.5.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "3.0-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\Process\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -255,7 +252,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2015-06-30 16:10:16" + "time": "2016-03-30 10:41:14" } ], "packages-dev": [ @@ -423,6 +420,48 @@ ], "time": "2015-04-02 19:54:00" }, + { + "name": "myclabs/deep-copy", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "e3abefcd7f106677fd352cd7c187d6c969aa9ddc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e3abefcd7f106677fd352cd7c187d6c969aa9ddc", + "reference": "e3abefcd7f106677fd352cd7c187d6c969aa9ddc", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "doctrine/collections": "1.*", + "phpunit/phpunit": "~4.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "homepage": "https://github.com/myclabs/DeepCopy", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2015-11-07 22:20:37" + }, { "name": "phpdocumentor/reflection-docblock", "version": "2.0.4", @@ -474,22 +513,24 @@ }, { "name": "phpspec/prophecy", - "version": "v1.5.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7" + "reference": "3c91bdf81797d725b14cb62906f9a4ce44235972" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/3c91bdf81797d725b14cb62906f9a4ce44235972", + "reference": "3c91bdf81797d725b14cb62906f9a4ce44235972", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1" + "sebastian/comparator": "~1.1", + "sebastian/recursion-context": "~1.0" }, "require-dev": { "phpspec/phpspec": "~2.0" @@ -497,7 +538,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "1.5.x-dev" } }, "autoload": { @@ -530,43 +571,44 @@ "spy", "stub" ], - "time": "2015-08-13 10:07:40" + "time": "2016-02-15 07:46:21" }, { "name": "phpunit/php-code-coverage", - "version": "2.2.4", + "version": "3.3.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + "reference": "2431befdd451fac43fbcde94d1a92fb3b8b68f86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2431befdd451fac43fbcde94d1a92fb3b8b68f86", + "reference": "2431befdd451fac43fbcde94d1a92fb3b8b68f86", "shasum": "" }, "require": { - "php": ">=5.3.3", + "php": "^5.6 || ^7.0", "phpunit/php-file-iterator": "~1.3", "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", + "phpunit/php-token-stream": "^1.4.2", + "sebastian/code-unit-reverse-lookup": "~1.0", "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" + "sebastian/version": "~1.0|~2.0" }, "require-dev": { "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" + "phpunit/phpunit": "~5" }, "suggest": { "ext-dom": "*", - "ext-xdebug": ">=2.2.1", + "ext-xdebug": ">=2.4.0", "ext-xmlwriter": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2.x-dev" + "dev-master": "3.3.x-dev" } }, "autoload": { @@ -592,7 +634,7 @@ "testing", "xunit" ], - "time": "2015-10-06 15:47:00" + "time": "2016-04-08 08:14:53" }, { "name": "phpunit/php-file-iterator", @@ -774,16 +816,16 @@ }, { "name": "phpunit/phpunit", - "version": "4.8.21", + "version": "5.3.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ea76b17bced0500a28098626b84eda12dbcf119c" + "reference": "2c6da3536035617bae3fe3db37283c9e0eb63ab3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ea76b17bced0500a28098626b84eda12dbcf119c", - "reference": "ea76b17bced0500a28098626b84eda12dbcf119c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2c6da3536035617bae3fe3db37283c9e0eb63ab3", + "reference": "2c6da3536035617bae3fe3db37283c9e0eb63ab3", "shasum": "" }, "require": { @@ -792,19 +834,22 @@ "ext-pcre": "*", "ext-reflection": "*", "ext-spl": "*", - "php": ">=5.3.3", + "myclabs/deep-copy": "~1.3", + "php": "^5.6 || ^7.0", "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~2.1", + "phpunit/php-code-coverage": "^3.3.0", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": ">=1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "^3.1", "sebastian/comparator": "~1.1", "sebastian/diff": "~1.2", "sebastian/environment": "~1.3", "sebastian/exporter": "~1.2", "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", + "sebastian/object-enumerator": "~1.0", + "sebastian/resource-operations": "~1.0", + "sebastian/version": "~1.0|~2.0", "symfony/yaml": "~2.1|~3.0" }, "suggest": { @@ -816,7 +861,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.8.x-dev" + "dev-master": "5.3.x-dev" } }, "autoload": { @@ -842,30 +887,30 @@ "testing", "xunit" ], - "time": "2015-12-12 07:45:58" + "time": "2016-04-12 16:20:08" }, { "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", + "version": "3.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + "reference": "151c96874bff6fe61a25039df60e776613a61489" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/151c96874bff6fe61a25039df60e776613a61489", + "reference": "151c96874bff6fe61a25039df60e776613a61489", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", + "php": ">=5.6", "phpunit/php-text-template": "~1.2", "sebastian/exporter": "~1.2" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "~5" }, "suggest": { "ext-soap": "*" @@ -873,7 +918,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3.x-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { @@ -898,7 +943,52 @@ "mock", "xunit" ], - "time": "2015-10-02 06:51:40" + "time": "2016-04-20 14:39:26" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe", + "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2016-02-13 06:45:14" }, { "name": "sebastian/comparator", @@ -1018,16 +1108,16 @@ }, { "name": "sebastian/environment", - "version": "1.3.3", + "version": "1.3.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6e7133793a8e5a5714a551a8324337374be209df" + "reference": "dc7a29032cf72b54f36dac15a1ca5b3a1b6029bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e7133793a8e5a5714a551a8324337374be209df", - "reference": "6e7133793a8e5a5714a551a8324337374be209df", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/dc7a29032cf72b54f36dac15a1ca5b3a1b6029bf", + "reference": "dc7a29032cf72b54f36dac15a1ca5b3a1b6029bf", "shasum": "" }, "require": { @@ -1064,7 +1154,7 @@ "environment", "hhvm" ], - "time": "2015-12-02 08:37:27" + "time": "2016-02-26 18:40:46" }, { "name": "sebastian/exporter", @@ -1183,6 +1273,52 @@ ], "time": "2015-10-12 03:26:01" }, + { + "name": "sebastian/object-enumerator", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "d4ca2fb70344987502567bc50081c03e6192fb26" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/d4ca2fb70344987502567bc50081c03e6192fb26", + "reference": "d4ca2fb70344987502567bc50081c03e6192fb26", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2016-01-28 13:25:10" + }, { "name": "sebastian/recursion-context", "version": "1.0.2", @@ -1236,21 +1372,71 @@ "homepage": "http://www.github.com/sebastianbergmann/recursion-context", "time": "2015-11-11 19:50:13" }, + { + "name": "sebastian/resource-operations", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28 20:34:47" + }, { "name": "sebastian/version", - "version": "1.0.6", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", + "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", "shasum": "" }, + "require": { + "php": ">=5.6" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -1269,39 +1455,38 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21 13:59:46" + "time": "2016-02-04 12:56:52" }, { "name": "symfony/yaml", - "version": "v2.6.13", - "target-dir": "Symfony/Component/Yaml", + "version": "v3.0.4", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "c044d1744b8e91aaaa0d9bac683ab87ec7cbf359" + "reference": "0047c8366744a16de7516622c5b7355336afae96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/c044d1744b8e91aaaa0d9bac683ab87ec7cbf359", - "reference": "c044d1744b8e91aaaa0d9bac683ab87ec7cbf359", + "url": "https://api.github.com/repos/symfony/yaml/zipball/0047c8366744a16de7516622c5b7355336afae96", + "reference": "0047c8366744a16de7516622c5b7355336afae96", "shasum": "" }, "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "php": ">=5.5.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "3.0-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\Yaml\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1319,7 +1504,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2015-07-26 08:59:42" + "time": "2016-03-04 07:55:57" } ], "aliases": [], @@ -1330,8 +1515,5 @@ "platform": { "php": ">=5.3.3" }, - "platform-dev": [], - "platform-overrides": { - "php": "5.3.3" - } + "platform-dev": [] } diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..377320f9 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,5 @@ +git: + build: . + volumes: + - .:/code + working_dir: /code From 5f7df1dba32d3459f9d6cb1554f9022495020d75 Mon Sep 17 00:00:00 2001 From: Matteo Giachino Date: Tue, 26 Apr 2016 23:21:56 +0200 Subject: [PATCH 09/13] config platform --- composer.json | 7 +- composer.lock | 366 +++++++++++++------------------------------------- 2 files changed, 99 insertions(+), 274 deletions(-) diff --git a/composer.json b/composer.json index 9359bdbc..fa3e5fd4 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "phpcollection/phpcollection": "~0.4" }, "require-dev": { - "phpunit/phpunit": "~5.3", + "phpunit/phpunit": "~4.8", "mockery/mockery": "~0.9" }, "minimum-stability": "stable", @@ -26,5 +26,10 @@ "psr-0": { "GitElephant": "src/" } + }, + "config": { + "platform": { + "php": "5.3.3" + } } } diff --git a/composer.lock b/composer.lock index 6bb12de8..cb23b6ce 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "2bf2f8127980b6d71dee7b0fe9b82293", - "content-hash": "9b20954c13c7dc6f8d490cfdb0ad25f7", + "hash": "45415e97c91a26eb4578c86cb026a912", + "content-hash": "9a13e83dd7398b4e3ec23b95857c0e5d", "packages": [ { "name": "phpcollection/phpcollection", @@ -109,34 +109,35 @@ }, { "name": "symfony/filesystem", - "version": "v3.0.4", + "version": "v2.6.13", + "target-dir": "Symfony/Component/Filesystem", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "f82499a459dcade2ea56df94cc58b19c8bde3d20" + "reference": "823c035b1a5c13a4924e324d016eb07e70f94735" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/f82499a459dcade2ea56df94cc58b19c8bde3d20", - "reference": "f82499a459dcade2ea56df94cc58b19c8bde3d20", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/823c035b1a5c13a4924e324d016eb07e70f94735", + "reference": "823c035b1a5c13a4924e324d016eb07e70f94735", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": ">=5.3.3" + }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "2.6-dev" } }, "autoload": { - "psr-4": { + "psr-0": { "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -154,38 +155,39 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2016-03-27 10:24:39" + "time": "2015-07-08 05:59:48" }, { "name": "symfony/finder", - "version": "v3.0.4", + "version": "v2.6.13", + "target-dir": "Symfony/Component/Finder", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "c54e407b35bc098916704e9fd090da21da4c4f52" + "reference": "203a10f928ae30176deeba33512999233181dd28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/c54e407b35bc098916704e9fd090da21da4c4f52", - "reference": "c54e407b35bc098916704e9fd090da21da4c4f52", + "url": "https://api.github.com/repos/symfony/finder/zipball/203a10f928ae30176deeba33512999233181dd28", + "reference": "203a10f928ae30176deeba33512999233181dd28", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": ">=5.3.3" + }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "2.6-dev" } }, "autoload": { - "psr-4": { + "psr-0": { "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -203,38 +205,39 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2016-03-10 11:13:05" + "time": "2015-07-09 16:02:48" }, { "name": "symfony/process", - "version": "v3.0.4", + "version": "v2.6.13", + "target-dir": "Symfony/Component/Process", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "e6f1f98bbd355d209a992bfff45e7edfbd4a0776" + "reference": "57f1e88bb5dafa449b83f9f265b11d52d517b3e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/e6f1f98bbd355d209a992bfff45e7edfbd4a0776", - "reference": "e6f1f98bbd355d209a992bfff45e7edfbd4a0776", + "url": "https://api.github.com/repos/symfony/process/zipball/57f1e88bb5dafa449b83f9f265b11d52d517b3e9", + "reference": "57f1e88bb5dafa449b83f9f265b11d52d517b3e9", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": ">=5.3.3" + }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "2.6-dev" } }, "autoload": { - "psr-4": { + "psr-0": { "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -252,7 +255,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2016-03-30 10:41:14" + "time": "2015-06-30 16:10:16" } ], "packages-dev": [ @@ -420,48 +423,6 @@ ], "time": "2015-04-02 19:54:00" }, - { - "name": "myclabs/deep-copy", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "e3abefcd7f106677fd352cd7c187d6c969aa9ddc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e3abefcd7f106677fd352cd7c187d6c969aa9ddc", - "reference": "e3abefcd7f106677fd352cd7c187d6c969aa9ddc", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "doctrine/collections": "1.*", - "phpunit/phpunit": "~4.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "homepage": "https://github.com/myclabs/DeepCopy", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "time": "2015-11-07 22:20:37" - }, { "name": "phpdocumentor/reflection-docblock", "version": "2.0.4", @@ -575,40 +536,39 @@ }, { "name": "phpunit/php-code-coverage", - "version": "3.3.1", + "version": "2.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2431befdd451fac43fbcde94d1a92fb3b8b68f86" + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2431befdd451fac43fbcde94d1a92fb3b8b68f86", - "reference": "2431befdd451fac43fbcde94d1a92fb3b8b68f86", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0", + "php": ">=5.3.3", "phpunit/php-file-iterator": "~1.3", "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "^1.4.2", - "sebastian/code-unit-reverse-lookup": "~1.0", + "phpunit/php-token-stream": "~1.3", "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0|~2.0" + "sebastian/version": "~1.0" }, "require-dev": { "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~5" + "phpunit/phpunit": "~4" }, "suggest": { "ext-dom": "*", - "ext-xdebug": ">=2.4.0", + "ext-xdebug": ">=2.2.1", "ext-xmlwriter": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3.x-dev" + "dev-master": "2.2.x-dev" } }, "autoload": { @@ -634,7 +594,7 @@ "testing", "xunit" ], - "time": "2016-04-08 08:14:53" + "time": "2015-10-06 15:47:00" }, { "name": "phpunit/php-file-iterator", @@ -816,16 +776,16 @@ }, { "name": "phpunit/phpunit", - "version": "5.3.2", + "version": "4.8.24", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "2c6da3536035617bae3fe3db37283c9e0eb63ab3" + "reference": "a1066c562c52900a142a0e2bbf0582994671385e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2c6da3536035617bae3fe3db37283c9e0eb63ab3", - "reference": "2c6da3536035617bae3fe3db37283c9e0eb63ab3", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1066c562c52900a142a0e2bbf0582994671385e", + "reference": "a1066c562c52900a142a0e2bbf0582994671385e", "shasum": "" }, "require": { @@ -834,22 +794,19 @@ "ext-pcre": "*", "ext-reflection": "*", "ext-spl": "*", - "myclabs/deep-copy": "~1.3", - "php": "^5.6 || ^7.0", + "php": ">=5.3.3", "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "^3.3.0", + "phpunit/php-code-coverage": "~2.1", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "^3.1", + "phpunit/php-timer": ">=1.0.6", + "phpunit/phpunit-mock-objects": "~2.3", "sebastian/comparator": "~1.1", "sebastian/diff": "~1.2", "sebastian/environment": "~1.3", "sebastian/exporter": "~1.2", "sebastian/global-state": "~1.0", - "sebastian/object-enumerator": "~1.0", - "sebastian/resource-operations": "~1.0", - "sebastian/version": "~1.0|~2.0", + "sebastian/version": "~1.0", "symfony/yaml": "~2.1|~3.0" }, "suggest": { @@ -861,7 +818,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.3.x-dev" + "dev-master": "4.8.x-dev" } }, "autoload": { @@ -887,30 +844,30 @@ "testing", "xunit" ], - "time": "2016-04-12 16:20:08" + "time": "2016-03-14 06:16:08" }, { "name": "phpunit/phpunit-mock-objects", - "version": "3.1.3", + "version": "2.3.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "151c96874bff6fe61a25039df60e776613a61489" + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/151c96874bff6fe61a25039df60e776613a61489", - "reference": "151c96874bff6fe61a25039df60e776613a61489", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", - "php": ">=5.6", + "php": ">=5.3.3", "phpunit/php-text-template": "~1.2", "sebastian/exporter": "~1.2" }, "require-dev": { - "phpunit/phpunit": "~5" + "phpunit/phpunit": "~4.4" }, "suggest": { "ext-soap": "*" @@ -918,7 +875,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "2.3.x-dev" } }, "autoload": { @@ -943,52 +900,7 @@ "mock", "xunit" ], - "time": "2016-04-20 14:39:26" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe", - "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "phpunit/phpunit": "~5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2016-02-13 06:45:14" + "time": "2015-10-02 06:51:40" }, { "name": "sebastian/comparator", @@ -1273,52 +1185,6 @@ ], "time": "2015-10-12 03:26:01" }, - { - "name": "sebastian/object-enumerator", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "d4ca2fb70344987502567bc50081c03e6192fb26" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/d4ca2fb70344987502567bc50081c03e6192fb26", - "reference": "d4ca2fb70344987502567bc50081c03e6192fb26", - "shasum": "" - }, - "require": { - "php": ">=5.6", - "sebastian/recursion-context": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "~5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2016-01-28 13:25:10" - }, { "name": "sebastian/recursion-context", "version": "1.0.2", @@ -1372,71 +1238,21 @@ "homepage": "http://www.github.com/sebastianbergmann/recursion-context", "time": "2015-11-11 19:50:13" }, - { - "name": "sebastian/resource-operations", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "shasum": "" - }, - "require": { - "php": ">=5.6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28 20:34:47" - }, { "name": "sebastian/version", - "version": "2.0.0", + "version": "1.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5" + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", - "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", "shasum": "" }, - "require": { - "php": ">=5.6" - }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, "autoload": { "classmap": [ "src/" @@ -1455,38 +1271,39 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-02-04 12:56:52" + "time": "2015-06-21 13:59:46" }, { "name": "symfony/yaml", - "version": "v3.0.4", + "version": "v2.6.13", + "target-dir": "Symfony/Component/Yaml", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "0047c8366744a16de7516622c5b7355336afae96" + "reference": "c044d1744b8e91aaaa0d9bac683ab87ec7cbf359" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/0047c8366744a16de7516622c5b7355336afae96", - "reference": "0047c8366744a16de7516622c5b7355336afae96", + "url": "https://api.github.com/repos/symfony/yaml/zipball/c044d1744b8e91aaaa0d9bac683ab87ec7cbf359", + "reference": "c044d1744b8e91aaaa0d9bac683ab87ec7cbf359", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": ">=5.3.3" + }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "2.6-dev" } }, "autoload": { - "psr-4": { + "psr-0": { "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1504,7 +1321,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-03-04 07:55:57" + "time": "2015-07-26 08:59:42" } ], "aliases": [], @@ -1515,5 +1332,8 @@ "platform": { "php": ">=5.3.3" }, - "platform-dev": [] + "platform-dev": [], + "platform-overrides": { + "php": "5.3.3" + } } From 74b22fcd5f2c75268791c51b2ea1bda29b0d7e56 Mon Sep 17 00:00:00 2001 From: Tyler Cosgrove Date: Sat, 21 May 2016 21:47:19 -0400 Subject: [PATCH 10/13] Add option to pass arguments in to push command Until I find a permanent solution where any command can have optional arguments this is a very doable solution for a common problem (not being able to push tags) --- src/GitElephant/Command/PushCommand.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/GitElephant/Command/PushCommand.php b/src/GitElephant/Command/PushCommand.php index d1b10553..62a02543 100644 --- a/src/GitElephant/Command/PushCommand.php +++ b/src/GitElephant/Command/PushCommand.php @@ -49,7 +49,7 @@ public function __construct(Repository $repo = null) * @throws \RuntimeException * @return string */ - public function push($remote = 'origin', $branch = 'master') + public function push($remote = 'origin', $branch = 'master', $args = null) { if ($remote instanceof Remote) { $remote = $remote->getName(); @@ -62,6 +62,10 @@ public function push($remote = 'origin', $branch = 'master') $this->addCommandSubject($remote); $this->addCommandSubject2($branch); + if(!is_null($args)) { + $this->addCommandArgument($args); + } + return $this->getCommand(); } } From a2cacdbae87b52a285a83b6d598a4b2cd6b370a1 Mon Sep 17 00:00:00 2001 From: Sergey Bukharov Date: Fri, 10 Mar 2017 19:27:26 +0300 Subject: [PATCH 11/13] Commits can search own tags (#108) Commits can search own tags --- src/GitElephant/Objects/Commit.php | 38 ++++++++++++++++++++++++ tests/GitElephant/Objects/CommitTest.php | 23 ++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/src/GitElephant/Objects/Commit.php b/src/GitElephant/Objects/Commit.php index 9b834d5b..737eb6b8 100644 --- a/src/GitElephant/Objects/Commit.php +++ b/src/GitElephant/Objects/Commit.php @@ -406,4 +406,42 @@ public function revParse(Array $options = array()) return array_map('trim', $caller->getOutputLines(true)); } + + /** + * Is the commit tagged? + * + * return true if some tag of repository point to this commit + * return false otherwise + * + * @return bool + */ + public function tagged() + { + $result = false; + foreach ($this->repository->getTags() as $tag) { + if ($tag->getSha() == $this->getSha()) { + $result = true; + break; + } + } + + return $result; + } + + /** + * Return Tags that point to this commit + * + * @return Tag[] + */ + public function getTags() + { + $currentCommitTags = array(); + foreach ($this->repository->getTags() as $tag) { + if ($tag->getSha() == $this->getSha()) { + $currentCommitTags[] = $tag; + } + } + + return $currentCommitTags; + } } diff --git a/tests/GitElephant/Objects/CommitTest.php b/tests/GitElephant/Objects/CommitTest.php index 1456da43..0091b106 100644 --- a/tests/GitElephant/Objects/CommitTest.php +++ b/tests/GitElephant/Objects/CommitTest.php @@ -223,4 +223,27 @@ public function testRevParse() $revParse = $commit->revParse(); $this->assertEquals($commit->getSha(), $revParse[0]); } + + public function testCommitWithoutTag() + { + $this->getRepository()->init(); + $this->addFile('test'); + $this->repository->stage(); + $commit = Commit::create($this->repository, 'first commit', true); + $this->assertFalse($commit->tagged()); + } + + public function testCommitWithTag() + { + $this->getRepository()->init(); + $this->addFile('test'); + $this->repository->stage(); + $commit = Commit::create($this->repository, 'first commit', true); + Tag::create($this->repository, '1.0.0'); + $this->assertTrue($commit->tagged()); + $this->assertCount(1, $commit->getTags()); + $commitTags = $commit->getTags(); + $this->assertEquals('1.0.0', $commitTags[0]->getName()); + } + } From 5343d8235bdae783802313c75630586c1f97b591 Mon Sep 17 00:00:00 2001 From: "Marc J. Schmidt" Date: Mon, 12 Jun 2017 13:03:27 +0200 Subject: [PATCH 12/13] Fix fatal in PHP 7 (#117) Fix fatal in PHP 7 --- src/GitElephant/Objects/Commit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GitElephant/Objects/Commit.php b/src/GitElephant/Objects/Commit.php index 737eb6b8..8f50c7f4 100644 --- a/src/GitElephant/Objects/Commit.php +++ b/src/GitElephant/Objects/Commit.php @@ -221,7 +221,7 @@ public function getDiff() */ private function parseOutputLines($outputLines) { - $message = ''; + $message = array(); foreach ($outputLines as $line) { $matches = array(); if (preg_match('/^commit (\w+)$/', $line, $matches) > 0) { From 09e2eef5e5abed5547d54e2ab03fe8cc0d8345b5 Mon Sep 17 00:00:00 2001 From: Matteo Giachino Date: Mon, 12 Jun 2017 13:40:50 +0200 Subject: [PATCH 13/13] removing hhvm from travis build, no longer relevant --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4d656806..6b876f4f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,6 @@ php: - 5.5 - 5.6 - 7.0 - - hhvm before_script: - curl -s https://getcomposer.org/installer | php