From 3fa3f1ebd058daa9c1df47fe30fc72dceef9b883 Mon Sep 17 00:00:00 2001 From: Matthew Gamble Date: Tue, 8 Dec 2015 08:43:28 +1100 Subject: [PATCH 01/48] Add command builder for 'git config' To facilitate testing this new command, I modified .git/config inside git.zip to include a dummy section just for testing. --- src/Command/ConfigCommandBuilder.php | 366 +++++++++++++++++++++++++++ src/GitRepository.php | 11 + tests/GitRepositoryTest.php | 87 +++++++ tests/git.zip | Bin 19105 -> 19139 bytes 4 files changed, 464 insertions(+) create mode 100644 src/Command/ConfigCommandBuilder.php diff --git a/src/Command/ConfigCommandBuilder.php b/src/Command/ConfigCommandBuilder.php new file mode 100644 index 0000000..869f15d --- /dev/null +++ b/src/Command/ConfigCommandBuilder.php @@ -0,0 +1,366 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * This project is provided in good faith and hope to be usable by anyone. + * + * @package bit3/git-php + * @author Tristan Lins + * @author Christian Schiffler + * @copyright 2014 Tristan Lins + * @link https://github.com/bit3/git-php + * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @filesource + */ + +namespace Bit3\GitPhp\Command; + +/** + * Config command builder. + */ +class ConfigCommandBuilder extends AbstractCommandBuilder +{ + /** + * {@inheritDoc} + */ + protected function initializeProcessBuilder() + { + $this->processBuilder->add('config'); + } + + /** + * Specify a single config file that should be looked at. + * Has special support for the global, system and local flags. + * + * @param string $file + * + * @return ConfigCommandBuilder + */ + public function file($file) + { + if (in_array($file, array('global', 'system', 'local'))) { + $this->processBuilder->add('--' . $file); + } else { + $this->processBuilder->add('--file') + ->add($file); + } + return $this; + } + + /** + * Add the blob option to the command line. + * + * @param string $blobId + * + * @return ConfigCommandBuilder + */ + public function blob($blobId) + { + $this->processBuilder->add('--blob ' . $blobId); + return $this; + } + + /** + * Add a type option to the command line. + * + * @param string $type + * + * @return ConfigCommandBuilder + */ + public function type($type) + { + if (in_array($type, array('bool', 'int', 'bool-or-int', 'path'))) { + $this->processBuilder->add('--' . $type); + } else { + throw new GitException('Invalid configuration type supplied.'); + } + return $this; + } + + /** + * Add the add option and associated parameters to the command line. + * + * @param string $name + * + * @param string $value + * + * @return ConfigCommandBuilder + */ + public function add($name, $value) + { + $this->processBuilder->add('--add') + ->add($name) + ->add($value); + return $this; + } + + /** + * Add the replace-all option and associated parameters to the command line. + * + * @param string $name + * + * @param string $value + * + * @param null|string $valueRegex + * + * @return ConfigCommandBuilder + */ + public function replaceAll($name, $value, $valueRegex = null) + { + $this->processBuilder->add('--replace-all') + ->add($name) + ->add($value); + if ($valueRegex !== null) { + $this->processBuilder->add($valueRegex); + } + return $this; + } + + /** + * Adds the NUL byte termination option to the command line. + * + * @return ConfigCommandBuilder + */ + public function terminateWithNUL() + { + $this->processBuilder->add('--null'); + return $this; + } + + /** + * Add the get option and associated parameters to the command line. + * + * @param string $name + * + * @param null|string $valueRegex + * + * @return ConfigCommandBuilder + */ + public function get($name, $valueRegex = null) + { + $this->processBuilder->add('--get'); + $this->addNameAndPattern($name, $valueRegex); + return $this; + } + + /** + * Add the get-all option and associated parameters to the command line. + * + * @param string $name + * + * @param null|string $valueRegex + * + * @return ConfigCommandBuilder + */ + public function getAll($name, $valueRegex = null) + { + $this->processBuilder->add('--get-all'); + $this->addNameAndPattern($name, $valueRegex); + return $this; + } + + /** + * Add the get-regexp option and associated parameters to the command line. + * + * @param string $nameRegex + * + * @param null|string $valueRegex + * + * @return ConfigCommandBuilder + */ + public function getRegexp($nameRegex, $valueRegex = null) + { + $this->processBuilder->add('--get-regexp'); + $this->addNameAndPattern($nameRegex, $valueRegex); + return $this; + } + + /** + * Add the get-urlmatch option and associated parameters to the command line. + * + * @param string $name + * + * @param string $url + * + * @return ConfigCommandBuilder + */ + public function getUrlmatch($name, $url) + { + $this->processBuilder->add('--get-urlmatch'); + $this->addNameAndPattern($name, $url); + return $this; + } + + /** + * Add the unset option and associated parameters to the command line. + * + * @param string $name + * + * @param null|string $valueRegex + * + * @return ConfigCommandBuilder + */ + public function unsetOpt($name, $valueRegex = null) + { + $this->processBuilder->add('--unset'); + $this->addNameAndPattern($name, $valueRegex); + return $this; + } + + /** + * Add the unset-all option and associated parameters to the command line. + * + * @param string $name + * + * @param null|string $valueRegex + * + * @return ConfigCommandBuilder + */ + public function unsetAll($name, $valueRegex = null) + { + $this->processBuilder->add('--unset-all'); + $this->addNameAndPattern($name, $valueRegex); + return $this; + } + + /** + * @param string $name + * + * @param null|string $pattern + */ + private function addNameAndPattern($name, $pattern) + { + $this->processBuilder->add($name); + if ($pattern !== null) { + $this->processBuilder->add($pattern); + } + } + + /** + * Add the rename-section option and associated parameters to the command line. + * + * @param string $oldName + * + * @param string $newName + * + * @return ConfigCommandBuilder + */ + public function renameSection($oldName, $newName) + { + $this->processBuilder->add('--rename-section') + ->add($oldName) + ->add($newName); + return $this; + } + + /** + * Add the remove-section option to the command line. + * + * @param string $name + * + * @return ConfigCommandBuilder + */ + public function removeSection($name) + { + $this->processBuilder->add('--remove-section') + ->add($name); + return $this; + } + + /** + * Add the list option to the command line. + * + * @return ConfigCommandBuilder + */ + public function listOpt() + { + $this->processBuilder->add('--list'); + return $this; + } + + /** + * Add the get-color option and associated parameters to the command line. + * + * @param string $name + * + * @param null|string $default + * + * @return ConfigCommandBuilder + */ + public function getColor($name, $default = null) + { + $this->processBuilder->add('--get-color') + ->add($name); + if ($default !== null) { + $this->processBuilder->add($default); + } + return $this; + } + + /** + * Add the get-colorbool option and associated parameters to the command line. + * + * @param string $name + * + * @param bool|null $stdoutIsTty + * + * @return ConfigCommandBuilder + */ + public function getColorBool($name, $stdoutIsTty = null) + { + $this->processBuilder->add('--get-colorbool') + ->add($name); + if (is_bool($stdoutIsTty)) { + $this->processBuilder->add($stdoutIsTty ? 'true' : 'false'); + } + return $this; + } + + /** + * Add the includes or no-includes option to the command line. + * + * @param bool $allow + * + * @return ConfigCommandBuilder + */ + public function includes($allow = true) + { + $this->processBuilder->add($allow ? '--includes' : '--no-includes'); + return $this; + } + + /** + * Build the command and execute it. + * + * @param null|string $name Pass name of setting here to perform a basic get or set operation + * + * @param null|string $value Pass a value for the setting to turn this into a set command + * + * @param null|string $valueRegex Pass a regex to limit changing of a multi-value setting to certain settings + * + * @return mixed + * + * @SuppressWarnings(PHPMD.ShortVariableName) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.CamelCaseParameterName) + */ + public function execute($name = null, $value = null, $valueRegex = null) + { + if ($name !== null) { + $this->processBuilder->add($name); + if ($value !== null) { + $this->processBuilder->add($value); + if ($valueRegex !== null) { + $this->processBuilder->add($valueRegex); + } + } + } + return parent::run(); + } +} diff --git a/src/GitRepository.php b/src/GitRepository.php index fcd235f..f4a16b8 100644 --- a/src/GitRepository.php +++ b/src/GitRepository.php @@ -26,6 +26,7 @@ use Bit3\GitPhp\Command\AddCommandBuilder; use Bit3\GitPhp\Command\BranchCommandBuilder; use Bit3\GitPhp\Command\CheckoutCommandBuilder; +use Bit3\GitPhp\Command\ConfigCommandBuilder; use Bit3\GitPhp\Command\MergeCommandBuilder; use Bit3\GitPhp\Command\CloneCommandBuilder; use Bit3\GitPhp\Command\CommitCommandBuilder; @@ -126,6 +127,16 @@ public function cloneRepository() return new CloneCommandBuilder($this); } + /** + * Create a config command. + * + * @return ConfigCommandBuilder + */ + public function config() + { + return new ConfigCommandBuilder($this); + } + /** * Create a remote command. * diff --git a/tests/GitRepositoryTest.php b/tests/GitRepositoryTest.php index 9ec66cd..8bd1b6e 100644 --- a/tests/GitRepositoryTest.php +++ b/tests/GitRepositoryTest.php @@ -120,6 +120,93 @@ public function testInit() ); } + /** + * @covers \Bit3\GitPhp\GitRepository::config + * @covers \Bit3\GitPhp\Command\ConfigCommandBuilder::execute + * @covers \Bit3\GitPhp\Command\ConfigCommandBuilder::get + */ + public function testConfigGetOnInitializedRepository() + { + $this->assertEquals( + 'false', + $this->initializedGitRepository->config()->file('local')->execute('core.bare') + ); + $this->assertEquals( + 'CCA unittest', + $this->initializedGitRepository->config()->file('local')->get('user.name')->execute() + ); + } + + /** + * @covers \Bit3\GitPhp\GitRepository::config + * @covers \Bit3\GitPhp\Command\ConfigCommandBuilder + */ + public function testConfigGetOnUnitializedRepository() + { + $this->setExpectedException('Bit3\GitPhp\GitException'); + $this->uninitializedGitRepository->config()->file('local')->execute('core.bare'); + $this->uninitializedGitRepository->config()->file('local')->get('user.name')->execute(); + } + + public function testConfigSetOnInitializedRepository() + { + $this->initializedGitRepository->config()->file('local')->execute('user.name', 'CCA unittest 2'); + + $process = ProcessBuilder::create(array('git', 'config', '--local', 'user.name')) + ->setWorkingDirectory($this->initializedRepositoryPath) + ->getProcess(); + $process->run(); + + $this->assertEquals( + 'CCA unittest 2', + trim($process->getOutput()) + ); + } + + public function testConfigAddOnInitializedRepository() + { + $this->initializedGitRepository->config()->file('local')->add('user.name', 'CCA unittest 2')->execute(); + + $process = ProcessBuilder::create(array('git', 'config', '--local', '--get-all', 'user.name')) + ->setWorkingDirectory($this->initializedRepositoryPath) + ->getProcess(); + $process->run(); + + $names = explode("\n", $process->getOutput()); + $names = array_map('trim', $names); + $names = array_filter($names); + + $this->assertEquals( + array('CCA unittest', 'CCA unittest 2'), + $names + ); + } + + public function testConfigGetAllOnInitializedRepository() + { + $values = $this->initializedGitRepository->config()->file('local')->getAll('gitphp.test2')->execute(); + + $values = explode("\n", $values); + $values = array_map('trim', $values); + $values = array_filter($values); + + $this->assertEquals( + array('aa123', 'ab234', 'ac345', 'bb234'), + $values + ); + + $values = $this->initializedGitRepository->config()->file('local')->getAll('gitphp.test2', '^a.+3.+$')->execute(); + + $values = explode("\n", $values); + $values = array_map('trim', $values); + $values = array_filter($values); + + $this->assertEquals( + array('ab234', 'ac345'), + $values + ); + } + /** * @covers \Bit3\GitPhp\GitRepository::remote * @covers \Bit3\GitPhp\Command\RemoteCommandBuilder::getNames diff --git a/tests/git.zip b/tests/git.zip index 151da0f921e07a228d1b5c17fa6334fa495c499d..a820367e0371f06f5e1b70cefd73972ac9387493 100644 GIT binary patch delta 4912 zcmai030PCt5Y$p}`lG z{tPm^FeS)TVF3)X@-RPv-tp=oE7i3^*Rtrp(q>eedPj(6=m`9H=mBq~TJT4}^$z$i zfk4O>Q7CZ1!ev2OT20Qv1=FVuK`ggtX*0}1KxppYzg~1ESg`6s&(tc9$T0_#iX{SN zpUXU(Z)+V^y1UKtc+gokYR~(1?lI5%Viq2KuWM?+=})SERow_oWxt5`k6wEHt={c* z-9*;L)HVCI&v2N`vf0La_h>Ays_D)fF6SOzO}v=-Kmi1*?udj>e~anLfQBCg~jQzlNYEbGi^W0l~ro(ziRnIGpUDt;k^-!%IGzn9slXv z(XeU3z9SyD6VsZHx^D4V)%M?QTJ&pa$*Fy!z@fRT&)paO?d?9+U`~oRRjQu}ze@Q>vFK7r;gl!I{>d(t z(>dw#w9iPG+pQlAFJ>Em6*ea{wZ{_+t+xN#G@KfJaa zwQc?)_jkv|PyhL3^QGnIM*i=+?{~)(k1JamHE(f;c*~~rb=CLIW**unh%K&OEuWjR zuKZsa#p5G_;tEHdX>R!-M|+~As6_ukx);R6DGw06wUAyo4*45t~ zvEF<4p53u)#}ypBDe~@pyshQU?wLOxxaV{E;q~XUyoaXW$*$jcqOdcRTe@Zz?}j{h znQw8a^ZwqBmqnkBmSpa}c(o(PwT2k%j?Xptk-amf>p`~1M`12&?(}IOK{(rs$?A45HZ7bl zj$zO|Cf-R42~i}2aH7bW0O5XjCSi{|pB5H5G5KtDx^2VLl|g$Wl#9=6(-rPG+MEF{ za%|@5ZUoFI93%`7t;5#?p5W5f+j}!W&f9yDjs-ZA=VytAfvQ4avBC^I775eMoitw+ z9%Bu1tq`O!V7dea#9&$!0+Do~CPy38KdzsZ`%JakPmqBoTc(%ik!?KLs)1$;upS;@ zPV!UDX<>KU1oAR%K@dwc`4q#MCmuMFh>f-8qU6NtA zwX*%K(*~<$++a%>U6}ypA6z9vuCK6ufv(|lLM-VUhUc4{a7!42k0wqugOBH&6$6zB zG`6ysy52Dw7$_J%oB>VRMrT|L1kk^6O`pa= zEP7!xS{3!7=x)k9;qqNN;aeEE<*_P(2HWZy-mfl@I%BKe>gP?D-}A z4C#G{(H>kA2V#UWkf|y1T{fPic4N*q6w^D=6swJma9pSZ{xZ>yIpurv^Hhec!H=N^ zZgk=tICy%ZnArn7@fAQ~4hL^ldoe?R#1%Eg+Y6lO2(c{E(YHT9y0t9@2qfTfxIUgD z`#AX7c#$b@-7Qr?sf5+oh++Vq1jo2k;<%sq&-)wT})3LxW}J{ zTcD-)i6!GH)-W4{-;uiE!~{E~Niphic`7Ye^6(S5*(`8Fy;8=V6+hV`Tq6-#SKlb; zJyi{1wZd^XQg0uM@P0qBb@gFAJL0#H2&o|Ru14w&!w^31 z)a}R47V6dzHQlKPeeuXxFXobMZ_HDDH19;vLAdcFa8w4b1oEzU=8N##LN!i_vonoL zcl8kZoLGwV3&1O4r

GNDPnC^pHGNxFY*6C8V7`&PJ)9D@FJ#TUUHD#*Bnc z9abh7dE_lA-W2U=dbxT?p2}8JIw}mT(?@9(W?&$G6s=~a4?7fX{Kr7tHrB#m0SEyQ zQ4khcvI0vKZRLj`+#6-V3P6I!Qlv*Po;cP57uc($Q53m37^g&eGt-61OBXsEw{vguV)W5DE0CGN(V*M;b_(SdpOhh@E z;`AhN;uwl$Cx^S`xZtueLrv>bhiilSG%$r9`kAQfinM-pkJr2{24*~9cC25;7f*~d zt0n_(YXn8E3dOAvX5FlVz%$$zPLVqm*d;=|n6aC$!SmWPLFO(2&h!x)m2@OjdH>Tt wX-bkhJ#k!|s{a`Zw$#oBW-r4i@_-V%hkJ@%am#_X2BA>+yKN7f23_Fj|B&=>SO5S3 delta 4813 zcmai12~<;88oqf6fk1$;M&UscNmz^ogd{8x5R9NgRRpvsYO07}r@*i%+LJgz# zxWy$hwyrHz>wZ)eN2teBTRPUM#T8GhQn3swqtvC$F#q#~CCLlGxj8xKe*eDQFJITO zcGawpcb%E)Z4J-a}eo4SU`A|cYy$POoR|x_;Is+ODKQC zmF_ftO=a70abWDFr-HL3@)O@po6~$MBJEsR-~S%;*T%ZuZ`WM`1jqz@sJ z6xS+)7*gD-ykkcf5$uR;g!sLQZXyduXjOx_vEgAOW5BHy;gO@d)Epkm;F3VO#^@5L z`E+9FsA?WhR5Pd45h0I^(NYUL5X~11%Q!;n&l=4NEN{;W57qRT|sPWtP7mRU0Cm~s9BFxpMS`tx_rQTk>jZuS8!k!Pa7)4CI@@&|xSYwA zTVCQyZVKFSxk1)aIk^eIbF>IDS+; zzbJ(G-yC=U5jXKdS)sO6_bO9^eb`>*Ek3d|hP_nW!!OFw>2$=BHeJTey1BFN{G%oJ zvu%PY*G{hCZnz}l^IJp2+u~z8Gxu%0cjC}Kc}?Gum^C#49k*ZHka90yJl9uSb!}Yx zwaV6ewXNq$+E29Br#IDBx^B>AG+(dU`suz4xkt|E=Y3qhYx{v(zmu)^U)3FKv%BA7 zdvN1}qE9+9rDHfpw+EbE+&i^`SGD2vv*jU%)k}g!jpvJ_3o@m5Ufy{A@T<Crva@+bMtM6cXZN)4#wB|e(Q`=%zpc9MmWz*e4u^}86<@FZD zhKw}GhNeMgOl5X5B{e{T3biiFUwQrugwj|D3D6iy9>G_%w;~SVbu%Qn!^qQ+q$x8( z$iYN%0VsIm#L|NNoV?{3>EH?jX`)@B0{}YWGJ_j&g4uY(bPGeY7BF-rnk0^La7vODLjZ}JMiQ?%c;U1_ zb3=o^)B_~h2K!7G;hWQ(&0&N7^aE@+1yicb0w2(1N_9Pq$)*a{9be4FyOR8^D!-dV z5-k)&h~1`nFdOKS6lyPJbpJ|1-KpbdQq68#yeCm=Zh&?Tm`i;;NzApwjq$$B5Q?~H zN#gHz`07-NRR}MUWIwb+SQ8p0g>EVFw4m6-yM^L0pfiVu`?V4^W767u3$^L*lfO-c zc&MWuOd1PGD~|9Go)i*=YoFn_cm{@m|aj@PV4(4p&?_*~$b1!BE{V!oFgf;2sa<6@Gg z3GVp9q-XTNy8-WisC8L@y)Ef9NE>uEMn&9}D zgisxb@Iz-Yc8+nhUe^L{(35&-y`@}gSq(i{-4*#kI5j5NdhYgI+)mt>!~9i6jEUaLObrOAHEqO9QV)7=Ed-{;)uED_?~fyQpYcj{)Ey$?xs z(w8Hv$pSU=Dk=@0pn^K4n{crj>1(`jexyYs(N1iE1(AK`bW9LPQpefEiA!pHBvNeN sg0$o=ko>vTK1B*r)G_5ukrCJ?N+KGTI2&kFgp}~#;fm0H>S;j#2i-%gm;e9( From 41642c2a0f7bbad9fe2f6bbacae41e7fe54abefd Mon Sep 17 00:00:00 2001 From: Christian Schiffler Date: Mon, 7 Dec 2015 23:55:27 +0100 Subject: [PATCH 02/48] Bump phpcq. --- composer.json | 3 +- composer.lock | 1022 ++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 795 insertions(+), 230 deletions(-) diff --git a/composer.json b/composer.json index 91f1162..75f09dd 100644 --- a/composer.json +++ b/composer.json @@ -9,9 +9,8 @@ }, "require-dev": { "monolog/monolog": "~1.0", - "phpunit/phpunit": "3.7.*", "symfony/filesystem": "~2.3", - "phpcq/all-tasks": "~1.0" + "phpcq/all-tasks": "~1.1" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 460b2cb..bb9ecee 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +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": "5df1bc1118ecfab16f9be46df3566e27", + "hash": "39b357e55ce5a7e9b356ae0c6a8ea9bb", + "content-hash": "7d78fbf8b3d2681894d393df3336ede0", "packages": [ { "name": "bit3/no-op-logger", @@ -89,34 +90,34 @@ }, { "name": "symfony/process", - "version": "v2.7.3", + "version": "v2.8.0", "source": { "type": "git", - "url": "https://github.com/symfony/Process.git", - "reference": "48aeb0e48600321c272955132d7606ab0a49adb3" + "url": "https://github.com/symfony/process.git", + "reference": "1b988a88e3551102f3c2d9e1d47a18c3a78d6312" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/48aeb0e48600321c272955132d7606ab0a49adb3", - "reference": "48aeb0e48600321c272955132d7606ab0a49adb3", + "url": "https://api.github.com/repos/symfony/process/zipball/1b988a88e3551102f3c2d9e1d47a18c3a78d6312", + "reference": "1b988a88e3551102f3c2d9e1d47a18c3a78d6312", "shasum": "" }, "require": { "php": ">=5.3.9" }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Process\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -134,22 +135,76 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2015-07-01 11:25:50" + "time": "2015-11-30 12:35:10" } ], "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2015-06-14 21:17:01" + }, { "name": "monolog/monolog", - "version": "1.15.0", + "version": "1.17.2", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "dc5150cc608f2334c72c3b6a553ec9668a4156b0" + "reference": "bee7f0dc9c3e0b69a6039697533dca1e845c8c24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/dc5150cc608f2334c72c3b6a553ec9668a4156b0", - "reference": "dc5150cc608f2334c72c3b6a553ec9668a4156b0", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bee7f0dc9c3e0b69a6039697533dca1e845c8c24", + "reference": "bee7f0dc9c3e0b69a6039697533dca1e845c8c24", "shasum": "" }, "require": { @@ -163,10 +218,11 @@ "aws/aws-sdk-php": "^2.4.9", "doctrine/couchdb": "~1.0@dev", "graylog2/gelf-php": "~1.0", + "jakub-onderka/php-parallel-lint": "0.9", "php-console/php-console": "^3.1.3", "phpunit/phpunit": "~4.5", "phpunit/phpunit-mock-objects": "2.3.0", - "raven/raven": "~0.8", + "raven/raven": "^0.13", "ruflin/elastica": ">=0.90 <3.0", "swiftmailer/swiftmailer": "~5.3", "videlalvaro/php-amqplib": "~2.4" @@ -186,7 +242,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15.x-dev" + "dev-master": "1.16.x-dev" } }, "autoload": { @@ -212,30 +268,31 @@ "logging", "psr-3" ], - "time": "2015-07-12 13:54:09" + "time": "2015-10-14 12:51:02" }, { "name": "pdepend/pdepend", - "version": "2.0.6", + "version": "2.2.2", "source": { "type": "git", "url": "https://github.com/pdepend/pdepend.git", - "reference": "a15ffcbfbcc4570d4a733ca7b76e9cac0a56c3f4" + "reference": "d3ae0d084d526cdc6c3f1b858fb7148de77b41c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pdepend/pdepend/zipball/a15ffcbfbcc4570d4a733ca7b76e9cac0a56c3f4", - "reference": "a15ffcbfbcc4570d4a733ca7b76e9cac0a56c3f4", + "url": "https://api.github.com/repos/pdepend/pdepend/zipball/d3ae0d084d526cdc6c3f1b858fb7148de77b41c5", + "reference": "d3ae0d084d526cdc6c3f1b858fb7148de77b41c5", "shasum": "" }, "require": { - "symfony/config": ">=2.4", - "symfony/dependency-injection": ">=2.4", - "symfony/filesystem": ">=2.4" + "php": ">=5.3.7", + "symfony/config": "^2.3.0", + "symfony/dependency-injection": "^2.3.0", + "symfony/filesystem": "^2.3.0" }, "require-dev": { - "phpunit/phpunit": "4.*@stable", - "squizlabs/php_codesniffer": "@stable" + "phpunit/phpunit": "^4.0.0,<4.8", + "squizlabs/php_codesniffer": "^2.0.0" }, "bin": [ "src/bin/pdepend" @@ -251,41 +308,40 @@ "BSD-3-Clause" ], "description": "Official version of pdepend to be handled with Composer", - "time": "2015-03-02 08:06:43" + "time": "2015-10-16 08:49:58" }, { "name": "phpcq/all-tasks", - "version": "1.0.0", + "version": "dev-develop", "source": { "type": "git", "url": "https://github.com/phpcq/all-tasks.git", - "reference": "71a29b47bb83279a1b478ad3d4439a6a645f9e61" + "reference": "4a520d67c4c21e8f2f5dbaabe2790516b011cf0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpcq/all-tasks/zipball/71a29b47bb83279a1b478ad3d4439a6a645f9e61", - "reference": "71a29b47bb83279a1b478ad3d4439a6a645f9e61", + "url": "https://api.github.com/repos/phpcq/all-tasks/zipball/4a520d67c4c21e8f2f5dbaabe2790516b011cf0c", + "reference": "4a520d67c4c21e8f2f5dbaabe2790516b011cf0c", "shasum": "" }, "require": { - "bit3/git-php": "~1.0", - "pdepend/pdepend": "2.0.*", - "phpcq/author-validation": "~1.0", + "pdepend/pdepend": "~2.1", + "phpcq/author-validation": "~1.1", "phpcq/autoload-validation": "~1.0", "phpcq/branch-alias-validation": "~1.0", - "phpcq/coding-standard": "~1.0", + "phpcq/coding-standard": "~2.0", "phpcq/phpcq": "~1.0", "phpcq/travis-configuration-check": "~1.0", - "phploc/phploc": "~2.0", - "phpmd/phpmd": "~2.0", - "phpunit/phpunit": "~3.7", - "sebastian/phpcpd": "~1.4", - "squizlabs/php_codesniffer": "~1.0" + "phploc/phploc": "~2.1", + "phpmd/phpmd": "~2.2", + "phpunit/phpunit": "~4.7", + "sebastian/phpcpd": "~1.4" }, "type": "metapackage", "extra": { "branch-alias": { - "dev-develop": "1.x-dev" + "dev-master": "1.0.x-dev", + "dev-develop": "1.1.x-dev" } }, "notification-url": "https://packagist.org/downloads/", @@ -307,7 +363,7 @@ } ], "description": "Meta package to enable all tasks of the PHP code quality project", - "time": "2015-01-11 21:57:07" + "time": "2015-08-05 19:25:13" }, { "name": "phpcq/author-validation", @@ -371,16 +427,16 @@ }, { "name": "phpcq/autoload-validation", - "version": "1.0.3", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/phpcq/autoload-validation.git", - "reference": "9a8a3580058a9cb40d2f629b47d47e67d201a117" + "reference": "f51feaae9d81e0fef72b812113b68ac256eea18e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpcq/autoload-validation/zipball/9a8a3580058a9cb40d2f629b47d47e67d201a117", - "reference": "9a8a3580058a9cb40d2f629b47d47e67d201a117", + "url": "https://api.github.com/repos/phpcq/autoload-validation/zipball/f51feaae9d81e0fef72b812113b68ac256eea18e", + "reference": "f51feaae9d81e0fef72b812113b68ac256eea18e", "shasum": "" }, "require": { @@ -424,7 +480,7 @@ } ], "description": "Check that the contents of the composer.json autoload keys are correct.", - "time": "2015-08-05 18:24:57" + "time": "2015-08-06 06:11:42" }, { "name": "phpcq/branch-alias-validation", @@ -485,24 +541,24 @@ }, { "name": "phpcq/coding-standard", - "version": "1.0.0", + "version": "dev-develop", "source": { "type": "git", "url": "https://github.com/phpcq/coding-standard.git", - "reference": "35ce5b6979303cf6ede530f846d3a3d2cafdec03" + "reference": "7e859419e15169e4dda1243e684eff0e1a7f4b29" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpcq/coding-standard/zipball/35ce5b6979303cf6ede530f846d3a3d2cafdec03", - "reference": "35ce5b6979303cf6ede530f846d3a3d2cafdec03", + "url": "https://api.github.com/repos/phpcq/coding-standard/zipball/7e859419e15169e4dda1243e684eff0e1a7f4b29", + "reference": "7e859419e15169e4dda1243e684eff0e1a7f4b29", "shasum": "" }, "require": { - "php": ">=5.3" + "php": ">=5.3", + "squizlabs/php_codesniffer": "~2.0" }, "require-dev": { - "phpunit/phpunit": "~3.7", - "squizlabs/php_codesniffer": "~1.0" + "phpcq/all-tasks": "~1.1" }, "suggest": { "phpcq/phpcq": "The PHP code quality project core tasks." @@ -510,7 +566,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-develop": "1.x-dev" + "dev-develop": "2.x-dev" } }, "notification-url": "https://packagist.org/downloads/", @@ -533,7 +589,7 @@ ], "description": "PHP code quality project coding standard", "homepage": "http://phpcq.org/", - "time": "2015-01-11 22:02:20" + "time": "2015-08-12 22:32:56" }, { "name": "phpcq/phpcq", @@ -589,16 +645,16 @@ }, { "name": "phpcq/travis-configuration-check", - "version": "1.0.0", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/phpcq/travis-configuration-check.git", - "reference": "0290b7fa561bdc6ef34ed08f5e86c9aa8b4e5a14" + "reference": "969adf4c545204bae7b5e87b8f563720af1bb54b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpcq/travis-configuration-check/zipball/0290b7fa561bdc6ef34ed08f5e86c9aa8b4e5a14", - "reference": "0290b7fa561bdc6ef34ed08f5e86c9aa8b4e5a14", + "url": "https://api.github.com/repos/phpcq/travis-configuration-check/zipball/969adf4c545204bae7b5e87b8f563720af1bb54b", + "reference": "969adf4c545204bae7b5e87b8f563720af1bb54b", "shasum": "" }, "require": { @@ -607,12 +663,7 @@ "symfony/yaml": "~2.3" }, "require-dev": { - "pdepend/pdepend": "1.1.*", - "phpcq/branch-alias-validation": "~1.0", - "phpcq/coding-standard": "~1.0", - "phpcq/phpcq": "~1.0", - "phpunit/phpunit": ">=3.7.10,<4-dev", - "squizlabs/php_codesniffer": "*" + "phpcq/all-tasks": "~1.1" }, "bin": [ "bin/check-travis-configuration.php" @@ -620,7 +671,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-develop": "1.x-dev" + "dev-master": "1.1.x-dev", + "dev-develop": "1.2.x-dev" } }, "autoload": { @@ -647,20 +699,69 @@ } ], "description": "Validation tool to ensure that the contents of a .travis.yml make sense.", - "time": "2015-01-11 22:03:52" + "time": "2015-11-04 13:49:07" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "phpDocumentor": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "time": "2015-02-03 12:10:50" }, { "name": "phploc/phploc", - "version": "2.1.4", + "version": "2.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phploc.git", - "reference": "6cdf01336c06d20825831fe8cee70764fe373585" + "reference": "50e063abd41833b3a5d29a2e8fbef5859ac28bdc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phploc/zipball/6cdf01336c06d20825831fe8cee70764fe373585", - "reference": "6cdf01336c06d20825831fe8cee70764fe373585", + "url": "https://api.github.com/repos/sebastianbergmann/phploc/zipball/50e063abd41833b3a5d29a2e8fbef5859ac28bdc", + "reference": "50e063abd41833b3a5d29a2e8fbef5859ac28bdc", "shasum": "" }, "require": { @@ -700,32 +801,29 @@ ], "description": "A tool for quickly measuring the size of a PHP project.", "homepage": "https://github.com/sebastianbergmann/phploc", - "time": "2015-08-04 07:41:00" + "time": "2015-10-22 13:44:19" }, { "name": "phpmd/phpmd", - "version": "2.2.3", + "version": "2.3.2", "source": { "type": "git", "url": "https://github.com/phpmd/phpmd.git", - "reference": "5eeb5a4d39c8304910b33ae49f8813905346cc35" + "reference": "08b5bcd454a7148579b68931fc500d824afd3bb5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpmd/phpmd/zipball/5eeb5a4d39c8304910b33ae49f8813905346cc35", - "reference": "5eeb5a4d39c8304910b33ae49f8813905346cc35", + "url": "https://api.github.com/repos/phpmd/phpmd/zipball/08b5bcd454a7148579b68931fc500d824afd3bb5", + "reference": "08b5bcd454a7148579b68931fc500d824afd3bb5", "shasum": "" }, "require": { "pdepend/pdepend": "~2.0", - "php": ">=5.3.0", - "symfony/config": ">=2.4", - "symfony/dependency-injection": ">=2.4", - "symfony/filesystem": ">=2.4" + "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": "*", - "squizlabs/php_codesniffer": "*" + "phpunit/phpunit": "^4.0", + "squizlabs/php_codesniffer": "^2.0" }, "bin": [ "src/bin/phpmd" @@ -745,12 +843,18 @@ "name": "Manuel Pichler", "email": "github@manuel-pichler.de", "homepage": "https://github.com/manuelpichler", - "role": "Project founder" + "role": "Project Founder" }, { "name": "Other contributors", "homepage": "https://github.com/phpmd/phpmd/graphs/contributors", "role": "Contributors" + }, + { + "name": "Marc Würth", + "email": "ravage@bluewin.ch", + "homepage": "https://github.com/ravage84", + "role": "Project Maintainer" } ], "description": "PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD.", @@ -762,7 +866,7 @@ "phpmd", "pmd" ], - "time": "2015-05-27 18:16:57" + "time": "2015-09-24 14:37:49" }, { "name": "phpspec/php-diff", @@ -798,48 +902,109 @@ "description": "A comprehensive library for generating differences between two hashable objects (strings or arrays).", "time": "2013-11-01 13:02:21" }, + { + "name": "phpspec/prophecy", + "version": "v1.5.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7", + "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "phpdocumentor/reflection-docblock": "~2.0", + "sebastian/comparator": "~1.1" + }, + "require-dev": { + "phpspec/phpspec": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2015-08-13 10:07:40" + }, { "name": "phpunit/php-code-coverage", - "version": "1.2.18", + "version": "2.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "fe2466802556d3fe4e4d1d58ffd3ccfd0a19be0b" + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/fe2466802556d3fe4e4d1d58ffd3ccfd0a19be0b", - "reference": "fe2466802556d3fe4e4d1d58ffd3ccfd0a19be0b", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", "shasum": "" }, "require": { "php": ">=5.3.3", - "phpunit/php-file-iterator": ">=1.3.0@stable", - "phpunit/php-text-template": ">=1.2.0@stable", - "phpunit/php-token-stream": ">=1.1.3,<1.3.0" + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "^1.3.2", + "sebastian/version": "~1.0" }, "require-dev": { - "phpunit/phpunit": "3.7.*@dev" + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4" }, "suggest": { "ext-dom": "*", - "ext-xdebug": ">=2.0.5" + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "2.2.x-dev" } }, "autoload": { "classmap": [ - "PHP/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], @@ -857,7 +1022,7 @@ "testing", "xunit" ], - "time": "2014-09-02 10:13:14" + "time": "2015-10-06 15:47:00" }, { "name": "phpunit/php-file-iterator", @@ -990,45 +1155,44 @@ }, { "name": "phpunit/php-token-stream", - "version": "1.2.2", + "version": "1.4.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32" + "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/ad4e1e23ae01b483c16f600ff1bebec184588e32", - "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", "shasum": "" }, "require": { "ext-tokenizer": "*", "php": ">=5.3.3" }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.4-dev" } }, "autoload": { "classmap": [ - "PHP/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], "description": "Wrapper around PHP's tokenizer extension.", @@ -1036,62 +1200,61 @@ "keywords": [ "tokenizer" ], - "time": "2014-03-03 05:10:30" + "time": "2015-09-15 10:49:45" }, { "name": "phpunit/phpunit", - "version": "3.7.38", + "version": "4.8.19", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "38709dc22d519a3d1be46849868aa2ddf822bcf6" + "reference": "b2caaf8947aba5e002d42126723e9d69795f32b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/38709dc22d519a3d1be46849868aa2ddf822bcf6", - "reference": "38709dc22d519a3d1be46849868aa2ddf822bcf6", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b2caaf8947aba5e002d42126723e9d69795f32b4", + "reference": "b2caaf8947aba5e002d42126723e9d69795f32b4", "shasum": "" }, "require": { - "ext-ctype": "*", "ext-dom": "*", "ext-json": "*", "ext-pcre": "*", "ext-reflection": "*", "ext-spl": "*", "php": ">=5.3.3", - "phpunit/php-code-coverage": "~1.2", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.1", - "phpunit/php-timer": "~1.0", - "phpunit/phpunit-mock-objects": "~1.2", - "symfony/yaml": "~2.0" - }, - "require-dev": { - "pear-pear.php.net/pear": "1.9.4" + "phpspec/prophecy": "^1.3.1", + "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": "~2.3", + "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", + "symfony/yaml": "~2.1|~3.0" }, "suggest": { "phpunit/php-invoker": "~1.1" }, "bin": [ - "composer/bin/phpunit" + "phpunit" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "3.7.x-dev" + "dev-master": "4.8.x-dev" } }, "autoload": { "classmap": [ - "PHPUnit/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "", - "../../symfony/yaml/" - ], "license": [ "BSD-3-Clause" ], @@ -1103,45 +1266,52 @@ } ], "description": "The PHP Unit Testing framework.", - "homepage": "http://www.phpunit.de/", + "homepage": "https://phpunit.de/", "keywords": [ "phpunit", "testing", "xunit" ], - "time": "2014-10-17 09:04:17" + "time": "2015-11-30 08:18:59" }, { "name": "phpunit/phpunit-mock-objects", - "version": "1.2.3", + "version": "2.3.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "5794e3c5c5ba0fb037b11d8151add2a07fa82875" + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/5794e3c5c5ba0fb037b11d8151add2a07fa82875", - "reference": "5794e3c5c5ba0fb037b11d8151add2a07fa82875", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", "shasum": "" }, "require": { + "doctrine/instantiator": "^1.0.2", "php": ">=5.3.3", - "phpunit/php-text-template": ">=1.1.1@stable" + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" }, "suggest": { "ext-soap": "*" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3.x-dev" + } + }, "autoload": { "classmap": [ - "PHPUnit/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], @@ -1158,7 +1328,239 @@ "mock", "xunit" ], - "time": "2013-01-13 10:24:48" + "time": "2015-10-02 06:51:40" + }, + { + "name": "sebastian/comparator", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2015-07-26 15:48:44" + }, + { + "name": "sebastian/diff", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "2b0112e42c338afa9ad9dfeb94d66f6d84c2f828" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/2b0112e42c338afa9ad9dfeb94d66f6d84c2f828", + "reference": "2b0112e42c338afa9ad9dfeb94d66f6d84c2f828", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2015-12-06 07:21:36" + }, + { + "name": "sebastian/environment", + "version": "1.3.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "6e7133793a8e5a5714a551a8324337374be209df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e7133793a8e5a5714a551a8324337374be209df", + "reference": "6e7133793a8e5a5714a551a8324337374be209df", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.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 functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2015-12-02 08:37:27" + }, + { + "name": "sebastian/exporter", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "7ae5513327cb536431847bcc0c10edba2701064e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", + "reference": "7ae5513327cb536431847bcc0c10edba2701064e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2015-06-21 07:55:53" }, { "name": "sebastian/finder-facade", @@ -1244,6 +1646,57 @@ ], "time": "2015-04-06 16:23:43" }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2015-10-12 03:26:01" + }, { "name": "sebastian/phpcpd", "version": "1.4.3", @@ -1292,6 +1745,59 @@ "homepage": "https://github.com/sebastianbergmann/phpcpd", "time": "2013-07-30 14:37:42" }, + { + "name": "sebastian/recursion-context", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "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": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2015-11-11 19:50:13" + }, { "name": "sebastian/version", "version": "1.0.6", @@ -1329,32 +1835,31 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "1.5.6", + "version": "2.4.0", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "6f3e42d311b882b25b4d409d23a289f4d3b803d5" + "reference": "32a879f4f35019d78d568db2885d7779ca084a33" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6f3e42d311b882b25b4d409d23a289f4d3b803d5", - "reference": "6f3e42d311b882b25b4d409d23a289f4d3b803d5", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/32a879f4f35019d78d568db2885d7779ca084a33", + "reference": "32a879f4f35019d78d568db2885d7779ca084a33", "shasum": "" }, "require": { "ext-tokenizer": "*", + "ext-xmlwriter": "*", "php": ">=5.1.2" }, - "suggest": { - "phpunit/php-timer": "dev-master" - }, "bin": [ - "scripts/phpcs" + "scripts/phpcs", + "scripts/phpcbf" ], "type": "library", "extra": { "branch-alias": { - "dev-phpcs-fixer": "2.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1363,12 +1868,12 @@ "CodeSniffer/CLI.php", "CodeSniffer/Exception.php", "CodeSniffer/File.php", + "CodeSniffer/Fixer.php", "CodeSniffer/Report.php", "CodeSniffer/Reporting.php", "CodeSniffer/Sniff.php", "CodeSniffer/Tokens.php", "CodeSniffer/Reports/", - "CodeSniffer/CommentParser/", "CodeSniffer/Tokenizers/", "CodeSniffer/DocGenerators/", "CodeSniffer/Standards/AbstractPatternSniff.php", @@ -1394,45 +1899,45 @@ "role": "lead" } ], - "description": "PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", "homepage": "http://www.squizlabs.com/php-codesniffer", "keywords": [ "phpcs", "standards" ], - "time": "2014-12-04 22:32:15" + "time": "2015-11-23 21:30:59" }, { "name": "symfony/config", - "version": "v2.7.3", + "version": "v2.8.0", "source": { "type": "git", - "url": "https://github.com/symfony/Config.git", - "reference": "6c905bbed1e728226de656e4c07d620dfe9e80d9" + "url": "https://github.com/symfony/config.git", + "reference": "f21c97aec1b5302d2dc0d17047ea8f4e4ff93aae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Config/zipball/6c905bbed1e728226de656e4c07d620dfe9e80d9", - "reference": "6c905bbed1e728226de656e4c07d620dfe9e80d9", + "url": "https://api.github.com/repos/symfony/config/zipball/f21c97aec1b5302d2dc0d17047ea8f4e4ff93aae", + "reference": "f21c97aec1b5302d2dc0d17047ea8f4e4ff93aae", "shasum": "" }, "require": { "php": ">=5.3.9", - "symfony/filesystem": "~2.3" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "symfony/filesystem": "~2.3|~3.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Config\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1450,30 +1955,30 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2015-07-09 16:07:40" + "time": "2015-11-23 20:38:01" }, { "name": "symfony/console", - "version": "v2.7.3", + "version": "v2.8.0", "source": { "type": "git", - "url": "https://github.com/symfony/Console.git", - "reference": "d6cf02fe73634c96677e428f840704bfbcaec29e" + "url": "https://github.com/symfony/console.git", + "reference": "d232bfc100dfd32b18ccbcab4bcc8f28697b7e41" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/d6cf02fe73634c96677e428f840704bfbcaec29e", - "reference": "d6cf02fe73634c96677e428f840704bfbcaec29e", + "url": "https://api.github.com/repos/symfony/console/zipball/d232bfc100dfd32b18ccbcab4bcc8f28697b7e41", + "reference": "d232bfc100dfd32b18ccbcab4bcc8f28697b7e41", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.3.9", + "symfony/polyfill-mbstring": "~1.0" }, "require-dev": { "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1", - "symfony/phpunit-bridge": "~2.7", - "symfony/process": "~2.1" + "symfony/event-dispatcher": "~2.1|~3.0.0", + "symfony/process": "~2.1|~3.0.0" }, "suggest": { "psr/log": "For using the console logger", @@ -1483,13 +1988,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Console\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1507,20 +2015,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2015-07-28 15:18:12" + "time": "2015-11-30 12:35:10" }, { "name": "symfony/dependency-injection", - "version": "v2.7.3", + "version": "v2.8.0", "source": { "type": "git", - "url": "https://github.com/symfony/DependencyInjection.git", - "reference": "851e3ffe8a366b1590bdaf3df2c1395f2d27d8a6" + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "1ac8ce1a1cff7ff9467d44bc71b0f71dfa751ba4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/851e3ffe8a366b1590bdaf3df2c1395f2d27d8a6", - "reference": "851e3ffe8a366b1590bdaf3df2c1395f2d27d8a6", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/1ac8ce1a1cff7ff9467d44bc71b0f71dfa751ba4", + "reference": "1ac8ce1a1cff7ff9467d44bc71b0f71dfa751ba4", "shasum": "" }, "require": { @@ -1530,10 +2038,9 @@ "symfony/expression-language": "<2.6" }, "require-dev": { - "symfony/config": "~2.2", - "symfony/expression-language": "~2.6", - "symfony/phpunit-bridge": "~2.7", - "symfony/yaml": "~2.1" + "symfony/config": "~2.2|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/yaml": "~2.1|~3.0.0" }, "suggest": { "symfony/config": "", @@ -1543,13 +2050,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\DependencyInjection\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1567,38 +2077,38 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2015-07-28 14:07:07" + "time": "2015-11-30 06:56:28" }, { "name": "symfony/filesystem", - "version": "v2.7.3", + "version": "v2.8.0", "source": { "type": "git", - "url": "https://github.com/symfony/Filesystem.git", - "reference": "2d7b2ddaf3f548f4292df49a99d19c853d43f0b8" + "url": "https://github.com/symfony/filesystem.git", + "reference": "3e661a0d521ac67496515fa6e6704bd61bcfff60" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Filesystem/zipball/2d7b2ddaf3f548f4292df49a99d19c853d43f0b8", - "reference": "2d7b2ddaf3f548f4292df49a99d19c853d43f0b8", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/3e661a0d521ac67496515fa6e6704bd61bcfff60", + "reference": "3e661a0d521ac67496515fa6e6704bd61bcfff60", "shasum": "" }, "require": { "php": ">=5.3.9" }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Filesystem\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1616,38 +2126,38 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2015-07-09 16:07:40" + "time": "2015-11-23 10:19:46" }, { "name": "symfony/finder", - "version": "v2.7.3", + "version": "v2.8.0", "source": { "type": "git", - "url": "https://github.com/symfony/Finder.git", - "reference": "ae0f363277485094edc04c9f3cbe595b183b78e4" + "url": "https://github.com/symfony/finder.git", + "reference": "ead9b07af4ba77b6507bee697396a5c79e633f08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Finder/zipball/ae0f363277485094edc04c9f3cbe595b183b78e4", - "reference": "ae0f363277485094edc04c9f3cbe595b183b78e4", + "url": "https://api.github.com/repos/symfony/finder/zipball/ead9b07af4ba77b6507bee697396a5c79e633f08", + "reference": "ead9b07af4ba77b6507bee697396a5c79e633f08", "shasum": "" }, "require": { "php": ">=5.3.9" }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Finder\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1665,38 +2175,94 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2015-07-09 16:07:40" + "time": "2015-10-30 20:15:42" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "0b6a8940385311a24e060ec1fe35680e17c74497" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0b6a8940385311a24e060ec1fe35680e17c74497", + "reference": "0b6a8940385311a24e060ec1fe35680e17c74497", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2015-11-04 20:28:58" }, { "name": "symfony/yaml", - "version": "v2.7.3", + "version": "v2.8.0", "source": { "type": "git", - "url": "https://github.com/symfony/Yaml.git", - "reference": "71340e996171474a53f3d29111d046be4ad8a0ff" + "url": "https://github.com/symfony/yaml.git", + "reference": "f79824187de95064a2f5038904c4d7f0227fedb5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/71340e996171474a53f3d29111d046be4ad8a0ff", - "reference": "71340e996171474a53f3d29111d046be4ad8a0ff", + "url": "https://api.github.com/repos/symfony/yaml/zipball/f79824187de95064a2f5038904c4d7f0227fedb5", + "reference": "f79824187de95064a2f5038904c4d7f0227fedb5", "shasum": "" }, "require": { "php": ">=5.3.9" }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Yaml\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1714,7 +2280,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2015-07-28 14:07:07" + "time": "2015-11-30 12:35:10" }, { "name": "theseer/fdomdocument", From aad4f7dcadf4adbf270b347bea1be0134cb577d0 Mon Sep 17 00:00:00 2001 From: Christian Schiffler Date: Tue, 8 Dec 2015 00:06:00 +0100 Subject: [PATCH 03/48] Fix phpcq 1.1 issues --- .travis.yml | 9 +++++---- src/Command/AbstractCommandBuilder.php | 2 +- src/Command/AddCommandBuilder.php | 4 +++- src/Command/BranchCommandBuilder.php | 10 ++++++---- src/Command/CheckoutCommandBuilder.php | 4 +++- src/Command/CloneCommandBuilder.php | 4 +++- src/Command/CommandBuilderInterface.php | 3 ++- src/Command/CommitCommandBuilder.php | 4 +++- src/Command/DescribeCommandBuilder.php | 4 +++- src/Command/FetchCommandBuilder.php | 4 +++- src/Command/InitCommandBuilder.php | 2 +- src/Command/LogCommandBuilder.php | 3 ++- src/Command/LsRemoteCommandBuilder.php | 2 +- src/Command/MergeCommandBuilder.php | 3 ++- src/Command/PushCommandBuilder.php | 4 +++- src/Command/RemoteCommandBuilder.php | 4 +++- src/Command/ResetCommandBuilder.php | 2 +- src/Command/RevParseCommandBuilder.php | 4 +++- src/Command/RmCommandBuilder.php | 2 +- src/Command/ShortLogCommandBuilder.php | 2 +- src/Command/ShowCommandBuilder.php | 4 +++- src/Command/StatusCommandBuilder.php | 4 +++- src/Command/TagCommandBuilder.php | 4 +++- src/GitConfig.php | 2 +- src/GitException.php | 2 +- src/GitRepository.php | 4 +++- 26 files changed, 64 insertions(+), 32 deletions(-) diff --git a/.travis.yml b/.travis.yml index fb84704..79ff8dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,11 @@ language: php php: - - 5.3 - - 5.4 - - 5.5 - - 5.6 + - "5.3" + - "5.4" + - "5.5" + - "5.6" + - "7.0" sudo: false diff --git a/src/Command/AbstractCommandBuilder.php b/src/Command/AbstractCommandBuilder.php index 551af19..c09a74f 100644 --- a/src/Command/AbstractCommandBuilder.php +++ b/src/Command/AbstractCommandBuilder.php @@ -14,8 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ diff --git a/src/Command/AddCommandBuilder.php b/src/Command/AddCommandBuilder.php index b8138cb..9d7d651 100644 --- a/src/Command/AddCommandBuilder.php +++ b/src/Command/AddCommandBuilder.php @@ -14,8 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ @@ -23,6 +23,8 @@ /** * Add command builder. + * + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class AddCommandBuilder extends AbstractCommandBuilder { diff --git a/src/Command/BranchCommandBuilder.php b/src/Command/BranchCommandBuilder.php index bc5bbad..a922371 100644 --- a/src/Command/BranchCommandBuilder.php +++ b/src/Command/BranchCommandBuilder.php @@ -14,8 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ @@ -23,6 +23,8 @@ /** * Branch command builder. + * + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class BranchCommandBuilder extends AbstractCommandBuilder { @@ -96,9 +98,9 @@ public function move($oldName = false) * * @return BranchCommandBuilder * - * @see BranchCommandBuilder::WHEN_ALWAYS - * @see BranchCommandBuilder::WHEN_NEVER - * @see BranchCommandBuilder::WHEN_AUTO. + * @see BranchCommandBuilder::WHEN_ALWAYS + * @see BranchCommandBuilder::WHEN_NEVER + * @see BranchCommandBuilder::WHEN_AUTO. */ public function color($when) { diff --git a/src/Command/CheckoutCommandBuilder.php b/src/Command/CheckoutCommandBuilder.php index 26ee601..5318711 100644 --- a/src/Command/CheckoutCommandBuilder.php +++ b/src/Command/CheckoutCommandBuilder.php @@ -14,8 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ @@ -23,6 +23,8 @@ /** * Checkout command builder. + * + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CheckoutCommandBuilder extends AbstractCommandBuilder { diff --git a/src/Command/CloneCommandBuilder.php b/src/Command/CloneCommandBuilder.php index ae86205..e540f58 100644 --- a/src/Command/CloneCommandBuilder.php +++ b/src/Command/CloneCommandBuilder.php @@ -14,8 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ @@ -23,6 +23,8 @@ /** * Clone command builder. + * + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CloneCommandBuilder extends AbstractCommandBuilder { diff --git a/src/Command/CommandBuilderInterface.php b/src/Command/CommandBuilderInterface.php index 311a9a2..d16e47f 100644 --- a/src/Command/CommandBuilderInterface.php +++ b/src/Command/CommandBuilderInterface.php @@ -12,9 +12,10 @@ * * @package bit3/git-php * @author Tristan Lins + * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ diff --git a/src/Command/CommitCommandBuilder.php b/src/Command/CommitCommandBuilder.php index 833261f..7e92067 100644 --- a/src/Command/CommitCommandBuilder.php +++ b/src/Command/CommitCommandBuilder.php @@ -14,8 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ @@ -23,6 +23,8 @@ /** * Commit command builder. + * + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class CommitCommandBuilder extends AbstractCommandBuilder { diff --git a/src/Command/DescribeCommandBuilder.php b/src/Command/DescribeCommandBuilder.php index af5c2a4..d7fcbd2 100644 --- a/src/Command/DescribeCommandBuilder.php +++ b/src/Command/DescribeCommandBuilder.php @@ -14,8 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ @@ -23,6 +23,8 @@ /** * Describe command builder. + * + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class DescribeCommandBuilder extends AbstractCommandBuilder { diff --git a/src/Command/FetchCommandBuilder.php b/src/Command/FetchCommandBuilder.php index 313c924..7fa1c7d 100644 --- a/src/Command/FetchCommandBuilder.php +++ b/src/Command/FetchCommandBuilder.php @@ -14,8 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ @@ -23,6 +23,8 @@ /** * Fetch command builder. + * + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class FetchCommandBuilder extends AbstractCommandBuilder { diff --git a/src/Command/InitCommandBuilder.php b/src/Command/InitCommandBuilder.php index 5d42727..4a32fd2 100644 --- a/src/Command/InitCommandBuilder.php +++ b/src/Command/InitCommandBuilder.php @@ -14,8 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ diff --git a/src/Command/LogCommandBuilder.php b/src/Command/LogCommandBuilder.php index ef2d457..78e9846 100644 --- a/src/Command/LogCommandBuilder.php +++ b/src/Command/LogCommandBuilder.php @@ -14,8 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ @@ -27,6 +27,7 @@ * @SuppressWarnings(PHPMD.ExcessiveClassLength) * @SuppressWarnings(PHPMD.ExcessivePublicCount) * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class LogCommandBuilder extends AbstractCommandBuilder { diff --git a/src/Command/LsRemoteCommandBuilder.php b/src/Command/LsRemoteCommandBuilder.php index 37c00d3..5304d37 100644 --- a/src/Command/LsRemoteCommandBuilder.php +++ b/src/Command/LsRemoteCommandBuilder.php @@ -14,8 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ diff --git a/src/Command/MergeCommandBuilder.php b/src/Command/MergeCommandBuilder.php index 1be80bd..3897ef2 100644 --- a/src/Command/MergeCommandBuilder.php +++ b/src/Command/MergeCommandBuilder.php @@ -12,9 +12,10 @@ * * @package bit3/git-php * @author Aaron Rubin + * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ diff --git a/src/Command/PushCommandBuilder.php b/src/Command/PushCommandBuilder.php index 4cc9a44..c0f8699 100644 --- a/src/Command/PushCommandBuilder.php +++ b/src/Command/PushCommandBuilder.php @@ -14,8 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ @@ -23,6 +23,8 @@ /** * Push command builder. + * + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class PushCommandBuilder extends AbstractCommandBuilder { diff --git a/src/Command/RemoteCommandBuilder.php b/src/Command/RemoteCommandBuilder.php index 121a453..0ae3fe3 100644 --- a/src/Command/RemoteCommandBuilder.php +++ b/src/Command/RemoteCommandBuilder.php @@ -14,8 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ @@ -23,6 +23,8 @@ /** * Remote command builder. + * + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class RemoteCommandBuilder extends AbstractCommandBuilder { diff --git a/src/Command/ResetCommandBuilder.php b/src/Command/ResetCommandBuilder.php index 28a3f31..367bb79 100644 --- a/src/Command/ResetCommandBuilder.php +++ b/src/Command/ResetCommandBuilder.php @@ -14,8 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ diff --git a/src/Command/RevParseCommandBuilder.php b/src/Command/RevParseCommandBuilder.php index 3cbe80e..b65850d 100644 --- a/src/Command/RevParseCommandBuilder.php +++ b/src/Command/RevParseCommandBuilder.php @@ -14,8 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ @@ -23,6 +23,8 @@ /** * Rev-parse command builder. + * + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class RevParseCommandBuilder extends AbstractCommandBuilder { diff --git a/src/Command/RmCommandBuilder.php b/src/Command/RmCommandBuilder.php index 3559608..04d67b4 100644 --- a/src/Command/RmCommandBuilder.php +++ b/src/Command/RmCommandBuilder.php @@ -14,8 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ diff --git a/src/Command/ShortLogCommandBuilder.php b/src/Command/ShortLogCommandBuilder.php index 80aaa05..b183572 100644 --- a/src/Command/ShortLogCommandBuilder.php +++ b/src/Command/ShortLogCommandBuilder.php @@ -15,8 +15,8 @@ * @author Christian Schiffler * @author Tristan Lins * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ diff --git a/src/Command/ShowCommandBuilder.php b/src/Command/ShowCommandBuilder.php index c896c7c..6bed92e 100644 --- a/src/Command/ShowCommandBuilder.php +++ b/src/Command/ShowCommandBuilder.php @@ -14,8 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ @@ -23,6 +23,8 @@ /** * Show command builder. + * + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ShowCommandBuilder extends AbstractCommandBuilder { diff --git a/src/Command/StatusCommandBuilder.php b/src/Command/StatusCommandBuilder.php index f954879..c455066 100644 --- a/src/Command/StatusCommandBuilder.php +++ b/src/Command/StatusCommandBuilder.php @@ -14,8 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ @@ -23,6 +23,8 @@ /** * Status command builder. + * + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class StatusCommandBuilder extends AbstractCommandBuilder { diff --git a/src/Command/TagCommandBuilder.php b/src/Command/TagCommandBuilder.php index 26e2bad..6fa183d 100644 --- a/src/Command/TagCommandBuilder.php +++ b/src/Command/TagCommandBuilder.php @@ -14,8 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ @@ -23,6 +23,8 @@ /** * Tag command builder. + * + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class TagCommandBuilder extends AbstractCommandBuilder { diff --git a/src/GitConfig.php b/src/GitConfig.php index 8d87916..4741e15 100644 --- a/src/GitConfig.php +++ b/src/GitConfig.php @@ -14,8 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ diff --git a/src/GitException.php b/src/GitException.php index adb83a1..0b95986 100644 --- a/src/GitException.php +++ b/src/GitException.php @@ -14,8 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ diff --git a/src/GitRepository.php b/src/GitRepository.php index fcd235f..790a68e 100644 --- a/src/GitRepository.php +++ b/src/GitRepository.php @@ -16,8 +16,8 @@ * @author David Molineus * @author Aaron Rubin * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ @@ -46,6 +46,8 @@ /** * GIT repository adapter. + * + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class GitRepository { From c00ef4799c85adcc7ff2f3c101354f63b4a5e3a9 Mon Sep 17 00:00:00 2001 From: Christian Schiffler Date: Tue, 8 Dec 2015 00:26:10 +0100 Subject: [PATCH 04/48] Fix code style. --- src/Command/ConfigCommandBuilder.php | 82 ++++++++++++++++------------ src/GitRepository.php | 1 + tests/GitRepositoryTest.php | 4 +- 3 files changed, 50 insertions(+), 37 deletions(-) diff --git a/src/Command/ConfigCommandBuilder.php b/src/Command/ConfigCommandBuilder.php index 869f15d..7d4fcbe 100644 --- a/src/Command/ConfigCommandBuilder.php +++ b/src/Command/ConfigCommandBuilder.php @@ -11,11 +11,11 @@ * This project is provided in good faith and hope to be usable by anyone. * * @package bit3/git-php - * @author Tristan Lins + * @author Matthew Gamble * @author Christian Schiffler * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ @@ -23,6 +23,8 @@ /** * Config command builder. + * + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class ConfigCommandBuilder extends AbstractCommandBuilder { @@ -38,7 +40,7 @@ protected function initializeProcessBuilder() * Specify a single config file that should be looked at. * Has special support for the global, system and local flags. * - * @param string $file + * @param string $file The config file to use. * * @return ConfigCommandBuilder */ @@ -56,7 +58,9 @@ public function file($file) /** * Add the blob option to the command line. * - * @param string $blobId + * See "SPECIFYING REVISIONS" section in gitrevisions(7) for a list of ways to spell blob names. + * + * @param string $blobId The blob id to use. * * @return ConfigCommandBuilder */ @@ -69,16 +73,18 @@ public function blob($blobId) /** * Add a type option to the command line. * - * @param string $type + * @param string $type The type name. * * @return ConfigCommandBuilder + * + * @throws \InvalidArgumentException When an invalid type name is encountered. */ public function type($type) { if (in_array($type, array('bool', 'int', 'bool-or-int', 'path'))) { $this->processBuilder->add('--' . $type); } else { - throw new GitException('Invalid configuration type supplied.'); + throw new \InvalidArgumentException('Invalid configuration type supplied.'); } return $this; } @@ -86,9 +92,9 @@ public function type($type) /** * Add the add option and associated parameters to the command line. * - * @param string $name + * @param string $name The config value name. * - * @param string $value + * @param string $value The value to use. * * @return ConfigCommandBuilder */ @@ -103,11 +109,11 @@ public function add($name, $value) /** * Add the replace-all option and associated parameters to the command line. * - * @param string $name + * @param string $name The config value name. * - * @param string $value + * @param string $value The value to use. * - * @param null|string $valueRegex + * @param null|string $valueRegex The value regex to use. * * @return ConfigCommandBuilder */ @@ -136,9 +142,9 @@ public function terminateWithNUL() /** * Add the get option and associated parameters to the command line. * - * @param string $name + * @param string $name The config value name. * - * @param null|string $valueRegex + * @param null|string $valueRegex The value regex to use. * * @return ConfigCommandBuilder */ @@ -152,9 +158,9 @@ public function get($name, $valueRegex = null) /** * Add the get-all option and associated parameters to the command line. * - * @param string $name + * @param string $name The config value name. * - * @param null|string $valueRegex + * @param null|string $valueRegex The value regex to use. * * @return ConfigCommandBuilder */ @@ -168,9 +174,9 @@ public function getAll($name, $valueRegex = null) /** * Add the get-regexp option and associated parameters to the command line. * - * @param string $nameRegex + * @param string $nameRegex The config name regex. * - * @param null|string $valueRegex + * @param null|string $valueRegex The value regex to use. * * @return ConfigCommandBuilder */ @@ -184,9 +190,9 @@ public function getRegexp($nameRegex, $valueRegex = null) /** * Add the get-urlmatch option and associated parameters to the command line. * - * @param string $name + * @param string $name The config name. * - * @param string $url + * @param string $url The url to match. * * @return ConfigCommandBuilder */ @@ -200,9 +206,9 @@ public function getUrlmatch($name, $url) /** * Add the unset option and associated parameters to the command line. * - * @param string $name + * @param string $name The name of the config value to unset. * - * @param null|string $valueRegex + * @param null|string $valueRegex The value regex to use. * * @return ConfigCommandBuilder */ @@ -216,9 +222,9 @@ public function unsetOpt($name, $valueRegex = null) /** * Add the unset-all option and associated parameters to the command line. * - * @param string $name + * @param string $name The name of the config value to unset. * - * @param null|string $valueRegex + * @param null|string $valueRegex The value regex to use. * * @return ConfigCommandBuilder */ @@ -230,9 +236,13 @@ public function unsetAll($name, $valueRegex = null) } /** - * @param string $name + * Add the passed name and the passed pattern if not null. + * + * @param string $name The name to add. + * + * @param null|string $pattern The pattern to add (if not null). * - * @param null|string $pattern + * @return void */ private function addNameAndPattern($name, $pattern) { @@ -245,9 +255,9 @@ private function addNameAndPattern($name, $pattern) /** * Add the rename-section option and associated parameters to the command line. * - * @param string $oldName + * @param string $oldName The old section name. * - * @param string $newName + * @param string $newName The new section name. * * @return ConfigCommandBuilder */ @@ -262,7 +272,7 @@ public function renameSection($oldName, $newName) /** * Add the remove-section option to the command line. * - * @param string $name + * @param string $name The section name. * * @return ConfigCommandBuilder */ @@ -287,9 +297,9 @@ public function listOpt() /** * Add the get-color option and associated parameters to the command line. * - * @param string $name + * @param string $name The name of the color to retrieve. * - * @param null|string $default + * @param null|string $default The default value to return. * * @return ConfigCommandBuilder */ @@ -306,9 +316,9 @@ public function getColor($name, $default = null) /** * Add the get-colorbool option and associated parameters to the command line. * - * @param string $name + * @param string $name The name of the color to check. * - * @param bool|null $stdoutIsTty + * @param bool|null $stdoutIsTty Flag if stdout is a tty. * * @return ConfigCommandBuilder */ @@ -325,7 +335,7 @@ public function getColorBool($name, $stdoutIsTty = null) /** * Add the includes or no-includes option to the command line. * - * @param bool $allow + * @param bool $allow Flag if include.* directives in config files shall be respected when looking up values. * * @return ConfigCommandBuilder */ @@ -338,11 +348,11 @@ public function includes($allow = true) /** * Build the command and execute it. * - * @param null|string $name Pass name of setting here to perform a basic get or set operation + * @param null|string $name Pass name of setting here to perform a basic get or set operation. * - * @param null|string $value Pass a value for the setting to turn this into a set command + * @param null|string $value Pass a value for the setting to turn this into a set command. * - * @param null|string $valueRegex Pass a regex to limit changing of a multi-value setting to certain settings + * @param null|string $valueRegex Pass a regex to limit changing of a multi-value setting to certain settings. * * @return mixed * diff --git a/src/GitRepository.php b/src/GitRepository.php index 2765608..02dd137 100644 --- a/src/GitRepository.php +++ b/src/GitRepository.php @@ -15,6 +15,7 @@ * @author Christian Schiffler * @author David Molineus * @author Aaron Rubin + * @author Matthew Gamble * @copyright 2014 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php diff --git a/tests/GitRepositoryTest.php b/tests/GitRepositoryTest.php index 8bd1b6e..52fb1ca 100644 --- a/tests/GitRepositoryTest.php +++ b/tests/GitRepositoryTest.php @@ -12,9 +12,11 @@ * * @package bit3/git-php * @author Tristan Lins + * @author Christian Schiffler + * @author Matthew Gamble * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php * @filesource */ From 163db8433b7ff7c9594e15f8af92a9d3c8dfab2e Mon Sep 17 00:00:00 2001 From: Radek Crlik Date: Tue, 28 Jun 2016 09:32:57 +0200 Subject: [PATCH 05/48] Fix revParse --abbrev-ref option --- src/Command/RevParseCommandBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Command/RevParseCommandBuilder.php b/src/Command/RevParseCommandBuilder.php index 3cbe80e..f16ed6a 100644 --- a/src/Command/RevParseCommandBuilder.php +++ b/src/Command/RevParseCommandBuilder.php @@ -218,7 +218,7 @@ public function not() */ public function abbrevRef($abbrev = null) { - $this->processBuilder->add('--abbref-ref' . ($abbrev ? '=' . $abbrev : '')); + $this->processBuilder->add('--abbrev-ref' . ($abbrev ? '=' . $abbrev : '')); return $this; } From 81cb09ba91562780f01dc1ca483edf05fcfcaf42 Mon Sep 17 00:00:00 2001 From: Christian Schiffler Date: Thu, 7 Jul 2016 17:15:11 +0200 Subject: [PATCH 06/48] Remove obsolete no-op-logger --- composer.json | 1 - src/GitConfig.php | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 75f09dd..84b170c 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,6 @@ "license": "MIT", "require": { "php": ">=5.3", - "bit3/no-op-logger": "~1.0", "symfony/process": "~2.3" }, "require-dev": { diff --git a/src/GitConfig.php b/src/GitConfig.php index 4741e15..23709fb 100644 --- a/src/GitConfig.php +++ b/src/GitConfig.php @@ -21,8 +21,8 @@ namespace Bit3\GitPhp; -use Bit3\NoOpLogger\NoOpLogger; use Psr\Log\LoggerInterface; +use Psr\Log\NullLogger; /** * Shareable configuration for git repositories. @@ -62,7 +62,7 @@ class GitConfig */ public function __construct() { - $this->logger = new NoOpLogger(); + $this->logger = new NullLogger(); } /** From a3dec3857bfd74ef697f7affa5297f628b50467e Mon Sep 17 00:00:00 2001 From: Christian Schiffler Date: Thu, 7 Jul 2016 17:27:02 +0200 Subject: [PATCH 07/48] Fix author validation --- src/Command/RevParseCommandBuilder.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Command/RevParseCommandBuilder.php b/src/Command/RevParseCommandBuilder.php index 250acd0..15a43b9 100644 --- a/src/Command/RevParseCommandBuilder.php +++ b/src/Command/RevParseCommandBuilder.php @@ -13,6 +13,7 @@ * @package bit3/git-php * @author Tristan Lins * @author Christian Schiffler + * @author Radek Crlik * @copyright 2014 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php From fd76d4d1b74174baa0ffd924abb3a1e1924deda2 Mon Sep 17 00:00:00 2001 From: Christian Schiffler Date: Thu, 7 Jul 2016 17:31:14 +0200 Subject: [PATCH 08/48] Replace deprecated strict option of phpunit --- phpunit.xml.dist | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index d648aef..0d52510 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -7,10 +7,12 @@ convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" - strict="true"> + reportUselessTests="true" + strictCoverage="true" + disallowTestOutput="true"> ./tests/ - \ No newline at end of file + From 1fe32341265b3defa2cb002ea3750ca3231fceb0 Mon Sep 17 00:00:00 2001 From: Christian Schiffler Date: Thu, 7 Jul 2016 17:31:53 +0200 Subject: [PATCH 09/48] Bump symfony dependencies --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 84b170c..3bce74c 100644 --- a/composer.json +++ b/composer.json @@ -4,11 +4,11 @@ "license": "MIT", "require": { "php": ">=5.3", - "symfony/process": "~2.3" + "symfony/process": "~2.3 | ~3.0" }, "require-dev": { "monolog/monolog": "~1.0", - "symfony/filesystem": "~2.3", + "symfony/filesystem": "~2.3 | ~3.0", "phpcq/all-tasks": "~1.1" }, "autoload": { From f4870a3f1b64a28ddbce425e45086c3dda88dd72 Mon Sep 17 00:00:00 2001 From: Christian Schiffler Date: Thu, 7 Jul 2016 17:32:36 +0200 Subject: [PATCH 10/48] Require psr/log instead of whole (unused) monolog --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3bce74c..abed052 100644 --- a/composer.json +++ b/composer.json @@ -4,10 +4,10 @@ "license": "MIT", "require": { "php": ">=5.3", + "psr/log": "~1.0", "symfony/process": "~2.3 | ~3.0" }, "require-dev": { - "monolog/monolog": "~1.0", "symfony/filesystem": "~2.3 | ~3.0", "phpcq/all-tasks": "~1.1" }, From 532ffb195251df15a48eb217ef774b24523a7db6 Mon Sep 17 00:00:00 2001 From: Christian Schiffler Date: Thu, 7 Jul 2016 17:34:53 +0200 Subject: [PATCH 11/48] Bump branch alias --- composer.json | 4 +- composer.lock | 811 +++++++++++++++++++++++++++++++------------------- 2 files changed, 499 insertions(+), 316 deletions(-) diff --git a/composer.json b/composer.json index abed052..754ab7f 100644 --- a/composer.json +++ b/composer.json @@ -21,8 +21,8 @@ "prefer-stable": true, "extra": { "branch-alias": { - "dev-master": "1.2.x-dev", - "dev-develop": "1.3.x-dev" + "dev-master": "1.3.x-dev", + "dev-develop": "1.4.x-dev" } } } diff --git a/composer.lock b/composer.lock index bb9ecee..c37c1a5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,52 +4,9 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "39b357e55ce5a7e9b356ae0c6a8ea9bb", - "content-hash": "7d78fbf8b3d2681894d393df3336ede0", + "hash": "5f48dd10389e0af4c28502fb8e6eaba4", + "content-hash": "4103c14b9f56525c63ec9e8993beefb0", "packages": [ - { - "name": "bit3/no-op-logger", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/bit3/no-op-logger.git", - "reference": "e659e85674a1d584a937e5d113c49083e4a2933b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/bit3/no-op-logger/zipball/e659e85674a1d584a937e5d113c49083e4a2933b", - "reference": "e659e85674a1d584a937e5d113c49083e4a2933b", - "shasum": "" - }, - "require": { - "psr/log": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Bit3\\NoOpLogger\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Tristan Lins", - "email": "tristan@lins.io", - "homepage": "https://tristan.lins.io", - "role": "Developer" - } - ], - "description": "A no-operation PSR-3 logger.", - "time": "2014-12-29 15:01:01" - }, { "name": "psr/log", "version": "1.0.0", @@ -90,25 +47,25 @@ }, { "name": "symfony/process", - "version": "v2.8.0", + "version": "v3.1.2", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "1b988a88e3551102f3c2d9e1d47a18c3a78d6312" + "reference": "5c11a1a4d4016662eeaf0f8757958c7de069f9a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/1b988a88e3551102f3c2d9e1d47a18c3a78d6312", - "reference": "1b988a88e3551102f3c2d9e1d47a18c3a78d6312", + "url": "https://api.github.com/repos/symfony/process/zipball/5c11a1a4d4016662eeaf0f8757958c7de069f9a0", + "reference": "5c11a1a4d4016662eeaf0f8757958c7de069f9a0", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.5.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -135,7 +92,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2015-11-30 12:35:10" + "time": "2016-06-29 05:42:25" } ], "packages-dev": [ @@ -193,105 +150,28 @@ ], "time": "2015-06-14 21:17:01" }, - { - "name": "monolog/monolog", - "version": "1.17.2", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "bee7f0dc9c3e0b69a6039697533dca1e845c8c24" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bee7f0dc9c3e0b69a6039697533dca1e845c8c24", - "reference": "bee7f0dc9c3e0b69a6039697533dca1e845c8c24", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "psr/log": "~1.0" - }, - "provide": { - "psr/log-implementation": "1.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^2.4.9", - "doctrine/couchdb": "~1.0@dev", - "graylog2/gelf-php": "~1.0", - "jakub-onderka/php-parallel-lint": "0.9", - "php-console/php-console": "^3.1.3", - "phpunit/phpunit": "~4.5", - "phpunit/phpunit-mock-objects": "2.3.0", - "raven/raven": "^0.13", - "ruflin/elastica": ">=0.90 <3.0", - "swiftmailer/swiftmailer": "~5.3", - "videlalvaro/php-amqplib": "~2.4" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongo": "Allow sending log messages to a MongoDB server", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "php-console/php-console": "Allow sending log messages to Google Chrome", - "raven/raven": "Allow sending log messages to a Sentry server", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "videlalvaro/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.16.x-dev" - } - }, - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "http://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "time": "2015-10-14 12:51:02" - }, { "name": "pdepend/pdepend", - "version": "2.2.2", + "version": "2.2.4", "source": { "type": "git", "url": "https://github.com/pdepend/pdepend.git", - "reference": "d3ae0d084d526cdc6c3f1b858fb7148de77b41c5" + "reference": "b086687f3a01dc6bb92d633aef071d2c5dd0db06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pdepend/pdepend/zipball/d3ae0d084d526cdc6c3f1b858fb7148de77b41c5", - "reference": "d3ae0d084d526cdc6c3f1b858fb7148de77b41c5", + "url": "https://api.github.com/repos/pdepend/pdepend/zipball/b086687f3a01dc6bb92d633aef071d2c5dd0db06", + "reference": "b086687f3a01dc6bb92d633aef071d2c5dd0db06", "shasum": "" }, "require": { "php": ">=5.3.7", - "symfony/config": "^2.3.0", - "symfony/dependency-injection": "^2.3.0", - "symfony/filesystem": "^2.3.0" + "symfony/config": "^2.3.0|^3", + "symfony/dependency-injection": "^2.3.0|^3", + "symfony/filesystem": "^2.3.0|^3" }, "require-dev": { - "phpunit/phpunit": "^4.0.0,<4.8", + "phpunit/phpunit": "^4.4.0,<4.8", "squizlabs/php_codesniffer": "^2.0.0" }, "bin": [ @@ -299,8 +179,8 @@ ], "type": "library", "autoload": { - "psr-0": { - "PDepend\\": "src/main/php/" + "psr-4": { + "PDepend\\": "src/main/php/PDepend" } }, "notification-url": "https://packagist.org/downloads/", @@ -308,40 +188,41 @@ "BSD-3-Clause" ], "description": "Official version of pdepend to be handled with Composer", - "time": "2015-10-16 08:49:58" + "time": "2016-03-10 15:15:04" }, { "name": "phpcq/all-tasks", - "version": "dev-develop", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/phpcq/all-tasks.git", - "reference": "4a520d67c4c21e8f2f5dbaabe2790516b011cf0c" + "reference": "a950be485150f75f041cc24c7373dfe609a2d022" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpcq/all-tasks/zipball/4a520d67c4c21e8f2f5dbaabe2790516b011cf0c", - "reference": "4a520d67c4c21e8f2f5dbaabe2790516b011cf0c", + "url": "https://api.github.com/repos/phpcq/all-tasks/zipball/a950be485150f75f041cc24c7373dfe609a2d022", + "reference": "a950be485150f75f041cc24c7373dfe609a2d022", "shasum": "" }, "require": { "pdepend/pdepend": "~2.1", "phpcq/author-validation": "~1.1", - "phpcq/autoload-validation": "~1.0", - "phpcq/branch-alias-validation": "~1.0", + "phpcq/autoload-validation": "~1.1", + "phpcq/branch-alias-validation": "~1.1", "phpcq/coding-standard": "~2.0", - "phpcq/phpcq": "~1.0", - "phpcq/travis-configuration-check": "~1.0", + "phpcq/phpcq": "~1.1", + "phpcq/travis-configuration-check": "~1.1", "phploc/phploc": "~2.1", "phpmd/phpmd": "~2.2", + "phpspec/phpspec": "~2.0", "phpunit/phpunit": "~4.7", "sebastian/phpcpd": "~1.4" }, "type": "metapackage", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev", - "dev-develop": "1.1.x-dev" + "dev-master": "1.1.x-dev", + "dev-develop": "1.2.x-dev" } }, "notification-url": "https://packagist.org/downloads/", @@ -363,20 +244,20 @@ } ], "description": "Meta package to enable all tasks of the PHP code quality project", - "time": "2015-08-05 19:25:13" + "time": "2016-05-03 21:02:59" }, { "name": "phpcq/author-validation", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/phpcq/author-validation.git", - "reference": "c0847ed86df5b86a04be4494f785f691039c64e2" + "reference": "378749eae10d8ce1f7ccd608022e56d75cd810e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpcq/author-validation/zipball/c0847ed86df5b86a04be4494f785f691039c64e2", - "reference": "c0847ed86df5b86a04be4494f785f691039c64e2", + "url": "https://api.github.com/repos/phpcq/author-validation/zipball/378749eae10d8ce1f7ccd608022e56d75cd810e7", + "reference": "378749eae10d8ce1f7ccd608022e56d75cd810e7", "shasum": "" }, "require": { @@ -387,8 +268,8 @@ "symfony/finder": "~2.3" }, "require-dev": { - "phpcq/all-tasks": "~1.0", - "phpcq/coding-standard": "~1.0" + "phpcq/all-tasks": "~1.1", + "phpcq/coding-standard": "~2.0" }, "bin": [ "bin/check-author.php" @@ -423,29 +304,30 @@ } ], "description": "Check if all authors of a particular file are mentioned in the copyright header.", - "time": "2015-08-01 01:09:23" + "time": "2016-02-10 23:47:16" }, { "name": "phpcq/autoload-validation", - "version": "1.0.4", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/phpcq/autoload-validation.git", - "reference": "f51feaae9d81e0fef72b812113b68ac256eea18e" + "reference": "e373f53c99a2b818ae2820b535c9f3130e35de0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpcq/autoload-validation/zipball/f51feaae9d81e0fef72b812113b68ac256eea18e", - "reference": "f51feaae9d81e0fef72b812113b68ac256eea18e", + "url": "https://api.github.com/repos/phpcq/autoload-validation/zipball/e373f53c99a2b818ae2820b535c9f3130e35de0c", + "reference": "e373f53c99a2b818ae2820b535c9f3130e35de0c", "shasum": "" }, "require": { "php": ">=5.3.4", - "symfony/console": "~2.3" + "psr/log": "~1.0", + "symfony/console": "~2.3 | ~3.0", + "symfony/finder": "~2.3 | ~3.0" }, "require-dev": { - "phpcq/all-tasks": "~1.0", - "phpcq/coding-standard": "~1.0" + "phpcq/all-tasks": "~1.1" }, "bin": [ "bin/check-autoloading.php" @@ -453,7 +335,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-develop": "1.x-dev" + "dev-master": "1.1.x-dev", + "dev-develop": "1.2.x-dev" } }, "autoload": { @@ -480,20 +363,20 @@ } ], "description": "Check that the contents of the composer.json autoload keys are correct.", - "time": "2015-08-06 06:11:42" + "time": "2016-05-03 21:13:33" }, { "name": "phpcq/branch-alias-validation", - "version": "1.0.0", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/phpcq/branch-alias-validation.git", - "reference": "f6a9cfdf65d7021acceaf05b646d9ab6247668b6" + "reference": "3fec03bbb16c67c986029fd5804ab1c9849a893c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpcq/branch-alias-validation/zipball/f6a9cfdf65d7021acceaf05b646d9ab6247668b6", - "reference": "f6a9cfdf65d7021acceaf05b646d9ab6247668b6", + "url": "https://api.github.com/repos/phpcq/branch-alias-validation/zipball/3fec03bbb16c67c986029fd5804ab1c9849a893c", + "reference": "3fec03bbb16c67c986029fd5804ab1c9849a893c", "shasum": "" }, "require": { @@ -502,7 +385,7 @@ "symfony/console": "~2.3" }, "require-dev": { - "phpcq/all-tasks": "~1.0" + "phpcq/all-tasks": "~1.1" }, "bin": [ "bin/validate-branch-alias.php" @@ -510,7 +393,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-develop": "1.x-dev" + "dev-master": "1.1.x-dev", + "dev-develop": "1.2.x-dev" } }, "autoload": { @@ -537,20 +421,20 @@ } ], "description": "Validation tool to ensure that all branches are ahead of the most recent tag.", - "time": "2015-01-11 22:01:58" + "time": "2016-05-03 18:20:18" }, { "name": "phpcq/coding-standard", - "version": "dev-develop", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/phpcq/coding-standard.git", - "reference": "7e859419e15169e4dda1243e684eff0e1a7f4b29" + "reference": "b4185f462f4b4f7eb16306d3fee48630aba89b18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpcq/coding-standard/zipball/7e859419e15169e4dda1243e684eff0e1a7f4b29", - "reference": "7e859419e15169e4dda1243e684eff0e1a7f4b29", + "url": "https://api.github.com/repos/phpcq/coding-standard/zipball/b4185f462f4b4f7eb16306d3fee48630aba89b18", + "reference": "b4185f462f4b4f7eb16306d3fee48630aba89b18", "shasum": "" }, "require": { @@ -566,7 +450,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-develop": "2.x-dev" + "dev-master": "2.x-dev" } }, "notification-url": "https://packagist.org/downloads/", @@ -589,32 +473,33 @@ ], "description": "PHP code quality project coding standard", "homepage": "http://phpcq.org/", - "time": "2015-08-12 22:32:56" + "time": "2016-02-26 00:11:29" }, { "name": "phpcq/phpcq", - "version": "1.0.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/phpcq/phpcq.git", - "reference": "8d5c82e0defaea1b790b352db8205a0396d30bec" + "reference": "b82c658fc92ff453dcdf1b20bd251ff19232b327" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpcq/phpcq/zipball/8d5c82e0defaea1b790b352db8205a0396d30bec", - "reference": "8d5c82e0defaea1b790b352db8205a0396d30bec", + "url": "https://api.github.com/repos/phpcq/phpcq/zipball/b82c658fc92ff453dcdf1b20bd251ff19232b327", + "reference": "b82c658fc92ff453dcdf1b20bd251ff19232b327", "shasum": "" }, "suggest": { "pdepend/pdepend": "Enable the pdepend task (suggested version: ~2.0)", - "phpcq/author-validation": "Enable the author-validation task (suggested version: ~1.0)", - "phpcq/branch-alias-validation": "Enable the branch-alias-validation task (suggested version: ~1.0)", - "phpcq/travis-configuration-check": "Enable the travis-configuration-check task (suggested version: ~1.0)", + "phpcq/author-validation": "Enable the author-validation task (suggested version: ~1.1)", + "phpcq/branch-alias-validation": "Enable the branch-alias-validation task (suggested version: ~1.1)", + "phpcq/travis-configuration-check": "Enable the travis-configuration-check task (suggested version: ~1.1)", "phploc/phploc": "Enable the phploc task (suggested version: ~2.0)", "phpmd/phpmd": "Enable the phpmd task (suggested version: ~2.0)", - "phpunit/phpunit": "Enable the phpunit task (suggested version: ~3.7).", + "phpspec/phpspec": "Enable the phpspec task (suggested version: ~2.0)", + "phpunit/phpunit": "Enable the phpunit task (suggested version: ~4.7).", "sebastian/phpcpd": "Enable the phpcpd task (suggested version: ~1.4).", - "squizlabs/php_codesniffer": "Enable the phpcs task (suggested version: ~1.0)" + "squizlabs/php_codesniffer": "Enable the phpcs task (suggested version: ~2.0)" }, "type": "library", "extra": { @@ -641,7 +526,7 @@ } ], "description": "PHP code quality project.", - "time": "2015-01-11 22:03:34" + "time": "2016-05-03 20:49:52" }, { "name": "phpcq/travis-configuration-check", @@ -701,39 +586,136 @@ "description": "Validation tool to ensure that the contents of a .travis.yml make sense.", "time": "2015-11-04 13:49:07" }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2015-12-27 11:43:31" + }, { "name": "phpdocumentor/reflection-docblock", - "version": "2.0.4", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + "reference": "9270140b940ff02e58ec577c237274e92cd40cdd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd", + "reference": "9270140b940ff02e58ec577c237274e92cd40cdd", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0@dev", + "phpdocumentor/type-resolver": "^0.2.0", + "webmozart/assert": "^1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.4" }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" + "type": "library", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2016-06-10 09:48:41" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443", + "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "psr-0": { - "phpDocumentor": [ + "psr-4": { + "phpDocumentor\\Reflection\\": [ "src/" ] } @@ -745,10 +727,10 @@ "authors": [ { "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" + "email": "me@mikevanriel.com" } ], - "time": "2015-02-03 12:10:50" + "time": "2016-06-10 07:14:17" }, { "name": "phploc/phploc", @@ -805,20 +787,20 @@ }, { "name": "phpmd/phpmd", - "version": "2.3.2", + "version": "2.4.3", "source": { "type": "git", "url": "https://github.com/phpmd/phpmd.git", - "reference": "08b5bcd454a7148579b68931fc500d824afd3bb5" + "reference": "2b9c2417a18696dfb578b38c116cd0ddc19b256e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpmd/phpmd/zipball/08b5bcd454a7148579b68931fc500d824afd3bb5", - "reference": "08b5bcd454a7148579b68931fc500d824afd3bb5", + "url": "https://api.github.com/repos/phpmd/phpmd/zipball/2b9c2417a18696dfb578b38c116cd0ddc19b256e", + "reference": "2b9c2417a18696dfb578b38c116cd0ddc19b256e", "shasum": "" }, "require": { - "pdepend/pdepend": "~2.0", + "pdepend/pdepend": "^2.0.4", "php": ">=5.3.0" }, "require-dev": { @@ -866,7 +848,7 @@ "phpmd", "pmd" ], - "time": "2015-09-24 14:37:49" + "time": "2016-04-04 11:52:04" }, { "name": "phpspec/php-diff", @@ -902,32 +884,112 @@ "description": "A comprehensive library for generating differences between two hashable objects (strings or arrays).", "time": "2013-11-01 13:02:21" }, + { + "name": "phpspec/phpspec", + "version": "2.5.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/phpspec.git", + "reference": "385ecb015e97c13818074f1517928b24d4a26067" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/phpspec/zipball/385ecb015e97c13818074f1517928b24d4a26067", + "reference": "385ecb015e97c13818074f1517928b24d4a26067", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.1", + "ext-tokenizer": "*", + "php": ">=5.3.3", + "phpspec/php-diff": "~1.0.0", + "phpspec/prophecy": "~1.4", + "sebastian/exporter": "~1.0", + "symfony/console": "~2.3|~3.0", + "symfony/event-dispatcher": "~2.1|~3.0", + "symfony/finder": "~2.1|~3.0", + "symfony/process": "^2.6|~3.0", + "symfony/yaml": "~2.1|~3.0" + }, + "require-dev": { + "behat/behat": "^3.0.11", + "bossa/phpspec2-expect": "~1.0", + "phpunit/phpunit": "~4.4", + "symfony/filesystem": "~2.1|~3.0" + }, + "suggest": { + "phpspec/nyan-formatters": "~1.0 – Adds Nyan formatters" + }, + "bin": [ + "bin/phpspec" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "psr-0": { + "PhpSpec": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "homepage": "http://marcelloduarte.net/" + } + ], + "description": "Specification-oriented BDD framework for PHP 5.3+", + "homepage": "http://phpspec.net/", + "keywords": [ + "BDD", + "SpecBDD", + "TDD", + "spec", + "specification", + "testing", + "tests" + ], + "time": "2016-03-20 20:34:32" + }, { "name": "phpspec/prophecy", - "version": "v1.5.0", + "version": "v1.6.1", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7" + "reference": "58a8137754bc24b25740d4281399a4a3596058e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0", + "reference": "58a8137754bc24b25740d4281399a4a3596058e0", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", - "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1" + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "sebastian/comparator": "^1.1", + "sebastian/recursion-context": "^1.0" }, "require-dev": { - "phpspec/phpspec": "~2.0" + "phpspec/phpspec": "^2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "1.6.x-dev" } }, "autoload": { @@ -960,7 +1022,7 @@ "spy", "stub" ], - "time": "2015-08-13 10:07:40" + "time": "2016-06-07 08:13:47" }, { "name": "phpunit/php-code-coverage", @@ -1114,21 +1176,24 @@ }, { "name": "phpunit/php-timer", - "version": "1.0.7", + "version": "1.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b" + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", "shasum": "" }, "require": { "php": ">=5.3.3" }, + "require-dev": { + "phpunit/phpunit": "~4|~5" + }, "type": "library", "autoload": { "classmap": [ @@ -1151,7 +1216,7 @@ "keywords": [ "timer" ], - "time": "2015-06-21 08:01:12" + "time": "2016-05-12 18:03:57" }, { "name": "phpunit/php-token-stream", @@ -1204,16 +1269,16 @@ }, { "name": "phpunit/phpunit", - "version": "4.8.19", + "version": "4.8.26", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "b2caaf8947aba5e002d42126723e9d69795f32b4" + "reference": "fc1d8cd5b5de11625979125c5639347896ac2c74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b2caaf8947aba5e002d42126723e9d69795f32b4", - "reference": "b2caaf8947aba5e002d42126723e9d69795f32b4", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fc1d8cd5b5de11625979125c5639347896ac2c74", + "reference": "fc1d8cd5b5de11625979125c5639347896ac2c74", "shasum": "" }, "require": { @@ -1227,7 +1292,7 @@ "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/php-timer": "^1.0.6", "phpunit/phpunit-mock-objects": "~2.3", "sebastian/comparator": "~1.1", "sebastian/diff": "~1.2", @@ -1272,7 +1337,7 @@ "testing", "xunit" ], - "time": "2015-11-30 08:18:59" + "time": "2016-05-17 03:09:28" }, { "name": "phpunit/phpunit-mock-objects", @@ -1396,23 +1461,23 @@ }, { "name": "sebastian/diff", - "version": "1.4.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "2b0112e42c338afa9ad9dfeb94d66f6d84c2f828" + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/2b0112e42c338afa9ad9dfeb94d66f6d84c2f828", - "reference": "2b0112e42c338afa9ad9dfeb94d66f6d84c2f828", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~5" + "phpunit/phpunit": "~4.8" }, "type": "library", "extra": { @@ -1444,20 +1509,20 @@ "keywords": [ "diff" ], - "time": "2015-12-06 07:21:36" + "time": "2015-12-08 07:14:41" }, { "name": "sebastian/environment", - "version": "1.3.3", + "version": "1.3.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6e7133793a8e5a5714a551a8324337374be209df" + "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e7133793a8e5a5714a551a8324337374be209df", - "reference": "6e7133793a8e5a5714a551a8324337374be209df", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716", + "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716", "shasum": "" }, "require": { @@ -1494,20 +1559,20 @@ "environment", "hhvm" ], - "time": "2015-12-02 08:37:27" + "time": "2016-05-17 03:18:57" }, { "name": "sebastian/exporter", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e" + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", "shasum": "" }, "require": { @@ -1515,12 +1580,13 @@ "sebastian/recursion-context": "~1.0" }, "require-dev": { + "ext-mbstring": "*", "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -1560,24 +1626,24 @@ "export", "exporter" ], - "time": "2015-06-21 07:55:53" + "time": "2016-06-17 09:04:28" }, { "name": "sebastian/finder-facade", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/finder-facade.git", - "reference": "a520dcc3dd39160eea480daa3426f4fd419a327b" + "reference": "2a6f7f57efc0aa2d23297d9fd9e2a03111a8c0b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/finder-facade/zipball/a520dcc3dd39160eea480daa3426f4fd419a327b", - "reference": "a520dcc3dd39160eea480daa3426f4fd419a327b", + "url": "https://api.github.com/repos/sebastianbergmann/finder-facade/zipball/2a6f7f57efc0aa2d23297d9fd9e2a03111a8c0b9", + "reference": "2a6f7f57efc0aa2d23297d9fd9e2a03111a8c0b9", "shasum": "" }, "require": { - "symfony/finder": "~2.3", + "symfony/finder": "~2.3|~3.0", "theseer/fdomdocument": "~1.3" }, "type": "library", @@ -1599,20 +1665,20 @@ ], "description": "FinderFacade is a convenience wrapper for Symfony's Finder component.", "homepage": "https://github.com/sebastianbergmann/finder-facade", - "time": "2015-06-04 08:11:58" + "time": "2016-02-17 07:02:23" }, { "name": "sebastian/git", - "version": "2.0.1", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/git.git", - "reference": "2d5c139d0eedcb9e67e0e9ca08023be6e9b7b47b" + "reference": "5100bc50cd9e70f424c643618e142214225024f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/git/zipball/2d5c139d0eedcb9e67e0e9ca08023be6e9b7b47b", - "reference": "2d5c139d0eedcb9e67e0e9ca08023be6e9b7b47b", + "url": "https://api.github.com/repos/sebastianbergmann/git/zipball/5100bc50cd9e70f424c643618e142214225024f3", + "reference": "5100bc50cd9e70f424c643618e142214225024f3", "shasum": "" }, "require": { @@ -1621,7 +1687,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -1644,7 +1710,7 @@ "keywords": [ "git" ], - "time": "2015-04-06 16:23:43" + "time": "2016-06-15 09:30:19" }, { "name": "sebastian/global-state", @@ -1835,23 +1901,27 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "2.4.0", + "version": "2.6.1", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "32a879f4f35019d78d568db2885d7779ca084a33" + "reference": "fb72ed32f8418db5e7770be1653e62e0d6f5dd3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/32a879f4f35019d78d568db2885d7779ca084a33", - "reference": "32a879f4f35019d78d568db2885d7779ca084a33", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/fb72ed32f8418db5e7770be1653e62e0d6f5dd3d", + "reference": "fb72ed32f8418db5e7770be1653e62e0d6f5dd3d", "shasum": "" }, "require": { + "ext-simplexml": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", "php": ">=5.1.2" }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, "bin": [ "scripts/phpcs", "scripts/phpcbf" @@ -1859,7 +1929,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { @@ -1905,30 +1975,33 @@ "phpcs", "standards" ], - "time": "2015-11-23 21:30:59" + "time": "2016-05-30 22:24:32" }, { "name": "symfony/config", - "version": "v2.8.0", + "version": "v3.1.2", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "f21c97aec1b5302d2dc0d17047ea8f4e4ff93aae" + "reference": "bcf5aebabc95b56e370e13d78565f74c7d8726dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/f21c97aec1b5302d2dc0d17047ea8f4e4ff93aae", - "reference": "f21c97aec1b5302d2dc0d17047ea8f4e4ff93aae", + "url": "https://api.github.com/repos/symfony/config/zipball/bcf5aebabc95b56e370e13d78565f74c7d8726dc", + "reference": "bcf5aebabc95b56e370e13d78565f74c7d8726dc", "shasum": "" }, "require": { - "php": ">=5.3.9", - "symfony/filesystem": "~2.3|~3.0.0" + "php": ">=5.5.9", + "symfony/filesystem": "~2.8|~3.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -1955,20 +2028,20 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2015-11-23 20:38:01" + "time": "2016-06-29 05:41:56" }, { "name": "symfony/console", - "version": "v2.8.0", + "version": "v2.8.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "d232bfc100dfd32b18ccbcab4bcc8f28697b7e41" + "reference": "c392a6ec72f2122748032c2ad6870420561ffcfa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/d232bfc100dfd32b18ccbcab4bcc8f28697b7e41", - "reference": "d232bfc100dfd32b18ccbcab4bcc8f28697b7e41", + "url": "https://api.github.com/repos/symfony/console/zipball/c392a6ec72f2122748032c2ad6870420561ffcfa", + "reference": "c392a6ec72f2122748032c2ad6870420561ffcfa", "shasum": "" }, "require": { @@ -2015,42 +2088,40 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2015-11-30 12:35:10" + "time": "2016-06-29 07:02:14" }, { "name": "symfony/dependency-injection", - "version": "v2.8.0", + "version": "v3.1.2", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "1ac8ce1a1cff7ff9467d44bc71b0f71dfa751ba4" + "reference": "b7272b65f2f46cbe77def7d33916f2613669c508" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/1ac8ce1a1cff7ff9467d44bc71b0f71dfa751ba4", - "reference": "1ac8ce1a1cff7ff9467d44bc71b0f71dfa751ba4", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/b7272b65f2f46cbe77def7d33916f2613669c508", + "reference": "b7272b65f2f46cbe77def7d33916f2613669c508", "shasum": "" }, "require": { - "php": ">=5.3.9" - }, - "conflict": { - "symfony/expression-language": "<2.6" + "php": ">=5.5.9" }, "require-dev": { - "symfony/config": "~2.2|~3.0.0", - "symfony/expression-language": "~2.6|~3.0.0", - "symfony/yaml": "~2.1|~3.0.0" + "symfony/config": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0" }, "suggest": { "symfony/config": "", + "symfony/expression-language": "For using expressions in service container configuration", "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", "symfony/yaml": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -2077,29 +2148,89 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2015-11-30 06:56:28" + "time": "2016-06-29 05:42:25" + }, + { + "name": "symfony/event-dispatcher", + "version": "v3.1.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "7f9839ede2070f53e7e2f0849b9bd14748c434c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/7f9839ede2070f53e7e2f0849b9bd14748c434c5", + "reference": "7f9839ede2070f53e7e2f0849b9bd14748c434c5", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2016-06-29 05:41:56" }, { "name": "symfony/filesystem", - "version": "v2.8.0", + "version": "v3.1.2", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "3e661a0d521ac67496515fa6e6704bd61bcfff60" + "reference": "322da5f0910d8aa0b25fa65ffccaba68dbddb890" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/3e661a0d521ac67496515fa6e6704bd61bcfff60", - "reference": "3e661a0d521ac67496515fa6e6704bd61bcfff60", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/322da5f0910d8aa0b25fa65ffccaba68dbddb890", + "reference": "322da5f0910d8aa0b25fa65ffccaba68dbddb890", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.5.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -2126,20 +2257,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2015-11-23 10:19:46" + "time": "2016-06-29 05:41:56" }, { "name": "symfony/finder", - "version": "v2.8.0", + "version": "v2.8.8", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "ead9b07af4ba77b6507bee697396a5c79e633f08" + "reference": "bf0506ef4e7778fd3f0f1f141ab5e8c1ef35dd7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/ead9b07af4ba77b6507bee697396a5c79e633f08", - "reference": "ead9b07af4ba77b6507bee697396a5c79e633f08", + "url": "https://api.github.com/repos/symfony/finder/zipball/bf0506ef4e7778fd3f0f1f141ab5e8c1ef35dd7d", + "reference": "bf0506ef4e7778fd3f0f1f141ab5e8c1ef35dd7d", "shasum": "" }, "require": { @@ -2175,29 +2306,32 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2015-10-30 20:15:42" + "time": "2016-06-29 05:29:29" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.0.0", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0b6a8940385311a24e060ec1fe35680e17c74497" + "reference": "dff51f72b0706335131b00a7f49606168c582594" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0b6a8940385311a24e060ec1fe35680e17c74497", - "reference": "0b6a8940385311a24e060ec1fe35680e17c74497", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594", + "reference": "dff51f72b0706335131b00a7f49606168c582594", "shasum": "" }, "require": { "php": ">=5.3.3" }, + "suggest": { + "ext-mbstring": "For best performance" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.2-dev" } }, "autoload": { @@ -2231,20 +2365,20 @@ "portable", "shim" ], - "time": "2015-11-04 20:28:58" + "time": "2016-05-18 14:26:46" }, { "name": "symfony/yaml", - "version": "v2.8.0", + "version": "v2.8.8", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "f79824187de95064a2f5038904c4d7f0227fedb5" + "reference": "dba4bb5846798cd12f32e2d8f3f35d77045773c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/f79824187de95064a2f5038904c4d7f0227fedb5", - "reference": "f79824187de95064a2f5038904c4d7f0227fedb5", + "url": "https://api.github.com/repos/symfony/yaml/zipball/dba4bb5846798cd12f32e2d8f3f35d77045773c8", + "reference": "dba4bb5846798cd12f32e2d8f3f35d77045773c8", "shasum": "" }, "require": { @@ -2280,7 +2414,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2015-11-30 12:35:10" + "time": "2016-06-29 05:29:29" }, { "name": "theseer/fdomdocument", @@ -2322,6 +2456,55 @@ "homepage": "https://github.com/theseer/fDOMDocument", "time": "2015-05-27 22:58:02" }, + { + "name": "webmozart/assert", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", + "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2015-08-24 13:29:44" + }, { "name": "zetacomponents/base", "version": "1.9", From e3f92e0cdbb72c6aa9e4bd51f17655cb8f19c9e3 Mon Sep 17 00:00:00 2001 From: ahmad-marzouq Date: Tue, 6 Dec 2016 09:53:10 +0200 Subject: [PATCH 12/48] added git pull option --- .check-author.yml | 1 + src/Command/PullCommandBuilder.php | 102 +++++++++++++++++++++++++++++ src/GitRepository.php | 12 ++++ 3 files changed, 115 insertions(+) create mode 100644 src/Command/PullCommandBuilder.php diff --git a/.check-author.yml b/.check-author.yml index b381930..f360b1b 100644 --- a/.check-author.yml +++ b/.check-author.yml @@ -1,3 +1,4 @@ mapping: Tristan Lins : Tristan Lins David Molineus : David Molineus + Ahmad Marzouq : ahmad-marzouq diff --git a/src/Command/PullCommandBuilder.php b/src/Command/PullCommandBuilder.php new file mode 100644 index 0000000..893ec10 --- /dev/null +++ b/src/Command/PullCommandBuilder.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * This project is provided in good faith and hope to be usable by anyone. + * + * @package bit3/git-php + * @author Ahmad Marzouq + * @copyright 2014 Tristan Lins + * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php + * @filesource + */ + +namespace Bit3\GitPhp\Command; + +/** + * Pull command builder. + * + * @SuppressWarnings(PHPMD.TooManyPublicMethods) + */ +class PullCommandBuilder extends AbstractCommandBuilder +{ + + /** + * {@inheritDoc} + */ + protected function initializeProcessBuilder() + { + $this->processBuilder->add('pull'); + } + + /** + * Add the quiet option to the command line. + * + * @return PullCommandBuilder + */ + public function quiet() + { + $this->processBuilder->add('--quiet'); + return $this; + } + + /** + * Add the verbose option to the command line. + * + * @return PullCommandBuilder + */ + public function verbose() + { + $this->processBuilder->add('--verbose'); + return $this; + } + + /** + * Add the recurse-submodules option to the command line. + * + * @param string $recurse The value. + * + * @return PushCommandBuilder + */ + public function recurseSubmodules($recurse) + { + $this->processBuilder->add('--recurse-submodules=' . $recurse); + return $this; + } + + + /** + * Build the command and execute it. + * + * @param string $repository Name of the remote to pull from. + * + * @param null|string $refspec Ref spec to pull. + * + * @param null|string $_ More optional ref specs to pull. + * + * @return string + * + * @SuppressWarnings(PHPMD.ShortVariableName) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.CamelCaseParameterName) + */ + public function execute($repository, $refspec = null, $_ = null) + { + $this->processBuilder->add($repository); + + $refspecs = func_get_args(); + array_shift($refspecs); + foreach ($refspecs as $refspec) { + $this->processBuilder->add($refspec); + } + + return parent::run(); + } +} diff --git a/src/GitRepository.php b/src/GitRepository.php index 02dd137..c556435 100644 --- a/src/GitRepository.php +++ b/src/GitRepository.php @@ -16,6 +16,7 @@ * @author David Molineus * @author Aaron Rubin * @author Matthew Gamble + * @author Ahmad Marzouq * @copyright 2014 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php @@ -45,6 +46,7 @@ use Bit3\GitPhp\Command\ShowCommandBuilder; use Bit3\GitPhp\Command\StatusCommandBuilder; use Bit3\GitPhp\Command\TagCommandBuilder; +use Bit3\GitPhp\Command\PullCommandBuilder; /** * GIT repository adapter. @@ -321,4 +323,14 @@ public function merge() { return new MergeCommandBuilder($this); } + + /** + * Create Pull command. + * + * @return PullCommandBuilder + */ + public function pull() + { + return new PullCommandBuilder($this); + } } From 839fcfbd49bb92008698676e4ec5eda8074485d1 Mon Sep 17 00:00:00 2001 From: Ahmad Marzouq Date: Thu, 8 Dec 2016 12:12:27 +0200 Subject: [PATCH 13/48] add stash option --- src/Command/StashCommandBuilder.php | 241 ++++++++++++++++++++++++++++ src/GitRepository.php | 11 ++ 2 files changed, 252 insertions(+) create mode 100644 src/Command/StashCommandBuilder.php diff --git a/src/Command/StashCommandBuilder.php b/src/Command/StashCommandBuilder.php new file mode 100644 index 0000000..ee9c0e4 --- /dev/null +++ b/src/Command/StashCommandBuilder.php @@ -0,0 +1,241 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * This project is provided in good faith and hope to be usable by anyone. + * + * @package bit3/git-php + * @author Ahmad Marzouq + * @copyright 2014 Tristan Lins + * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php + * @filesource + */ + +namespace Bit3\GitPhp\Command; + +/** + * Stash command builder. + * + * @SuppressWarnings(PHPMD.TooManyPublicMethods) + */ +class StashCommandBuilder extends AbstractCommandBuilder +{ + /** + * {@inheritDoc} + */ + protected function initializeProcessBuilder() + { + $this->processBuilder->add('stash'); + } + + /** + * Adds a message to StashCommandBuilder + * + * @param string $message The stash message. + * + * @return StashCommandBuilder + */ + public function message($message) + { + $this->processBuilder->add($message); + return $this; + } + + /** + * List stashes and return the results + * + * @param string $options Takes options applicable to the git log command. + * + * @return mixed + */ + public function listStash($options = null) + { + $this->processBuilder->add('list'); + if ($options) { + $this->processBuilder->add($options); + } + return parent::run(); + } + + /** + * Show the changes recorded in the stash as a diff + * between the stashed state and its original parent. + * When no $stash is given, shows the latest one. + * + * @param int|null $stash Takes the stash number. + * + * @return mixed + */ + public function show($stash = null) + { + $this->processBuilder->add('show'); + if ($stash) { + $this->processBuilder->add('stash@{' . $stash . '}'); + } + return parent::run(); + } + + /** + * Remove a single stashed state from the stash list. + * When no $stash is given, it removes the latest one. + * + * @param int|null $stash Takes the stash number. + * + * @return mixed + */ + public function drop($stash = null) + { + $this->processBuilder->add('show'); + if ($stash) { + $this->processBuilder->add('stash@{' . $stash . '}'); + } + return parent::run(); + } + + /** + * Remove a single stashed state from the stash list + * and apply it on top of the current working tree state. + * + * @param int|null $stash Takes the stash number. + * + * @return mixed + */ + public function pop($stash = null) + { + $this->processBuilder->add('pop'); + if ($stash) { + $this->processBuilder->add('stash@{' . $stash . '}'); + } + return parent::run(); + } + + /** + * Like pop, but do not remove the state from the stash list. + * Unlike pop, $stash may be any commit that looks like a commit + * created by stash save or stash create. + * + * @param int|null $stash Takes the stash number. + * + * @return mixed + */ + public function apply($stash = null) + { + $this->processBuilder->add('pop'); + if ($stash) { + $this->processBuilder->add('stash@{' . $stash . '}'); + } + return parent::run(); + } + + + /** + * Creates and checks out a new branch named $branchname starting from the commit at + * which the $stash was originally created, + * applies the changes recorded in $stash to the new working tree and index. + * + * @param string $branchname The branch name. + * + * @param int|null $stash Takes the stash number. + * + * @return mixed + */ + public function branch($branchname, $stash = null) + { + $this->processBuilder->add('branch'); + $this->processBuilder->add($branchname); + if ($stash) { + $this->processBuilder->add('stash@{' . $stash . '}'); + } + return parent::run(); + } + + + /** + * Remove all the stashed states. + * + * @return mixed + */ + public function clear() + { + $this->processBuilder->add('clear'); + return parent::run(); + } + + + /** + * Save your local modifications to a new stash, + * and run git reset --hard to revert them. + * The part is optional and gives + * the description along with the stashed state. + * + * @param string $message The stash message. + * + * @return mixed + */ + public function save($message = null) + { + $this->processBuilder->add('branch'); + if ($message) { + $this->processBuilder->add($message); + } + return parent::run(); + } + + /** + * Create a stash (which is a regular commit object) + * and return its object name, + * without storing it anywhere in the ref namespace. + * + * @param string $message The stash message. + * + * @return mixed + */ + public function create($message = null) + { + $this->processBuilder->add('create'); + if ($message) { + $this->processBuilder->add($message); + } + return parent::run(); + } + + /** + * Store a given stash created via git stash create + * (which is a dangling merge commit) in the stash ref, + * updating the stash reflog. + * + * @param string $message The stash message. + * + * @param null|string $commit The commit hash. + * + * @return mixed + */ + public function store($message = null, $commit = null) + { + $this->processBuilder->add('store'); + if ($message) { + $this->processBuilder->add('--message '.$message); + } + if ($commit) { + $this->processBuilder->add($commit); + } + return parent::run(); + } + /** + * Execute the command and return the result. + * to use with message function . + * + * @return mixed + */ + public function execute() + { + return parent::run(); + } +} diff --git a/src/GitRepository.php b/src/GitRepository.php index c556435..0ce1aee 100644 --- a/src/GitRepository.php +++ b/src/GitRepository.php @@ -47,6 +47,7 @@ use Bit3\GitPhp\Command\StatusCommandBuilder; use Bit3\GitPhp\Command\TagCommandBuilder; use Bit3\GitPhp\Command\PullCommandBuilder; +use Bit3\GitPhp\Command\StashCommandBuilder; /** * GIT repository adapter. @@ -333,4 +334,14 @@ public function pull() { return new PullCommandBuilder($this); } + + /** + * Create stash command. + * + * @return StashCommandBuilder + */ + public function stash() + { + return new StashCommandBuilder($this); + } } From ca047a0dba78752afd6fad7af6944d0c97d32141 Mon Sep 17 00:00:00 2001 From: Christian Schiffler Date: Tue, 7 Feb 2017 04:43:06 +0100 Subject: [PATCH 14/48] Fix build issues --- .travis.yml | 1 + src/Command/PullCommandBuilder.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 79ff8dc..2e85143 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ php: - "5.5" - "5.6" - "7.0" + - "7.1" sudo: false diff --git a/src/Command/PullCommandBuilder.php b/src/Command/PullCommandBuilder.php index 893ec10..8ce2895 100644 --- a/src/Command/PullCommandBuilder.php +++ b/src/Command/PullCommandBuilder.php @@ -12,6 +12,7 @@ * * @package bit3/git-php * @author Ahmad Marzouq + * @author Christian Schiffler * @copyright 2014 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php @@ -63,7 +64,7 @@ public function verbose() * * @param string $recurse The value. * - * @return PushCommandBuilder + * @return PullCommandBuilder */ public function recurseSubmodules($recurse) { From 37755746f166033b1cb965aa1fe9e8b5e4b5ad10 Mon Sep 17 00:00:00 2001 From: Christian Schiffler Date: Tue, 7 Feb 2017 04:45:38 +0100 Subject: [PATCH 15/48] Remove composer.lock --- .gitignore | 1 + composer.lock | 2647 ------------------------------------------------- 2 files changed, 1 insertion(+), 2647 deletions(-) delete mode 100644 composer.lock diff --git a/.gitignore b/.gitignore index 47cde99..d870bd0 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ # composer related /vendor/ /composer.phar +/composer.lock diff --git a/composer.lock b/composer.lock deleted file mode 100644 index c37c1a5..0000000 --- a/composer.lock +++ /dev/null @@ -1,2647 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "hash": "5f48dd10389e0af4c28502fb8e6eaba4", - "content-hash": "4103c14b9f56525c63ec9e8993beefb0", - "packages": [ - { - "name": "psr/log", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-0": { - "Psr\\Log\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2012-12-21 11:40:51" - }, - { - "name": "symfony/process", - "version": "v3.1.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "5c11a1a4d4016662eeaf0f8757958c7de069f9a0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/5c11a1a4d4016662eeaf0f8757958c7de069f9a0", - "reference": "5c11a1a4d4016662eeaf0f8757958c7de069f9a0", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Process Component", - "homepage": "https://symfony.com", - "time": "2016-06-29 05:42:25" - } - ], - "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", - "shasum": "" - }, - "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2015-06-14 21:17:01" - }, - { - "name": "pdepend/pdepend", - "version": "2.2.4", - "source": { - "type": "git", - "url": "https://github.com/pdepend/pdepend.git", - "reference": "b086687f3a01dc6bb92d633aef071d2c5dd0db06" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pdepend/pdepend/zipball/b086687f3a01dc6bb92d633aef071d2c5dd0db06", - "reference": "b086687f3a01dc6bb92d633aef071d2c5dd0db06", - "shasum": "" - }, - "require": { - "php": ">=5.3.7", - "symfony/config": "^2.3.0|^3", - "symfony/dependency-injection": "^2.3.0|^3", - "symfony/filesystem": "^2.3.0|^3" - }, - "require-dev": { - "phpunit/phpunit": "^4.4.0,<4.8", - "squizlabs/php_codesniffer": "^2.0.0" - }, - "bin": [ - "src/bin/pdepend" - ], - "type": "library", - "autoload": { - "psr-4": { - "PDepend\\": "src/main/php/PDepend" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Official version of pdepend to be handled with Composer", - "time": "2016-03-10 15:15:04" - }, - { - "name": "phpcq/all-tasks", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/phpcq/all-tasks.git", - "reference": "a950be485150f75f041cc24c7373dfe609a2d022" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpcq/all-tasks/zipball/a950be485150f75f041cc24c7373dfe609a2d022", - "reference": "a950be485150f75f041cc24c7373dfe609a2d022", - "shasum": "" - }, - "require": { - "pdepend/pdepend": "~2.1", - "phpcq/author-validation": "~1.1", - "phpcq/autoload-validation": "~1.1", - "phpcq/branch-alias-validation": "~1.1", - "phpcq/coding-standard": "~2.0", - "phpcq/phpcq": "~1.1", - "phpcq/travis-configuration-check": "~1.1", - "phploc/phploc": "~2.1", - "phpmd/phpmd": "~2.2", - "phpspec/phpspec": "~2.0", - "phpunit/phpunit": "~4.7", - "sebastian/phpcpd": "~1.4" - }, - "type": "metapackage", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev", - "dev-develop": "1.2.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Schiffler", - "email": "c.schiffler@cyberspectrum.de", - "homepage": "http://www.cyberspectrum.de", - "role": "Developer" - }, - { - "name": "Tristan Lins", - "email": "tristan@lins.io", - "homepage": "https://tristan.lins.io", - "role": "Developer" - } - ], - "description": "Meta package to enable all tasks of the PHP code quality project", - "time": "2016-05-03 21:02:59" - }, - { - "name": "phpcq/author-validation", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/phpcq/author-validation.git", - "reference": "378749eae10d8ce1f7ccd608022e56d75cd810e7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpcq/author-validation/zipball/378749eae10d8ce1f7ccd608022e56d75cd810e7", - "reference": "378749eae10d8ce1f7ccd608022e56d75cd810e7", - "shasum": "" - }, - "require": { - "bit3/git-php": "~1.0", - "php": ">=5.3.4", - "phpspec/php-diff": "~1.0", - "symfony/console": "~2.3", - "symfony/finder": "~2.3" - }, - "require-dev": { - "phpcq/all-tasks": "~1.1", - "phpcq/coding-standard": "~2.0" - }, - "bin": [ - "bin/check-author.php" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-develop": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "PhpCodeQuality\\AuthorValidation\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Schiffler", - "email": "c.schiffler@cyberspectrum.de", - "homepage": "http://www.cyberspectrum.de", - "role": "Developer" - }, - { - "name": "Tristan Lins", - "email": "tristan@lins.io", - "homepage": "https://tristan.lins.io", - "role": "Developer" - } - ], - "description": "Check if all authors of a particular file are mentioned in the copyright header.", - "time": "2016-02-10 23:47:16" - }, - { - "name": "phpcq/autoload-validation", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/phpcq/autoload-validation.git", - "reference": "e373f53c99a2b818ae2820b535c9f3130e35de0c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpcq/autoload-validation/zipball/e373f53c99a2b818ae2820b535c9f3130e35de0c", - "reference": "e373f53c99a2b818ae2820b535c9f3130e35de0c", - "shasum": "" - }, - "require": { - "php": ">=5.3.4", - "psr/log": "~1.0", - "symfony/console": "~2.3 | ~3.0", - "symfony/finder": "~2.3 | ~3.0" - }, - "require-dev": { - "phpcq/all-tasks": "~1.1" - }, - "bin": [ - "bin/check-autoloading.php" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev", - "dev-develop": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "PhpCodeQuality\\AutoloadValidation\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Schiffler", - "email": "c.schiffler@cyberspectrum.de", - "homepage": "http://www.cyberspectrum.de", - "role": "Developer" - }, - { - "name": "Tristan Lins", - "email": "tristan@lins.io", - "homepage": "https://tristan.lins.io", - "role": "Developer" - } - ], - "description": "Check that the contents of the composer.json autoload keys are correct.", - "time": "2016-05-03 21:13:33" - }, - { - "name": "phpcq/branch-alias-validation", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/phpcq/branch-alias-validation.git", - "reference": "3fec03bbb16c67c986029fd5804ab1c9849a893c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpcq/branch-alias-validation/zipball/3fec03bbb16c67c986029fd5804ab1c9849a893c", - "reference": "3fec03bbb16c67c986029fd5804ab1c9849a893c", - "shasum": "" - }, - "require": { - "bit3/git-php": "~1.0", - "php": ">=5.3.4", - "symfony/console": "~2.3" - }, - "require-dev": { - "phpcq/all-tasks": "~1.1" - }, - "bin": [ - "bin/validate-branch-alias.php" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev", - "dev-develop": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "PhpCodeQuality\\BranchAliasValidation\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Schiffler", - "email": "c.schiffler@cyberspectrum.de", - "homepage": "http://www.cyberspectrum.de", - "role": "Developer" - }, - { - "name": "Tristan Lins", - "email": "tristan@lins.io", - "homepage": "https://tristan.lins.io", - "role": "Developer" - } - ], - "description": "Validation tool to ensure that all branches are ahead of the most recent tag.", - "time": "2016-05-03 18:20:18" - }, - { - "name": "phpcq/coding-standard", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/phpcq/coding-standard.git", - "reference": "b4185f462f4b4f7eb16306d3fee48630aba89b18" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpcq/coding-standard/zipball/b4185f462f4b4f7eb16306d3fee48630aba89b18", - "reference": "b4185f462f4b4f7eb16306d3fee48630aba89b18", - "shasum": "" - }, - "require": { - "php": ">=5.3", - "squizlabs/php_codesniffer": "~2.0" - }, - "require-dev": { - "phpcq/all-tasks": "~1.1" - }, - "suggest": { - "phpcq/phpcq": "The PHP code quality project core tasks." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause and MIT" - ], - "authors": [ - { - "name": "Christian Schiffler", - "email": "c.schiffler@cyberspectrum.de", - "homepage": "http://www.cyberspectrum.de", - "role": "Developer" - }, - { - "name": "Tristan Lins", - "email": "tristan@lins.io", - "homepage": "https://tristan.lins.io", - "role": "Developer" - } - ], - "description": "PHP code quality project coding standard", - "homepage": "http://phpcq.org/", - "time": "2016-02-26 00:11:29" - }, - { - "name": "phpcq/phpcq", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/phpcq/phpcq.git", - "reference": "b82c658fc92ff453dcdf1b20bd251ff19232b327" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpcq/phpcq/zipball/b82c658fc92ff453dcdf1b20bd251ff19232b327", - "reference": "b82c658fc92ff453dcdf1b20bd251ff19232b327", - "shasum": "" - }, - "suggest": { - "pdepend/pdepend": "Enable the pdepend task (suggested version: ~2.0)", - "phpcq/author-validation": "Enable the author-validation task (suggested version: ~1.1)", - "phpcq/branch-alias-validation": "Enable the branch-alias-validation task (suggested version: ~1.1)", - "phpcq/travis-configuration-check": "Enable the travis-configuration-check task (suggested version: ~1.1)", - "phploc/phploc": "Enable the phploc task (suggested version: ~2.0)", - "phpmd/phpmd": "Enable the phpmd task (suggested version: ~2.0)", - "phpspec/phpspec": "Enable the phpspec task (suggested version: ~2.0)", - "phpunit/phpunit": "Enable the phpunit task (suggested version: ~4.7).", - "sebastian/phpcpd": "Enable the phpcpd task (suggested version: ~1.4).", - "squizlabs/php_codesniffer": "Enable the phpcs task (suggested version: ~2.0)" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-develop": "1.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Schiffler", - "email": "c.schiffler@cyberspectrum.de", - "homepage": "http://cyberspectrum.de", - "role": "lead" - }, - { - "name": "Tristan Lins", - "email": "tristan@lins.de", - "homepage": "https://tristan.lins.io", - "role": "lead" - } - ], - "description": "PHP code quality project.", - "time": "2016-05-03 20:49:52" - }, - { - "name": "phpcq/travis-configuration-check", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/phpcq/travis-configuration-check.git", - "reference": "969adf4c545204bae7b5e87b8f563720af1bb54b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpcq/travis-configuration-check/zipball/969adf4c545204bae7b5e87b8f563720af1bb54b", - "reference": "969adf4c545204bae7b5e87b8f563720af1bb54b", - "shasum": "" - }, - "require": { - "php": ">=5.3", - "symfony/console": "~2.3", - "symfony/yaml": "~2.3" - }, - "require-dev": { - "phpcq/all-tasks": "~1.1" - }, - "bin": [ - "bin/check-travis-configuration.php" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev", - "dev-develop": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "PhpCodeQuality\\TravisConfigurationCheck\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Schiffler", - "email": "c.schiffler@cyberspectrum.de", - "homepage": "http://www.cyberspectrum.de", - "role": "Developer" - }, - { - "name": "Tristan Lins", - "email": "tristan@lins.io", - "homepage": "https://tristan.lins.io", - "role": "Developer" - } - ], - "description": "Validation tool to ensure that the contents of a .travis.yml make sense.", - "time": "2015-11-04 13:49:07" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "1.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "time": "2015-12-27 11:43:31" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "9270140b940ff02e58ec577c237274e92cd40cdd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd", - "reference": "9270140b940ff02e58ec577c237274e92cd40cdd", - "shasum": "" - }, - "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0@dev", - "phpdocumentor/type-resolver": "^0.2.0", - "webmozart/assert": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^4.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-06-10 09:48:41" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "0.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443", - "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443", - "shasum": "" - }, - "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "time": "2016-06-10 07:14:17" - }, - { - "name": "phploc/phploc", - "version": "2.1.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phploc.git", - "reference": "50e063abd41833b3a5d29a2e8fbef5859ac28bdc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phploc/zipball/50e063abd41833b3a5d29a2e8fbef5859ac28bdc", - "reference": "50e063abd41833b3a5d29a2e8fbef5859ac28bdc", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/finder-facade": "~1.1", - "sebastian/git": "~2.0", - "sebastian/version": "~1.0.3", - "symfony/console": "~2.5" - }, - "require-dev": { - "phpunit/phpunit": "~4" - }, - "bin": [ - "phploc" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "A tool for quickly measuring the size of a PHP project.", - "homepage": "https://github.com/sebastianbergmann/phploc", - "time": "2015-10-22 13:44:19" - }, - { - "name": "phpmd/phpmd", - "version": "2.4.3", - "source": { - "type": "git", - "url": "https://github.com/phpmd/phpmd.git", - "reference": "2b9c2417a18696dfb578b38c116cd0ddc19b256e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpmd/phpmd/zipball/2b9c2417a18696dfb578b38c116cd0ddc19b256e", - "reference": "2b9c2417a18696dfb578b38c116cd0ddc19b256e", - "shasum": "" - }, - "require": { - "pdepend/pdepend": "^2.0.4", - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0", - "squizlabs/php_codesniffer": "^2.0" - }, - "bin": [ - "src/bin/phpmd" - ], - "type": "project", - "autoload": { - "psr-0": { - "PHPMD\\": "src/main/php" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Manuel Pichler", - "email": "github@manuel-pichler.de", - "homepage": "https://github.com/manuelpichler", - "role": "Project Founder" - }, - { - "name": "Other contributors", - "homepage": "https://github.com/phpmd/phpmd/graphs/contributors", - "role": "Contributors" - }, - { - "name": "Marc Würth", - "email": "ravage@bluewin.ch", - "homepage": "https://github.com/ravage84", - "role": "Project Maintainer" - } - ], - "description": "PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD.", - "homepage": "http://phpmd.org/", - "keywords": [ - "mess detection", - "mess detector", - "pdepend", - "phpmd", - "pmd" - ], - "time": "2016-04-04 11:52:04" - }, - { - "name": "phpspec/php-diff", - "version": "v1.0.2", - "source": { - "type": "git", - "url": "https://github.com/phpspec/php-diff.git", - "reference": "30e103d19519fe678ae64a60d77884ef3d71b28a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/php-diff/zipball/30e103d19519fe678ae64a60d77884ef3d71b28a", - "reference": "30e103d19519fe678ae64a60d77884ef3d71b28a", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-0": { - "Diff": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Chris Boulton", - "homepage": "http://github.com/chrisboulton", - "role": "Original developer" - } - ], - "description": "A comprehensive library for generating differences between two hashable objects (strings or arrays).", - "time": "2013-11-01 13:02:21" - }, - { - "name": "phpspec/phpspec", - "version": "2.5.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/phpspec.git", - "reference": "385ecb015e97c13818074f1517928b24d4a26067" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/phpspec/zipball/385ecb015e97c13818074f1517928b24d4a26067", - "reference": "385ecb015e97c13818074f1517928b24d4a26067", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.1", - "ext-tokenizer": "*", - "php": ">=5.3.3", - "phpspec/php-diff": "~1.0.0", - "phpspec/prophecy": "~1.4", - "sebastian/exporter": "~1.0", - "symfony/console": "~2.3|~3.0", - "symfony/event-dispatcher": "~2.1|~3.0", - "symfony/finder": "~2.1|~3.0", - "symfony/process": "^2.6|~3.0", - "symfony/yaml": "~2.1|~3.0" - }, - "require-dev": { - "behat/behat": "^3.0.11", - "bossa/phpspec2-expect": "~1.0", - "phpunit/phpunit": "~4.4", - "symfony/filesystem": "~2.1|~3.0" - }, - "suggest": { - "phpspec/nyan-formatters": "~1.0 – Adds Nyan formatters" - }, - "bin": [ - "bin/phpspec" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2.x-dev" - } - }, - "autoload": { - "psr-0": { - "PhpSpec": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "homepage": "http://marcelloduarte.net/" - } - ], - "description": "Specification-oriented BDD framework for PHP 5.3+", - "homepage": "http://phpspec.net/", - "keywords": [ - "BDD", - "SpecBDD", - "TDD", - "spec", - "specification", - "testing", - "tests" - ], - "time": "2016-03-20 20:34:32" - }, - { - "name": "phpspec/prophecy", - "version": "v1.6.1", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "58a8137754bc24b25740d4281399a4a3596058e0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0", - "reference": "58a8137754bc24b25740d4281399a4a3596058e0", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", - "sebastian/comparator": "^1.1", - "sebastian/recursion-context": "^1.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, - "autoload": { - "psr-0": { - "Prophecy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2016-06-07 08:13:47" - }, - { - "name": "phpunit/php-code-coverage", - "version": "2.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" - }, - "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2015-10-06 15:47:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2015-06-21 13:08:43" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21 13:50:34" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4|~5" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2016-05-12 18:03:57" - }, - { - "name": "phpunit/php-token-stream", - "version": "1.4.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2015-09-15 10:49:45" - }, - { - "name": "phpunit/phpunit", - "version": "4.8.26", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "fc1d8cd5b5de11625979125c5639347896ac2c74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fc1d8cd5b5de11625979125c5639347896ac2c74", - "reference": "fc1d8cd5b5de11625979125c5639347896ac2c74", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "^1.3.1", - "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": "~2.3", - "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", - "symfony/yaml": "~2.1|~3.0" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.8.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2016-05-17 03:09:28" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2015-10-02 06:51:40" - }, - { - "name": "sebastian/comparator", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2015-07-26 15:48:44" - }, - { - "name": "sebastian/diff", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2015-12-08 07:14:41" - }, - { - "name": "sebastian/environment", - "version": "1.3.7", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716", - "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.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 functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2016-05-17 03:18:57" - }, - { - "name": "sebastian/exporter", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2016-06-17 09:04:28" - }, - { - "name": "sebastian/finder-facade", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/finder-facade.git", - "reference": "2a6f7f57efc0aa2d23297d9fd9e2a03111a8c0b9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/finder-facade/zipball/2a6f7f57efc0aa2d23297d9fd9e2a03111a8c0b9", - "reference": "2a6f7f57efc0aa2d23297d9fd9e2a03111a8c0b9", - "shasum": "" - }, - "require": { - "symfony/finder": "~2.3|~3.0", - "theseer/fdomdocument": "~1.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FinderFacade is a convenience wrapper for Symfony's Finder component.", - "homepage": "https://github.com/sebastianbergmann/finder-facade", - "time": "2016-02-17 07:02:23" - }, - { - "name": "sebastian/git", - "version": "2.1.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/git.git", - "reference": "5100bc50cd9e70f424c643618e142214225024f3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/git/zipball/5100bc50cd9e70f424c643618e142214225024f3", - "reference": "5100bc50cd9e70f424c643618e142214225024f3", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Simple wrapper for Git", - "homepage": "http://www.github.com/sebastianbergmann/git", - "keywords": [ - "git" - ], - "time": "2016-06-15 09:30:19" - }, - { - "name": "sebastian/global-state", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2015-10-12 03:26:01" - }, - { - "name": "sebastian/phpcpd", - "version": "1.4.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpcpd.git", - "reference": "090575dbd6486bff545a7426f98e988c8c597c1b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpcpd/zipball/090575dbd6486bff545a7426f98e988c8c597c1b", - "reference": "090575dbd6486bff545a7426f98e988c8c597c1b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "phpunit/php-timer": ">=1.0.4,<1.1.0", - "sebastian/finder-facade": "~1.1", - "sebastian/version": ">=1.0.0", - "symfony/finder": ">=2.1.2", - "theseer/fdomdocument": "~1.4", - "zetacomponents/base": ">=1.8", - "zetacomponents/console-tools": ">=1.6" - }, - "bin": [ - "composer/bin/phpcpd" - ], - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Copy/Paste Detector (CPD) for PHP code.", - "homepage": "https://github.com/sebastianbergmann/phpcpd", - "time": "2013-07-30 14:37:42" - }, - { - "name": "sebastian/recursion-context", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "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": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-11-11 19:50:13" - }, - { - "name": "sebastian/version", - "version": "1.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "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" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "2.6.1", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "fb72ed32f8418db5e7770be1653e62e0d6f5dd3d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/fb72ed32f8418db5e7770be1653e62e0d6f5dd3d", - "reference": "fb72ed32f8418db5e7770be1653e62e0d6f5dd3d", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "bin": [ - "scripts/phpcs", - "scripts/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Fixer.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", - "keywords": [ - "phpcs", - "standards" - ], - "time": "2016-05-30 22:24:32" - }, - { - "name": "symfony/config", - "version": "v3.1.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "bcf5aebabc95b56e370e13d78565f74c7d8726dc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/bcf5aebabc95b56e370e13d78565f74c7d8726dc", - "reference": "bcf5aebabc95b56e370e13d78565f74c7d8726dc", - "shasum": "" - }, - "require": { - "php": ">=5.5.9", - "symfony/filesystem": "~2.8|~3.0" - }, - "suggest": { - "symfony/yaml": "To use the yaml reference dumper" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Config Component", - "homepage": "https://symfony.com", - "time": "2016-06-29 05:41:56" - }, - { - "name": "symfony/console", - "version": "v2.8.8", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "c392a6ec72f2122748032c2ad6870420561ffcfa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c392a6ec72f2122748032c2ad6870420561ffcfa", - "reference": "c392a6ec72f2122748032c2ad6870420561ffcfa", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/polyfill-mbstring": "~1.0" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1|~3.0.0", - "symfony/process": "~2.1|~3.0.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Console Component", - "homepage": "https://symfony.com", - "time": "2016-06-29 07:02:14" - }, - { - "name": "symfony/dependency-injection", - "version": "v3.1.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/dependency-injection.git", - "reference": "b7272b65f2f46cbe77def7d33916f2613669c508" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/b7272b65f2f46cbe77def7d33916f2613669c508", - "reference": "b7272b65f2f46cbe77def7d33916f2613669c508", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "symfony/config": "~2.8|~3.0", - "symfony/expression-language": "~2.8|~3.0", - "symfony/yaml": "~2.8|~3.0" - }, - "suggest": { - "symfony/config": "", - "symfony/expression-language": "For using expressions in service container configuration", - "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\DependencyInjection\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony DependencyInjection Component", - "homepage": "https://symfony.com", - "time": "2016-06-29 05:42:25" - }, - { - "name": "symfony/event-dispatcher", - "version": "v3.1.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "7f9839ede2070f53e7e2f0849b9bd14748c434c5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/7f9839ede2070f53e7e2f0849b9bd14748c434c5", - "reference": "7f9839ede2070f53e7e2f0849b9bd14748c434c5", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.8|~3.0", - "symfony/dependency-injection": "~2.8|~3.0", - "symfony/expression-language": "~2.8|~3.0", - "symfony/stopwatch": "~2.8|~3.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com", - "time": "2016-06-29 05:41:56" - }, - { - "name": "symfony/filesystem", - "version": "v3.1.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "322da5f0910d8aa0b25fa65ffccaba68dbddb890" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/322da5f0910d8aa0b25fa65ffccaba68dbddb890", - "reference": "322da5f0910d8aa0b25fa65ffccaba68dbddb890", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Filesystem Component", - "homepage": "https://symfony.com", - "time": "2016-06-29 05:41:56" - }, - { - "name": "symfony/finder", - "version": "v2.8.8", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "bf0506ef4e7778fd3f0f1f141ab5e8c1ef35dd7d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/bf0506ef4e7778fd3f0f1f141ab5e8c1ef35dd7d", - "reference": "bf0506ef4e7778fd3f0f1f141ab5e8c1ef35dd7d", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Finder Component", - "homepage": "https://symfony.com", - "time": "2016-06-29 05:29:29" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "dff51f72b0706335131b00a7f49606168c582594" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594", - "reference": "dff51f72b0706335131b00a7f49606168c582594", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "time": "2016-05-18 14:26:46" - }, - { - "name": "symfony/yaml", - "version": "v2.8.8", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "dba4bb5846798cd12f32e2d8f3f35d77045773c8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/dba4bb5846798cd12f32e2d8f3f35d77045773c8", - "reference": "dba4bb5846798cd12f32e2d8f3f35d77045773c8", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2016-06-29 05:29:29" - }, - { - "name": "theseer/fdomdocument", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/theseer/fDOMDocument.git", - "reference": "d9ad139d6c2e8edf5e313ffbe37ff13344cf0684" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/fDOMDocument/zipball/d9ad139d6c2e8edf5e313ffbe37ff13344cf0684", - "reference": "d9ad139d6c2e8edf5e313ffbe37ff13344cf0684", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "lib-libxml": "*", - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "lead" - } - ], - "description": "The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.", - "homepage": "https://github.com/theseer/fDOMDocument", - "time": "2015-05-27 22:58:02" - }, - { - "name": "webmozart/assert", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", - "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "time": "2015-08-24 13:29:44" - }, - { - "name": "zetacomponents/base", - "version": "1.9", - "source": { - "type": "git", - "url": "https://github.com/zetacomponents/Base.git", - "reference": "f20df24e8de3e48b6b69b2503f917e457281e687" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zetacomponents/Base/zipball/f20df24e8de3e48b6b69b2503f917e457281e687", - "reference": "f20df24e8de3e48b6b69b2503f917e457281e687", - "shasum": "" - }, - "require-dev": { - "zetacomponents/unit-test": "*" - }, - "type": "library", - "autoload": { - "classmap": [ - "src" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Sergey Alexeev" - }, - { - "name": "Sebastian Bergmann" - }, - { - "name": "Jan Borsodi" - }, - { - "name": "Raymond Bosman" - }, - { - "name": "Frederik Holljen" - }, - { - "name": "Kore Nordmann" - }, - { - "name": "Derick Rethans" - }, - { - "name": "Vadym Savchuk" - }, - { - "name": "Tobias Schlitt" - }, - { - "name": "Alexandru Stanoi" - } - ], - "description": "The Base package provides the basic infrastructure that all packages rely on. Therefore every component relies on this package.", - "homepage": "https://github.com/zetacomponents", - "time": "2014-09-19 03:28:34" - }, - { - "name": "zetacomponents/console-tools", - "version": "1.7", - "source": { - "type": "git", - "url": "https://github.com/zetacomponents/ConsoleTools.git", - "reference": "30d67e9d04f458ac8cae4c49e50f81061460ff2c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zetacomponents/ConsoleTools/zipball/30d67e9d04f458ac8cae4c49e50f81061460ff2c", - "reference": "30d67e9d04f458ac8cae4c49e50f81061460ff2c", - "shasum": "" - }, - "require": { - "zetacomponents/base": "~1.8" - }, - "require-dev": { - "zetacomponents/unit-test": "*" - }, - "type": "library", - "autoload": { - "classmap": [ - "src" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Sergey Alexeev" - }, - { - "name": "Sebastian Bergmann" - }, - { - "name": "Jan Borsodi" - }, - { - "name": "Raymond Bosman" - }, - { - "name": "Frederik Holljen" - }, - { - "name": "Kore Nordmann" - }, - { - "name": "Derick Rethans" - }, - { - "name": "Vadym Savchuk" - }, - { - "name": "Tobias Schlitt" - }, - { - "name": "Alexandru Stanoi" - } - ], - "description": "A set of classes to do different actions with the console (also called shell). It can render a progress bar, tables and a status bar and contains a class for parsing command line options.", - "homepage": "https://github.com/zetacomponents", - "time": "2014-09-27 19:26:09" - } - ], - "aliases": [], - "minimum-stability": "dev", - "stability-flags": [], - "prefer-stable": true, - "prefer-lowest": false, - "platform": { - "php": ">=5.3" - }, - "platform-dev": [] -} From 2450d337279a90509d05b1d3b51ee87299888d3a Mon Sep 17 00:00:00 2001 From: Christian Schiffler Date: Tue, 7 Feb 2017 04:48:48 +0100 Subject: [PATCH 16/48] Bump branch alias --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 754ab7f..b8bdbac 100644 --- a/composer.json +++ b/composer.json @@ -21,8 +21,8 @@ "prefer-stable": true, "extra": { "branch-alias": { - "dev-master": "1.3.x-dev", - "dev-develop": "1.4.x-dev" + "dev-master": "1.4.x-dev", + "dev-develop": "1.5.x-dev" } } } From 384f2c4f71d411ce8aa55e6340f1e7d9285648a3 Mon Sep 17 00:00:00 2001 From: Christian Schiffler Date: Thu, 9 Mar 2017 04:07:24 +0100 Subject: [PATCH 17/48] Mark tag optional and add getNames() method --- src/Command/TagCommandBuilder.php | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/Command/TagCommandBuilder.php b/src/Command/TagCommandBuilder.php index 6fa183d..e0067b7 100644 --- a/src/Command/TagCommandBuilder.php +++ b/src/Command/TagCommandBuilder.php @@ -258,7 +258,7 @@ public function cleanup($mode) * @SuppressWarnings(PHPMD.UnusedFormalParameter) * @SuppressWarnings(PHPMD.CamelCaseParameterName) */ - public function execute($tagName, $commit = null) + public function execute($tagName = null, $commit = null) { if (!$this->signIsset && $this->repository->getConfig()->isSignTagsEnabled()) { $this->sign()->localUser($this->repository->getConfig()->getSignCommitUser()); @@ -268,7 +268,9 @@ public function execute($tagName, $commit = null) } } - $this->processBuilder->add($tagName); + if ($tagName) { + $this->processBuilder->add($tagName); + } if ($commit) { $this->processBuilder->add($commit); @@ -276,4 +278,19 @@ public function execute($tagName, $commit = null) return parent::run(); } + + /** + * Retrieve the tag names. + * + * @return string[] + */ + public function getNames() + { + $tags = $this->execute(); + $tags = explode("\n", $tags); + $tags = array_map('trim', $tags); + $tags = array_filter($tags); + + return $tags; + } } From d3b20f37d90886b11f7f9c2c7b8409747462dff1 Mon Sep 17 00:00:00 2001 From: Christian Schiffler Date: Thu, 9 Mar 2017 04:08:46 +0100 Subject: [PATCH 18/48] Fix parsing of output with leading spaces --- src/Command/StatusCommandBuilder.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Command/StatusCommandBuilder.php b/src/Command/StatusCommandBuilder.php index c455066..d07ab25 100644 --- a/src/Command/StatusCommandBuilder.php +++ b/src/Command/StatusCommandBuilder.php @@ -248,8 +248,8 @@ public function getIndexStatus($pathspec = null, $_ = null) $files = array(); foreach ($status as $line) { - if (trim($line)) { - $index = trim(substr($line, 0, 1)); + if ($line = trim($line)) { + $index = substr($line, 0, 1); if ($index) { $file = trim(substr($line, 2)); @@ -291,7 +291,7 @@ public function getWorkTreeStatus($pathspec = null, $_ = null) $files = array(); foreach ($status as $line) { - if (trim($line)) { + if ($line = trim($line)) { $worktree = trim(substr($line, 1, 1)); if ($worktree) { From 360945af5f44a551a1ec63d058cafa9f232e3939 Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Sat, 25 Aug 2018 21:38:54 +0200 Subject: [PATCH 19/48] Update phpunit test --- tests/GitRepositoryTest.php | 111 ++++++++++++++++++++++++++++++------ 1 file changed, 94 insertions(+), 17 deletions(-) diff --git a/tests/GitRepositoryTest.php b/tests/GitRepositoryTest.php index 52fb1ca..5bf716c 100644 --- a/tests/GitRepositoryTest.php +++ b/tests/GitRepositoryTest.php @@ -14,7 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @author Matthew Gamble - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -23,13 +24,14 @@ namespace Bit3\GitPhp\Test; use Bit3\GitPhp\GitRepository; +use PHPUnit\Framework\TestCase; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Process\ProcessBuilder; /** * GIT repository unit tests. */ -class GitRepositoryTest extends \PHPUnit_Framework_TestCase +class GitRepositoryTest extends TestCase { /** * @var string @@ -145,7 +147,12 @@ public function testConfigGetOnInitializedRepository() */ public function testConfigGetOnUnitializedRepository() { - $this->setExpectedException('Bit3\GitPhp\GitException'); + if (\method_exists($this, 'setExpectedException')) { + $this->setExpectedException('Bit3\GitPhp\GitException'); + } else { + $this->expectException('Bit3\GitPhp\GitException'); + } + $this->uninitializedGitRepository->config()->file('local')->execute('core.bare'); $this->uninitializedGitRepository->config()->file('local')->get('user.name')->execute(); } @@ -227,7 +234,12 @@ public function testListRemotesOnInitializedRepository() */ public function testListRemotesOnUninitializedRepository() { - $this->setExpectedException('Bit3\GitPhp\GitException'); + if (\method_exists($this, 'setExpectedException')) { + $this->setExpectedException('Bit3\GitPhp\GitException'); + } else { + $this->expectException('Bit3\GitPhp\GitException'); + } + $this->uninitializedGitRepository->remote()->getNames(); } @@ -254,7 +266,12 @@ public function testListBranchesOnInitializedRepository() */ public function testListBranchesOnUninitializedRepository() { - $this->setExpectedException('Bit3\GitPhp\GitException'); + if (\method_exists($this, 'setExpectedException')) { + $this->setExpectedException('Bit3\GitPhp\GitException'); + } else { + $this->expectException('Bit3\GitPhp\GitException'); + } + $this->uninitializedGitRepository->branch()->getNames(); } @@ -286,7 +303,12 @@ public function testDescribeOnInitializedRepository() */ public function testDescribeOnUninitializedRepository() { - $this->setExpectedException('Bit3\GitPhp\GitException'); + if (\method_exists($this, 'setExpectedException')) { + $this->setExpectedException('Bit3\GitPhp\GitException'); + } else { + $this->expectException('Bit3\GitPhp\GitException'); + } + $this->uninitializedGitRepository->describe()->execute(); } @@ -317,7 +339,12 @@ public function testRemoteSetUrlOnInitializedRepository() */ public function testRemoteSetUrlOnUninitializedRepository() { - $this->setExpectedException('Bit3\GitPhp\GitException'); + if (\method_exists($this, 'setExpectedException')) { + $this->setExpectedException('Bit3\GitPhp\GitException'); + } else { + $this->expectException('Bit3\GitPhp\GitException'); + } + $this->uninitializedGitRepository->remote()->setUrl('local', $this->initializedRepositoryPath)->execute(); } @@ -358,7 +385,12 @@ public function testRemoteSetPushUrlOnInitializedRepository() */ public function testRemoteSetPushUrlOnUninitializedRepository() { - $this->setExpectedException('Bit3\GitPhp\GitException'); + if (\method_exists($this, 'setExpectedException')) { + $this->setExpectedException('Bit3\GitPhp\GitException'); + } else { + $this->expectException('Bit3\GitPhp\GitException'); + } + $this->uninitializedGitRepository->remote()->setPushUrl('local', $this->initializedRepositoryPath)->execute(); } @@ -389,7 +421,12 @@ public function testRemoteAddOnInitializedRepository() */ public function testRemoteAddOnUninitializedRepository() { - $this->setExpectedException('Bit3\GitPhp\GitException'); + if (\method_exists($this, 'setExpectedException')) { + $this->setExpectedException('Bit3\GitPhp\GitException'); + } else { + $this->expectException('Bit3\GitPhp\GitException'); + } + $this->uninitializedGitRepository->remote()->add('origin', $this->initializedRepositoryPath)->execute(); } @@ -426,7 +463,12 @@ public function testRemoteFetchOnInitializedRepository() */ public function testRemoteFetchOnUninitializedRepository() { - $this->setExpectedException('Bit3\GitPhp\GitException'); + if (\method_exists($this, 'setExpectedException')) { + $this->setExpectedException('Bit3\GitPhp\GitException'); + } else { + $this->expectException('Bit3\GitPhp\GitException'); + } + $this->uninitializedGitRepository->fetch()->execute(); } @@ -460,7 +502,12 @@ public function testCheckoutOnInitializedRepository() */ public function testCheckoutOnUninitializedRepository() { - $this->setExpectedException('Bit3\GitPhp\GitException'); + if (\method_exists($this, 'setExpectedException')) { + $this->setExpectedException('Bit3\GitPhp\GitException'); + } else { + $this->expectException('Bit3\GitPhp\GitException'); + } + $this->uninitializedGitRepository->checkout()->execute('foo'); } @@ -475,7 +522,12 @@ public function testPushOnInitializedRepository() */ public function testPushOnUninitializedRepository() { - $this->setExpectedException('Bit3\GitPhp\GitException'); + if (\method_exists($this, 'setExpectedException')) { + $this->setExpectedException('Bit3\GitPhp\GitException'); + } else { + $this->expectException('Bit3\GitPhp\GitException'); + } + $this->uninitializedGitRepository->push()->execute('foo'); } @@ -502,7 +554,12 @@ public function testStatusOnInitializedRepository() */ public function testStatusOnUninitializedRepository() { - $this->setExpectedException('Bit3\GitPhp\GitException'); + if (\method_exists($this, 'setExpectedException')) { + $this->setExpectedException('Bit3\GitPhp\GitException'); + } else { + $this->expectException('Bit3\GitPhp\GitException'); + } + $this->uninitializedGitRepository->status()->getStatus(); } @@ -533,7 +590,12 @@ public function testAddOnInitializedRepository() */ public function testAddOnUninitializedRepository() { - $this->setExpectedException('Bit3\GitPhp\GitException'); + if (\method_exists($this, 'setExpectedException')) { + $this->setExpectedException('Bit3\GitPhp\GitException'); + } else { + $this->expectException('Bit3\GitPhp\GitException'); + } + $this->uninitializedGitRepository->add()->execute('unknown-file.txt'); } @@ -564,7 +626,12 @@ public function testRmOnInitializedRepository() */ public function testRmOnUninitializedRepository() { - $this->setExpectedException('Bit3\GitPhp\GitException'); + if (\method_exists($this, 'setExpectedException')) { + $this->setExpectedException('Bit3\GitPhp\GitException'); + } else { + $this->expectException('Bit3\GitPhp\GitException'); + } + $this->uninitializedGitRepository->rm()->execute('existing-file.txt'); } @@ -603,7 +670,12 @@ public function testCommitOnInitializedRepository() */ public function testCommitOnUninitializedRepository() { - $this->setExpectedException('Bit3\GitPhp\GitException'); + if (\method_exists($this, 'setExpectedException')) { + $this->setExpectedException('Bit3\GitPhp\GitException'); + } else { + $this->expectException('Bit3\GitPhp\GitException'); + } + $this->uninitializedGitRepository->commit()->message('Commit changes')->execute(); } @@ -635,7 +707,12 @@ public function testTagOnInitializedRepository() */ public function testTagOnUninitializedRepository() { - $this->setExpectedException('Bit3\GitPhp\GitException'); + if (\method_exists($this, 'setExpectedException')) { + $this->setExpectedException('Bit3\GitPhp\GitException'); + } else { + $this->expectException('Bit3\GitPhp\GitException'); + } + $this->uninitializedGitRepository->tag()->execute('unit-test'); } } From f2f8e56bc7e37945318e09271dd8ffe4eaa0b62d Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Sat, 25 Aug 2018 21:42:39 +0200 Subject: [PATCH 20/48] Update symfony and php requirements --- composer.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index b8bdbac..f58fb21 100644 --- a/composer.json +++ b/composer.json @@ -3,13 +3,13 @@ "description": "Easy to use GIT wrapper for PHP.", "license": "MIT", "require": { - "php": ">=5.3", - "psr/log": "~1.0", - "symfony/process": "~2.3 | ~3.0" + "php": "^5.6 || ^7.0", + "psr/log": "^1.0", + "symfony/process": "^3.4 || ^4.0" }, "require-dev": { - "symfony/filesystem": "~2.3 | ~3.0", - "phpcq/all-tasks": "~1.1" + "symfony/filesystem": "^3.4 || ^4.0", + "phpcq/all-tasks": "^1.1" }, "autoload": { "psr-4": { From 6251c0699bc6a1621e373d17741bfa53a053e76a Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Sat, 25 Aug 2018 21:59:05 +0200 Subject: [PATCH 21/48] Remove the deprecated process builder --- src/Command/AbstractCommandBuilder.php | 53 ++++++-- src/Command/AddCommandBuilder.php | 31 ++--- src/Command/BranchCommandBuilder.php | 58 ++++---- src/Command/CheckoutCommandBuilder.php | 52 +++----- src/Command/CloneCommandBuilder.php | 57 ++++---- src/Command/CommitCommandBuilder.php | 75 +++++------ src/Command/ConfigCommandBuilder.php | 79 +++++------ src/Command/DescribeCommandBuilder.php | 34 ++--- src/Command/FetchCommandBuilder.php | 50 +++---- src/Command/InitCommandBuilder.php | 17 +-- src/Command/LogCommandBuilder.php | 177 +++++++++++++------------ src/Command/LsRemoteCommandBuilder.php | 18 +-- src/Command/MergeCommandBuilder.php | 15 ++- src/Command/PullCommandBuilder.php | 15 ++- src/Command/PushCommandBuilder.php | 53 ++++---- src/Command/RemoteCommandBuilder.php | 89 +++++++++---- src/Command/ResetCommandBuilder.php | 25 ++-- src/Command/RevParseCommandBuilder.php | 69 +++++----- src/Command/RmCommandBuilder.php | 21 +-- src/Command/ShortLogCommandBuilder.php | 21 +-- src/Command/ShowCommandBuilder.php | 33 ++--- src/Command/StashCommandBuilder.php | 49 +++---- src/Command/StatusCommandBuilder.php | 29 ++-- src/Command/TagCommandBuilder.php | 44 +++--- tests/GitRepositoryTest.php | 78 +++++------ 25 files changed, 659 insertions(+), 583 deletions(-) diff --git a/src/Command/AbstractCommandBuilder.php b/src/Command/AbstractCommandBuilder.php index c09a74f..93ccaa0 100644 --- a/src/Command/AbstractCommandBuilder.php +++ b/src/Command/AbstractCommandBuilder.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Tristan Lins * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -23,7 +24,8 @@ use Bit3\GitPhp\GitException; use Bit3\GitPhp\GitRepository; -use Symfony\Component\Process\ProcessBuilder; +use Symfony\Component\Process\Exception\LogicException; +use Symfony\Component\Process\Process; /** * Abstract command builder. @@ -40,18 +42,25 @@ abstract class AbstractCommandBuilder implements CommandBuilderInterface public $repository; /** - * The process builder in use. + * The directory in their the process called. * - * @var ProcessBuilder + * @var string */ - protected $processBuilder; + protected $workingDirectory; + + /** + * The arguments for the command line process. + * + * @var array + */ + protected $arguments = []; /** * The process output. * * @var null|string */ - protected $output = null; + protected $output; /** * Flag if we want to dry run. @@ -67,11 +76,9 @@ abstract class AbstractCommandBuilder implements CommandBuilderInterface */ public function __construct(GitRepository $repository) { - $this->repository = $repository; - - $this->processBuilder = new ProcessBuilder(); - $this->processBuilder->setWorkingDirectory($repository->getRepositoryPath()); - $this->processBuilder->add($this->repository->getConfig()->getGitExecutablePath()); + $this->repository = $repository; + $this->workingDirectory = $repository->getRepositoryPath(); + $this->arguments[] = $this->repository->getConfig()->getGitExecutablePath(); $this->initializeProcessBuilder(); } @@ -106,6 +113,26 @@ public function getOutput() return $this->output; } + /** + * Build the the command line process. + * + * @return Process + * + * @throws LogicException In case no arguments have been provided. + */ + protected function buildProcess() + { + if (!\count($this->arguments)) { + throw new LogicException('You must add command arguments before the process can build.'); + } + + $process = new Process($this->arguments, $this->workingDirectory); + + $process->setCommandLine($process->getCommandLine()); + + return $process; + } + /** * Execute the command. * @@ -115,7 +142,7 @@ public function getOutput() */ protected function run() { - $process = $this->processBuilder->getProcess(); + $process = $this->buildProcess(); if ($this->output !== null) { throw new GitException( @@ -128,7 +155,7 @@ protected function run() } $this->repository->getConfig()->getLogger()->debug( - sprintf('[ccabs-repository-git] exec [%s] %s', $process->getWorkingDirectory(), $process->getCommandLine()) + sprintf('[ccabs-repository-git] exec [%s] %s', $this->workingDirectory, $process->getCommandLine()) ); if ($this->dryRun) { diff --git a/src/Command/AddCommandBuilder.php b/src/Command/AddCommandBuilder.php index 9d7d651..b7546fa 100644 --- a/src/Command/AddCommandBuilder.php +++ b/src/Command/AddCommandBuilder.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Tristan Lins * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -33,7 +34,7 @@ class AddCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('add'); + $this->arguments[] = 'add'; } /** @@ -43,7 +44,7 @@ protected function initializeProcessBuilder() */ public function dryRun() { - $this->processBuilder->add('--dry-run'); + $this->arguments[] = '--dry-run'; return $this; } @@ -54,7 +55,7 @@ public function dryRun() */ public function verbose() { - $this->processBuilder->add('--verbose'); + $this->arguments[] = '--verbose'; return $this; } @@ -65,7 +66,7 @@ public function verbose() */ public function force() { - $this->processBuilder->add('--force'); + $this->arguments[] = '--force'; return $this; } @@ -76,7 +77,7 @@ public function force() */ public function patch() { - $this->processBuilder->add('--patch'); + $this->arguments[] = '--patch'; return $this; } @@ -87,7 +88,7 @@ public function patch() */ public function update() { - $this->processBuilder->add('--update'); + $this->arguments[] = '--update'; return $this; } @@ -98,7 +99,7 @@ public function update() */ public function all() { - $this->processBuilder->add('--all'); + $this->arguments[] = '--all'; return $this; } @@ -109,7 +110,7 @@ public function all() */ public function noAll() { - $this->processBuilder->add('--no-all'); + $this->arguments[] = '--no-all'; return $this; } @@ -120,7 +121,7 @@ public function noAll() */ public function intentToAdd() { - $this->processBuilder->add('--intent-to-add'); + $this->arguments[] = '--intent-to-add'; return $this; } @@ -131,7 +132,7 @@ public function intentToAdd() */ public function refresh() { - $this->processBuilder->add('--refresh'); + $this->arguments[] = '--refresh'; return $this; } @@ -142,7 +143,7 @@ public function refresh() */ public function ignoreErrors() { - $this->processBuilder->add('--ignore-errors'); + $this->arguments[] = '--ignore-errors'; return $this; } @@ -153,7 +154,7 @@ public function ignoreErrors() */ public function ignoreMissing() { - $this->processBuilder->add('--ignore-missing'); + $this->arguments[] = '--ignore-missing'; return $this; } @@ -174,9 +175,9 @@ public function execute($pathspec = null, $_ = null) { $args = func_get_args(); if (count($args)) { - $this->processBuilder->add('--'); + $this->arguments[] = '--'; foreach ($args as $pathspec) { - $this->processBuilder->add($pathspec); + $this->arguments[] = $pathspec; } } return parent::run(); diff --git a/src/Command/BranchCommandBuilder.php b/src/Command/BranchCommandBuilder.php index a922371..054f98e 100644 --- a/src/Command/BranchCommandBuilder.php +++ b/src/Command/BranchCommandBuilder.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Tristan Lins * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -39,7 +40,7 @@ class BranchCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('branch'); + $this->arguments[] = 'branch'; } /** @@ -49,7 +50,7 @@ protected function initializeProcessBuilder() */ public function delete() { - $this->processBuilder->add('-D'); + $this->arguments[] = '-D'; return $this; } @@ -60,7 +61,7 @@ public function delete() */ public function createReflog() { - $this->processBuilder->add('--create-reflog'); + $this->arguments[] = '--create-reflog'; return $this; } @@ -71,7 +72,7 @@ public function createReflog() */ public function force() { - $this->processBuilder->add('--force'); + $this->arguments[] = '--force'; return $this; } @@ -84,9 +85,9 @@ public function force() */ public function move($oldName = false) { - $this->processBuilder->add('-M'); + $this->arguments[] = '-M'; if ($oldName) { - $this->processBuilder->add($oldName); + $this->arguments[] = $oldName; } return $this; } @@ -104,7 +105,7 @@ public function move($oldName = false) */ public function color($when) { - $this->processBuilder->add('--color=' . $when); + $this->arguments[] = '--color=' . $when; return $this; } @@ -115,7 +116,7 @@ public function color($when) */ public function noColor() { - $this->processBuilder->add('--no-color'); + $this->arguments[] = '--no-color'; return $this; } @@ -128,7 +129,7 @@ public function noColor() */ public function column($options = false) { - $this->processBuilder->add('--column' . ($options ? '=' . $options : '')); + $this->arguments[] = '--column' . ($options ? '=' . $options : ''); return $this; } @@ -139,7 +140,7 @@ public function column($options = false) */ public function noColumn() { - $this->processBuilder->add('--no-column'); + $this->arguments[] = '--no-column'; return $this; } @@ -150,7 +151,7 @@ public function noColumn() */ public function remotes() { - $this->processBuilder->add('--remotes'); + $this->arguments[] = '--remotes'; return $this; } @@ -161,7 +162,7 @@ public function remotes() */ public function all() { - $this->processBuilder->add('--all'); + $this->arguments[] = '--all'; return $this; } @@ -172,7 +173,7 @@ public function all() */ public function listBranches() { - $this->processBuilder->add('--list'); + $this->arguments[] = '--list'; return $this; } @@ -183,7 +184,7 @@ public function listBranches() */ public function verbose() { - $this->processBuilder->add('--verbose'); + $this->arguments[] = '--verbose'; return $this; } @@ -194,7 +195,7 @@ public function verbose() */ public function quiet() { - $this->processBuilder->add('--quiet'); + $this->arguments[] = '--quiet'; return $this; } @@ -207,7 +208,7 @@ public function quiet() */ public function abbrev($length) { - $this->processBuilder->add('--abbrev=' . $length); + $this->arguments[] = '--abbrev=' . $length; return $this; } @@ -218,7 +219,7 @@ public function abbrev($length) */ public function noAbbrev() { - $this->processBuilder->add('--no-abbrev'); + $this->arguments[] = '--no-abbrev'; return $this; } @@ -229,7 +230,7 @@ public function noAbbrev() */ public function track() { - $this->processBuilder->add('--track'); + $this->arguments[] = '--track'; return $this; } @@ -240,7 +241,7 @@ public function track() */ public function noTrack() { - $this->processBuilder->add('--no-track'); + $this->arguments[] = '--no-track'; return $this; } @@ -251,7 +252,7 @@ public function noTrack() */ public function setUpstream() { - $this->processBuilder->add('--set-upstream'); + $this->arguments[] = '--set-upstream'; return $this; } @@ -264,7 +265,7 @@ public function setUpstream() */ public function setUpstreamTo($upstream) { - $this->processBuilder->add('--set-upstream-to=' . $upstream); + $this->arguments[] = '--set-upstream-to=' . $upstream; return $this; } @@ -275,7 +276,7 @@ public function setUpstreamTo($upstream) */ public function unsetUpstream() { - $this->processBuilder->add('--unset-upstream'); + $this->arguments[] = '--unset-upstream'; return $this; } @@ -288,7 +289,8 @@ public function unsetUpstream() */ public function contains($commit) { - $this->processBuilder->add('--contains')->add($commit); + $this->arguments[] = '--contains'; + $this->arguments[] = $commit; return $this; } @@ -301,7 +303,8 @@ public function contains($commit) */ public function merged($commit) { - $this->processBuilder->add('--merged')->add($commit); + $this->arguments[] = '--merged'; + $this->arguments[] = $commit; return $this; } @@ -314,7 +317,8 @@ public function merged($commit) */ public function noMerged($commit) { - $this->processBuilder->add('--no-merged')->add($commit); + $this->arguments[] = '--no-merged'; + $this->arguments[] = $commit; return $this; } @@ -328,7 +332,7 @@ public function noMerged($commit) public function execute($branchName = null) { if ($branchName) { - $this->processBuilder->add($branchName); + $this->arguments[] = $branchName; } return parent::run(); } diff --git a/src/Command/CheckoutCommandBuilder.php b/src/Command/CheckoutCommandBuilder.php index 5318711..296a716 100644 --- a/src/Command/CheckoutCommandBuilder.php +++ b/src/Command/CheckoutCommandBuilder.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Tristan Lins * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -33,7 +34,7 @@ class CheckoutCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('checkout'); + $this->arguments[] = 'checkout'; } /** @@ -43,7 +44,7 @@ protected function initializeProcessBuilder() */ public function quiet() { - $this->processBuilder->add('--quiet'); + $this->arguments[] = '--quiet'; return $this; } @@ -54,7 +55,7 @@ public function quiet() */ public function force() { - $this->processBuilder->add('--force'); + $this->arguments[] = '--force'; return $this; } @@ -65,7 +66,7 @@ public function force() */ public function ours() { - $this->processBuilder->add('--ours'); + $this->arguments[] = '--ours'; return $this; } @@ -76,7 +77,7 @@ public function ours() */ public function theirs() { - $this->processBuilder->add('--theirs'); + $this->arguments[] = '--theirs'; return $this; } @@ -87,7 +88,7 @@ public function theirs() */ public function create() { - $this->processBuilder->add('-b'); + $this->arguments[] = '-b'; return $this; } @@ -98,7 +99,7 @@ public function create() */ public function overwrite() { - $this->processBuilder->add('-B'); + $this->arguments[] = '-B'; return $this; } @@ -109,7 +110,7 @@ public function overwrite() */ public function track() { - $this->processBuilder->add('--track'); + $this->arguments[] = '--track'; return $this; } @@ -120,7 +121,7 @@ public function track() */ public function noTrack() { - $this->processBuilder->add('--no-track'); + $this->arguments[] = '--no-track'; return $this; } @@ -131,18 +132,7 @@ public function noTrack() */ public function reflog() { - $this->processBuilder->add('-l'); - return $this; - } - - /** - * Add the detach option to the command line. - * - * @return CheckoutCommandBuilder - */ - public function detach() - { - $this->processBuilder->add('--detach'); + $this->arguments[] = '-l'; return $this; } @@ -155,9 +145,9 @@ public function detach() */ public function orphan($newBranch = null) { - $this->processBuilder->add('--orphan'); + $this->arguments[] = '--orphan'; if ($newBranch) { - $this->processBuilder->add($newBranch); + $this->arguments[] = $newBranch; } return $this; } @@ -169,7 +159,7 @@ public function orphan($newBranch = null) */ public function ignoreSkipWorktreeBits() { - $this->processBuilder->add('--ignore-skip-worktree-bits'); + $this->arguments[] = '--ignore-skip-worktree-bits'; return $this; } @@ -180,7 +170,7 @@ public function ignoreSkipWorktreeBits() */ public function merge() { - $this->processBuilder->add('--merge'); + $this->arguments[] = '--merge'; return $this; } @@ -193,7 +183,7 @@ public function merge() */ public function conflict($style) { - $this->processBuilder->add('--conflict=' . $style); + $this->arguments[] = '--conflict=' . $style; return $this; } @@ -204,7 +194,7 @@ public function conflict($style) */ public function patch() { - $this->processBuilder->add('--patch'); + $this->arguments[] = '--patch'; return $this; } @@ -226,15 +216,15 @@ public function patch() public function execute($branchOrTreeIsh = null, $path = null, $_ = null) { if ($branchOrTreeIsh) { - $this->processBuilder->add($branchOrTreeIsh); + $this->arguments[] = $branchOrTreeIsh; } $paths = func_get_args(); array_shift($paths); if (count($paths)) { - $this->processBuilder->add('--'); + $this->arguments[] = '--'; foreach ($paths as $path) { - $this->processBuilder->add($path); + $this->arguments[] = $path; } } diff --git a/src/Command/CloneCommandBuilder.php b/src/Command/CloneCommandBuilder.php index e540f58..ef5d9cb 100644 --- a/src/Command/CloneCommandBuilder.php +++ b/src/Command/CloneCommandBuilder.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Tristan Lins * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -33,7 +34,7 @@ class CloneCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('clone'); + $this->arguments[] = 'clone'; } /** @@ -43,7 +44,7 @@ protected function initializeProcessBuilder() */ public function local() { - $this->processBuilder->add('--local'); + $this->arguments[] = '--local'; return $this; } @@ -54,7 +55,7 @@ public function local() */ public function noHardlinks() { - $this->processBuilder->add('--no-hardlinks'); + $this->arguments[] = '--no-hardlinks'; return $this; } @@ -65,7 +66,7 @@ public function noHardlinks() */ public function shared() { - $this->processBuilder->add('--shared'); + $this->arguments[] = '--shared'; return $this; } @@ -78,7 +79,8 @@ public function shared() */ public function reference($repository) { - $this->processBuilder->add('--reference')->add($repository); + $this->arguments[] = '--reference'; + $this->arguments[] = $repository; return $this; } @@ -89,7 +91,7 @@ public function reference($repository) */ public function quiet() { - $this->processBuilder->add('--quiet'); + $this->arguments[] = '--quiet'; return $this; } @@ -100,7 +102,7 @@ public function quiet() */ public function verbose() { - $this->processBuilder->add('--verbose'); + $this->arguments[] = '--verbose'; return $this; } @@ -111,7 +113,7 @@ public function verbose() */ public function progress() { - $this->processBuilder->add('--progress'); + $this->arguments[] = '--progress'; return $this; } @@ -122,7 +124,7 @@ public function progress() */ public function noCheckout() { - $this->processBuilder->add('--no-checkout'); + $this->arguments[] = '--no-checkout'; return $this; } @@ -133,7 +135,7 @@ public function noCheckout() */ public function bare() { - $this->processBuilder->add('--bare'); + $this->arguments[] = '--bare'; return $this; } @@ -144,7 +146,7 @@ public function bare() */ public function mirror() { - $this->processBuilder->add('--mirror'); + $this->arguments[] = '--mirror'; return $this; } @@ -157,7 +159,8 @@ public function mirror() */ public function origin($name) { - $this->processBuilder->add('--origin')->add($name); + $this->arguments[] = '--origin'; + $this->arguments[] = $name; return $this; } @@ -170,7 +173,8 @@ public function origin($name) */ public function branch($name) { - $this->processBuilder->add('--branch')->add($name); + $this->arguments[] = '--branch'; + $this->arguments[] = $name; return $this; } @@ -183,7 +187,8 @@ public function branch($name) */ public function uploadPack($uploadPack) { - $this->processBuilder->add('--upload-pack')->add($uploadPack); + $this->arguments[] = '--upload-pack'; + $this->arguments[] = $uploadPack; return $this; } @@ -196,7 +201,7 @@ public function uploadPack($uploadPack) */ public function template($templateDirectory) { - $this->processBuilder->add('--template=' . $templateDirectory); + $this->arguments[] = '--template=' . $templateDirectory; return $this; } @@ -211,20 +216,22 @@ public function template($templateDirectory) */ public function config($key, $value) { - $this->processBuilder->add('--config')->add($key . '=' . $value); + $this->arguments[] = '--config'; + $this->arguments[] = $key . '=' . $value; return $this; } /** * Add the depth option to the command line. * - * @param string $depth The depth. + * @param string $depth The depth.arguments[] = rn CloneCommandBuildr. * * @return CloneCommandBuilder */ public function depth($depth) { - $this->processBuilder->add('--depth')->add($depth); + $this->arguments[] = '--depth'; + $this->arguments[] = $depth; return $this; } @@ -235,7 +242,7 @@ public function depth($depth) */ public function noSingleBranch() { - $this->processBuilder->add('--no-single-branch'); + $this->arguments[] = '--no-single-branch'; return $this; } @@ -246,7 +253,7 @@ public function noSingleBranch() */ public function singleBranch() { - $this->processBuilder->add('--single-branch'); + $this->arguments[] = '--single-branch'; return $this; } @@ -257,7 +264,7 @@ public function singleBranch() */ public function recursive() { - $this->processBuilder->add('--recursive'); + $this->arguments[] = '--recursive'; return $this; } @@ -270,7 +277,7 @@ public function recursive() */ public function separateGitDir($gitDir) { - $this->processBuilder->add('--separate-git-dir=' . $gitDir); + $this->arguments[] = '--separate-git-dir=' . $gitDir; return $this; } @@ -283,8 +290,8 @@ public function separateGitDir($gitDir) */ public function execute($repositoryUrl) { - $this->processBuilder->add($repositoryUrl); - $this->processBuilder->add($this->repository->getRepositoryPath()); + $this->arguments[] = $repositoryUrl; + $this->arguments[] = $this->repository->getRepositoryPath(); return parent::run(); } } diff --git a/src/Command/CommitCommandBuilder.php b/src/Command/CommitCommandBuilder.php index 7e92067..0dcb5b3 100644 --- a/src/Command/CommitCommandBuilder.php +++ b/src/Command/CommitCommandBuilder.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Tristan Lins * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -54,7 +55,7 @@ class CommitCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('commit'); + $this->arguments[] = 'commit'; } /** @@ -64,7 +65,7 @@ protected function initializeProcessBuilder() */ public function all() { - $this->processBuilder->add('--all'); + $this->arguments[] = '--all'; return $this; } @@ -75,7 +76,7 @@ public function all() */ public function patch() { - $this->processBuilder->add('--patch'); + $this->arguments[] = '--patch'; return $this; } @@ -88,7 +89,7 @@ public function patch() */ public function reuseMessage($commit) { - $this->processBuilder->add('--reuse-message=' . $commit); + $this->arguments[] = '--reuse-message=' . $commit; return $this; } @@ -101,7 +102,7 @@ public function reuseMessage($commit) */ public function fixup($commit) { - $this->processBuilder->add('--fixup=' . $commit); + $this->arguments[] = '--fixup=' . $commit; return $this; } @@ -114,7 +115,7 @@ public function fixup($commit) */ public function squash($commit) { - $this->processBuilder->add('--squash=' . $commit); + $this->arguments[] = '--squash=' . $commit; return $this; } @@ -125,7 +126,7 @@ public function squash($commit) */ public function resetAuthor() { - $this->processBuilder->add('--reset-author'); + $this->arguments[] = '--reset-author'; return $this; } @@ -136,7 +137,7 @@ public function resetAuthor() */ public function short() { - $this->processBuilder->add('--short'); + $this->arguments[] = '--short'; return $this; } @@ -147,7 +148,7 @@ public function short() */ public function branch() { - $this->processBuilder->add('--branch'); + $this->arguments[] = '--branch'; return $this; } @@ -158,7 +159,7 @@ public function branch() */ public function porcelain() { - $this->processBuilder->add('--porcelain'); + $this->arguments[] = '--porcelain'; return $this; } @@ -169,7 +170,7 @@ public function porcelain() */ public function long() { - $this->processBuilder->add('--long'); + $this->arguments[] = '--long'; return $this; } @@ -180,7 +181,7 @@ public function long() */ public function null() { - $this->processBuilder->add('--null'); + $this->arguments[] = '--null'; return $this; } @@ -193,7 +194,7 @@ public function null() */ public function file($file) { - $this->processBuilder->add('--file=' . $file); + $this->arguments[] = '--file=' . $file; return $this; } @@ -206,7 +207,7 @@ public function file($file) */ public function author($author) { - $this->processBuilder->add('--author=' . $author); + $this->arguments[] = '--author=' . $author; return $this; } @@ -222,7 +223,7 @@ public function date($date) if ($date instanceof \DateTime) { $date = $date->format('Y-m-d H:i:s'); } - $this->processBuilder->add('--date=' . $date); + $this->arguments[] = '--date=' . $date; return $this; } @@ -235,7 +236,7 @@ public function date($date) */ public function message($message) { - $this->processBuilder->add('--message=' . $message); + $this->arguments[] = '--message=' . $message; return $this; } @@ -248,7 +249,7 @@ public function message($message) */ public function template($file) { - $this->processBuilder->add('--template=' . $file); + $this->arguments[] = '--template=' . $file; return $this; } @@ -259,7 +260,7 @@ public function template($file) */ public function signoff() { - $this->processBuilder->add('--signoff'); + $this->arguments[] = '--signoff'; return $this; } @@ -270,7 +271,7 @@ public function signoff() */ public function noVerity() { - $this->processBuilder->add('--no-verify'); + $this->arguments[] = '--no-verify'; return $this; } @@ -281,7 +282,7 @@ public function noVerity() */ public function allowEmpty() { - $this->processBuilder->add('--allow-empty'); + $this->arguments[] = '--allow-empty'; return $this; } @@ -292,7 +293,7 @@ public function allowEmpty() */ public function allowEmptyMessage() { - $this->processBuilder->add('--allow-empty-message'); + $this->arguments[] = '--allow-empty-message'; return $this; } @@ -305,7 +306,7 @@ public function allowEmptyMessage() */ public function cleanup($mode) { - $this->processBuilder->add('--cleanup=' . $mode); + $this->arguments[] = '--cleanup=' . $mode; return $this; } @@ -316,7 +317,7 @@ public function cleanup($mode) */ public function amend() { - $this->processBuilder->add('--amend'); + $this->arguments[] = '--amend'; return $this; } @@ -327,7 +328,7 @@ public function amend() */ public function noPostRewrite() { - $this->processBuilder->add('--no-post-rewrite'); + $this->arguments[] = '--no-post-rewrite'; return $this; } @@ -338,7 +339,7 @@ public function noPostRewrite() */ public function includ() { - $this->processBuilder->add('--include'); + $this->arguments[] = '--include'; return $this; } @@ -349,7 +350,7 @@ public function includ() */ public function only() { - $this->processBuilder->add('--only'); + $this->arguments[] = '--only'; return $this; } @@ -362,7 +363,7 @@ public function only() */ public function untrackedFiles($mode = null) { - $this->processBuilder->add('--untracked-files' . ($mode ? '=' . $mode : '')); + $this->arguments[] = '--untracked-files' . ($mode ? '=' . $mode : ''); return $this; } @@ -373,7 +374,7 @@ public function untrackedFiles($mode = null) */ public function verbose() { - $this->processBuilder->add('--verbose'); + $this->arguments[] = '--verbose'; return $this; } @@ -384,7 +385,7 @@ public function verbose() */ public function quiet() { - $this->processBuilder->add('--quiet'); + $this->arguments[] = '--quiet'; return $this; } @@ -395,7 +396,7 @@ public function quiet() */ public function dryRun() { - $this->processBuilder->add('--dry-run'); + $this->arguments[] = '--dry-run'; return $this; } @@ -406,7 +407,7 @@ public function dryRun() */ public function status() { - $this->processBuilder->add('--status'); + $this->arguments[] = '--status'; return $this; } @@ -417,7 +418,7 @@ public function status() */ public function noStatus() { - $this->processBuilder->add('--no-status'); + $this->arguments[] = '--no-status'; return $this; } @@ -431,7 +432,7 @@ public function noStatus() public function gpgSign($keyId = null) { $this->gpgSignIsset = true; - $this->processBuilder->add('--gpg-sign' . ($keyId ? '=' . $keyId : '')); + $this->arguments[] = '--gpg-sign' . ($keyId ? '=' . $keyId : ''); return $this; } @@ -451,7 +452,7 @@ public function gpgSign($keyId = null) public function execute($pathspec = null, $_ = null) { // prevent launching the editor - $this->processBuilder->add('--no-edit'); + $this->arguments[] = '--no-edit'; if (!$this->gpgSignIsset && $this->repository->getConfig()->isSignCommitsEnabled()) { $this->gpgSign($this->repository->getConfig()->getSignCommitUser()); @@ -459,9 +460,9 @@ public function execute($pathspec = null, $_ = null) $args = func_get_args(); if (count($args)) { - $this->processBuilder->add('--'); + $this->arguments[] = '--'; foreach ($args as $pathspec) { - $this->processBuilder->add($pathspec); + $this->arguments[] = $pathspec; } } diff --git a/src/Command/ConfigCommandBuilder.php b/src/Command/ConfigCommandBuilder.php index 7d4fcbe..ce33232 100644 --- a/src/Command/ConfigCommandBuilder.php +++ b/src/Command/ConfigCommandBuilder.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Matthew Gamble * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -33,7 +34,7 @@ class ConfigCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('config'); + $this->arguments[] = 'config'; } /** @@ -47,10 +48,10 @@ protected function initializeProcessBuilder() public function file($file) { if (in_array($file, array('global', 'system', 'local'))) { - $this->processBuilder->add('--' . $file); + $this->arguments[] = '--' . $file; } else { - $this->processBuilder->add('--file') - ->add($file); + $this->arguments[] = '--file'; + $this->arguments[] = $file; } return $this; } @@ -66,7 +67,7 @@ public function file($file) */ public function blob($blobId) { - $this->processBuilder->add('--blob ' . $blobId); + $this->arguments[] = '--blob ' . $blobId; return $this; } @@ -82,7 +83,7 @@ public function blob($blobId) public function type($type) { if (in_array($type, array('bool', 'int', 'bool-or-int', 'path'))) { - $this->processBuilder->add('--' . $type); + $this->arguments[] = '--' . $type; } else { throw new \InvalidArgumentException('Invalid configuration type supplied.'); } @@ -100,9 +101,9 @@ public function type($type) */ public function add($name, $value) { - $this->processBuilder->add('--add') - ->add($name) - ->add($value); + $this->arguments[] = '--add'; + $this->arguments[] = $name; + $this->arguments[] = $value; return $this; } @@ -119,11 +120,11 @@ public function add($name, $value) */ public function replaceAll($name, $value, $valueRegex = null) { - $this->processBuilder->add('--replace-all') - ->add($name) - ->add($value); + $this->arguments[] = '--replace-all'; + $this->arguments[] = $name; + $this->arguments[] = $value; if ($valueRegex !== null) { - $this->processBuilder->add($valueRegex); + $this->arguments[] = $valueRegex; } return $this; } @@ -135,7 +136,7 @@ public function replaceAll($name, $value, $valueRegex = null) */ public function terminateWithNUL() { - $this->processBuilder->add('--null'); + $this->arguments[] = '--null'; return $this; } @@ -150,7 +151,7 @@ public function terminateWithNUL() */ public function get($name, $valueRegex = null) { - $this->processBuilder->add('--get'); + $this->arguments[] = '--get'; $this->addNameAndPattern($name, $valueRegex); return $this; } @@ -166,7 +167,7 @@ public function get($name, $valueRegex = null) */ public function getAll($name, $valueRegex = null) { - $this->processBuilder->add('--get-all'); + $this->arguments[] = '--get-all'; $this->addNameAndPattern($name, $valueRegex); return $this; } @@ -182,7 +183,7 @@ public function getAll($name, $valueRegex = null) */ public function getRegexp($nameRegex, $valueRegex = null) { - $this->processBuilder->add('--get-regexp'); + $this->arguments[] = '--get-regexp'; $this->addNameAndPattern($nameRegex, $valueRegex); return $this; } @@ -198,7 +199,7 @@ public function getRegexp($nameRegex, $valueRegex = null) */ public function getUrlmatch($name, $url) { - $this->processBuilder->add('--get-urlmatch'); + $this->arguments[] = '--get-urlmatch'; $this->addNameAndPattern($name, $url); return $this; } @@ -214,7 +215,7 @@ public function getUrlmatch($name, $url) */ public function unsetOpt($name, $valueRegex = null) { - $this->processBuilder->add('--unset'); + $this->arguments[] = '--unset'; $this->addNameAndPattern($name, $valueRegex); return $this; } @@ -230,7 +231,7 @@ public function unsetOpt($name, $valueRegex = null) */ public function unsetAll($name, $valueRegex = null) { - $this->processBuilder->add('--unset-all'); + $this->arguments[] = '--unset-all'; $this->addNameAndPattern($name, $valueRegex); return $this; } @@ -246,9 +247,9 @@ public function unsetAll($name, $valueRegex = null) */ private function addNameAndPattern($name, $pattern) { - $this->processBuilder->add($name); + $this->arguments[] = $name; if ($pattern !== null) { - $this->processBuilder->add($pattern); + $this->arguments[] = $pattern; } } @@ -263,9 +264,9 @@ private function addNameAndPattern($name, $pattern) */ public function renameSection($oldName, $newName) { - $this->processBuilder->add('--rename-section') - ->add($oldName) - ->add($newName); + $this->arguments[] = '--rename-section'; + $this->arguments[] = $oldName; + $this->arguments[] = $newName; return $this; } @@ -278,8 +279,8 @@ public function renameSection($oldName, $newName) */ public function removeSection($name) { - $this->processBuilder->add('--remove-section') - ->add($name); + $this->arguments[] = '--remove-section'; + $this->arguments[] = $name; return $this; } @@ -290,7 +291,7 @@ public function removeSection($name) */ public function listOpt() { - $this->processBuilder->add('--list'); + $this->arguments[] = '--list'; return $this; } @@ -305,10 +306,10 @@ public function listOpt() */ public function getColor($name, $default = null) { - $this->processBuilder->add('--get-color') - ->add($name); + $this->arguments[] = '--get-color'; + $this->arguments[] = $name; if ($default !== null) { - $this->processBuilder->add($default); + $this->arguments[] = $default; } return $this; } @@ -324,10 +325,10 @@ public function getColor($name, $default = null) */ public function getColorBool($name, $stdoutIsTty = null) { - $this->processBuilder->add('--get-colorbool') - ->add($name); + $this->arguments[] = '--get-colorbool'; + $this->arguments[] = $name; if (is_bool($stdoutIsTty)) { - $this->processBuilder->add($stdoutIsTty ? 'true' : 'false'); + $this->arguments[] = $stdoutIsTty ? 'true' : 'false'; } return $this; } @@ -341,7 +342,7 @@ public function getColorBool($name, $stdoutIsTty = null) */ public function includes($allow = true) { - $this->processBuilder->add($allow ? '--includes' : '--no-includes'); + $this->arguments[] = $allow ? '--includes' : '--no-includes'; return $this; } @@ -363,11 +364,11 @@ public function includes($allow = true) public function execute($name = null, $value = null, $valueRegex = null) { if ($name !== null) { - $this->processBuilder->add($name); + $this->arguments[] = $name; if ($value !== null) { - $this->processBuilder->add($value); + $this->arguments[] = $value; if ($valueRegex !== null) { - $this->processBuilder->add($valueRegex); + $this->arguments[] = $valueRegex; } } } diff --git a/src/Command/DescribeCommandBuilder.php b/src/Command/DescribeCommandBuilder.php index d7fcbd2..afc8395 100644 --- a/src/Command/DescribeCommandBuilder.php +++ b/src/Command/DescribeCommandBuilder.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Tristan Lins * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -33,7 +34,7 @@ class DescribeCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('describe'); + $this->arguments[] = 'describe'; } /** @@ -45,9 +46,9 @@ protected function initializeProcessBuilder() */ public function dirty($mark = false) { - $this->processBuilder->add('--dirty'); + $this->arguments[] = '--dirty'; if ($mark) { - $this->processBuilder->add($mark); + $this->arguments[] = $mark; } return $this; } @@ -59,7 +60,7 @@ public function dirty($mark = false) */ public function all() { - $this->processBuilder->add('--all'); + $this->arguments[] = '--all'; return $this; } @@ -70,7 +71,7 @@ public function all() */ public function tags() { - $this->processBuilder->add('--tags'); + $this->arguments[] = '--tags'; return $this; } @@ -81,7 +82,7 @@ public function tags() */ public function contains() { - $this->processBuilder->add('--contains'); + $this->arguments[] = '--contains'; return $this; } @@ -96,7 +97,7 @@ public function contains() */ public function abbrev($n) { - $this->processBuilder->add('--abbrev=' . $n); + $this->arguments[] = '--abbrev=' . $n; return $this; } @@ -111,7 +112,7 @@ public function abbrev($n) */ public function candidates($n) { - $this->processBuilder->add('--candidates=' . $n); + $this->arguments[] = '--candidates=' . $n; return $this; } @@ -122,7 +123,7 @@ public function candidates($n) */ public function exactMatch() { - $this->processBuilder->add('--exact-match'); + $this->arguments[] = '--exact-match'; return $this; } @@ -133,7 +134,7 @@ public function exactMatch() */ public function debug() { - $this->processBuilder->add('--debug'); + $this->arguments[] = '--debug'; return $this; } @@ -144,7 +145,7 @@ public function debug() */ public function long() { - $this->processBuilder->add('--long'); + $this->arguments[] = '--long'; return $this; } @@ -157,7 +158,8 @@ public function long() */ public function match($pattern) { - $this->processBuilder->add('--match')->add($pattern); + $this->arguments[] = '--match'; + $this->arguments[] = $pattern; return $this; } @@ -168,7 +170,7 @@ public function match($pattern) */ public function always() { - $this->processBuilder->add('--always'); + $this->arguments[] = '--always'; return $this; } @@ -179,7 +181,7 @@ public function always() */ public function firstParent() { - $this->processBuilder->add('--first-parent'); + $this->arguments[] = '--first-parent'; return $this; } @@ -192,7 +194,7 @@ public function firstParent() */ public function execute($commit = 'HEAD') { - $this->processBuilder->add($commit); + $this->arguments[] = $commit; return parent::run(); } } diff --git a/src/Command/FetchCommandBuilder.php b/src/Command/FetchCommandBuilder.php index 7fa1c7d..1d8c392 100644 --- a/src/Command/FetchCommandBuilder.php +++ b/src/Command/FetchCommandBuilder.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Tristan Lins * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -39,7 +40,7 @@ class FetchCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('fetch'); + $this->arguments[] = 'fetch'; } /** @@ -49,7 +50,7 @@ protected function initializeProcessBuilder() */ public function all() { - $this->processBuilder->add('--all'); + $this->arguments[] = '--all'; return $this; } @@ -60,7 +61,7 @@ public function all() */ public function append() { - $this->processBuilder->add('--append'); + $this->arguments[] = '--append'; return $this; } @@ -73,7 +74,7 @@ public function append() */ public function depth($depth) { - $this->processBuilder->add('--depth=' . $depth); + $this->arguments[] = '--depth=' . $depth; return $this; } @@ -84,7 +85,7 @@ public function depth($depth) */ public function unshallow() { - $this->processBuilder->add('--unshallow'); + $this->arguments[] = '--unshallow'; return $this; } @@ -95,7 +96,7 @@ public function unshallow() */ public function updateShallow() { - $this->processBuilder->add('--update-shallow'); + $this->arguments[] = '--update-shallow'; return $this; } @@ -106,7 +107,7 @@ public function updateShallow() */ public function dryRun() { - $this->processBuilder->add('--dry-run'); + $this->arguments[] = '--dry-run'; return $this; } @@ -117,7 +118,7 @@ public function dryRun() */ public function force() { - $this->processBuilder->add('--force'); + $this->arguments[] = '--force'; return $this; } @@ -128,7 +129,7 @@ public function force() */ public function keep() { - $this->processBuilder->add('--keep'); + $this->arguments[] = '--keep'; return $this; } @@ -139,7 +140,7 @@ public function keep() */ public function multiple() { - $this->processBuilder->add('--multiple'); + $this->arguments[] = '--multiple'; return $this; } @@ -150,7 +151,7 @@ public function multiple() */ public function prune() { - $this->processBuilder->add('--prune'); + $this->arguments[] = '--prune'; return $this; } @@ -161,7 +162,7 @@ public function prune() */ public function noTags() { - $this->processBuilder->add('--no-tags'); + $this->arguments[] = '--no-tags'; return $this; } @@ -172,7 +173,7 @@ public function noTags() */ public function tags() { - $this->processBuilder->add('--tags'); + $this->arguments[] = '--tags'; return $this; } @@ -185,7 +186,7 @@ public function tags() */ public function recurseSubmodules($recurse = false) { - $this->processBuilder->add('--recurse-submodules' . ($recurse ? '=' . $recurse : '')); + $this->arguments[] = '--recurse-submodules' . ($recurse ? '=' . $recurse : ''); return $this; } @@ -196,7 +197,7 @@ public function recurseSubmodules($recurse = false) */ public function noRecurseSubmodules() { - $this->processBuilder->add('--no-recurse-submodules'); + $this->arguments[] = '--no-recurse-submodules'; return $this; } @@ -209,7 +210,7 @@ public function noRecurseSubmodules() */ public function submodulePrefix($path) { - $this->processBuilder->add('--submodule-prefix=' . $path); + $this->arguments[] = '--submodule-prefix=' . $path; return $this; } @@ -222,7 +223,7 @@ public function submodulePrefix($path) */ public function recurseSubmodulesDefault($recurse) { - $this->processBuilder->add('--recurse-submodules-default=' . $recurse); + $this->arguments[] = '--recurse-submodules-default=' . $recurse; return $this; } @@ -233,7 +234,7 @@ public function recurseSubmodulesDefault($recurse) */ public function updateHeadOk() { - $this->processBuilder->add('--update-head-ok'); + $this->arguments[] = '--update-head-ok'; return $this; } @@ -246,7 +247,8 @@ public function updateHeadOk() */ public function uploadPack($uploadPack) { - $this->processBuilder->add('--upload-pack')->add($uploadPack); + $this->arguments[] = '--upload-pack'; + $this->arguments[] = $uploadPack; return $this; } @@ -257,7 +259,7 @@ public function uploadPack($uploadPack) */ public function quiet() { - $this->processBuilder->add('--quiet'); + $this->arguments[] = '--quiet'; return $this; } @@ -268,7 +270,7 @@ public function quiet() */ public function verbose() { - $this->processBuilder->add('--verbose'); + $this->arguments[] = '--verbose'; return $this; } @@ -289,12 +291,12 @@ public function verbose() */ public function execute($repository = 'origin', $refspec = null, $_ = null) { - $this->processBuilder->add($repository); + $this->arguments[] = $repository; $refspecs = func_get_args(); array_shift($refspecs); foreach ($refspecs as $refspec) { - $this->processBuilder->add($refspec); + $this->arguments[] = $refspec; } return parent::run(); diff --git a/src/Command/InitCommandBuilder.php b/src/Command/InitCommandBuilder.php index 4a32fd2..865e011 100644 --- a/src/Command/InitCommandBuilder.php +++ b/src/Command/InitCommandBuilder.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Tristan Lins * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -45,7 +46,7 @@ class InitCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('init'); + $this->arguments[] = 'init'; } /** @@ -55,7 +56,7 @@ protected function initializeProcessBuilder() */ public function quiet() { - $this->processBuilder->add('--quiet'); + $this->arguments[] = '--quiet'; return $this; } @@ -66,7 +67,7 @@ public function quiet() */ public function bare() { - $this->processBuilder->add('--bare'); + $this->arguments[] = '--bare'; return $this; } @@ -79,7 +80,7 @@ public function bare() */ public function template($templateDirectory) { - $this->processBuilder->add('--template=' . $templateDirectory); + $this->arguments[] = '--template=' . $templateDirectory; return $this; } @@ -92,7 +93,7 @@ public function template($templateDirectory) */ public function separateGitDir($gitDir) { - $this->processBuilder->add('--separate-git-dir=' . $gitDir); + $this->arguments[] = '--separate-git-dir=' . $gitDir; return $this; } @@ -105,7 +106,7 @@ public function separateGitDir($gitDir) */ public function shared($share) { - $this->processBuilder->add('--shared=' . $share); + $this->arguments[] = '--shared=' . $share; return $this; } @@ -116,7 +117,7 @@ public function shared($share) */ public function execute() { - $this->processBuilder->add($this->repository->getRepositoryPath()); + $this->arguments[] = $this->repository->getRepositoryPath(); return parent::run(); } } diff --git a/src/Command/LogCommandBuilder.php b/src/Command/LogCommandBuilder.php index 78e9846..71e2786 100644 --- a/src/Command/LogCommandBuilder.php +++ b/src/Command/LogCommandBuilder.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Tristan Lins * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -60,7 +61,7 @@ class LogCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('log'); + $this->arguments[] = 'log'; } /** @@ -70,7 +71,7 @@ protected function initializeProcessBuilder() */ public function follow() { - $this->processBuilder->add('--follow'); + $this->arguments[] = '--follow'; return $this; } @@ -81,7 +82,7 @@ public function follow() */ public function noDecorate() { - $this->processBuilder->add('--no-decorate'); + $this->arguments[] = '--no-decorate'; return $this; } @@ -94,7 +95,7 @@ public function noDecorate() */ public function decorate($decorate) { - $this->processBuilder->add('--decorate' . ($decorate ? '=' . $decorate : '')); + $this->arguments[] = '--decorate' . ($decorate ? '=' . $decorate : ''); return $this; } @@ -105,7 +106,7 @@ public function decorate($decorate) */ public function source() { - $this->processBuilder->add('--source'); + $this->arguments[] = '--source'; return $this; } @@ -116,7 +117,7 @@ public function source() */ public function useMailmap() { - $this->processBuilder->add('--use-mailmap'); + $this->arguments[] = '--use-mailmap'; return $this; } @@ -127,7 +128,7 @@ public function useMailmap() */ public function fullDiff() { - $this->processBuilder->add('--full-diff'); + $this->arguments[] = '--full-diff'; return $this; } @@ -138,7 +139,7 @@ public function fullDiff() */ public function logSize() { - $this->processBuilder->add('--log-size'); + $this->arguments[] = '--log-size'; return $this; } @@ -151,7 +152,7 @@ public function logSize() */ public function revisionRange($revisionRange) { - $this->processBuilder->add($revisionRange); + $this->arguments[] = $revisionRange; return $this; } @@ -164,7 +165,7 @@ public function revisionRange($revisionRange) */ public function maxCount($number) { - $this->processBuilder->add('--max-count=' . $number); + $this->arguments[] = '--max-count=' . $number; return $this; } @@ -177,7 +178,7 @@ public function maxCount($number) */ public function skip($number) { - $this->processBuilder->add('--skip=' . $number); + $this->arguments[] = '--skip=' . $number; return $this; } @@ -193,7 +194,7 @@ public function since($date) if ($date instanceof \DateTime) { $date = $date->format('Y-m-d H:i:s'); } - $this->processBuilder->add('--since=' . $date); + $this->arguments[] = '--since=' . $date; return $this; } @@ -209,7 +210,7 @@ public function after($date) if ($date instanceof \DateTime) { $date = $date->format('Y-m-d H:i:s'); } - $this->processBuilder->add('--after=' . $date); + $this->arguments[] = '--after=' . $date; return $this; } @@ -225,7 +226,7 @@ public function until($date) if ($date instanceof \DateTime) { $date = $date->format('Y-m-d H:i:s'); } - $this->processBuilder->add('--until=' . $date); + $this->arguments[] = '--until=' . $date; return $this; } @@ -241,7 +242,7 @@ public function before($date) if ($date instanceof \DateTime) { $date = $date->format('Y-m-d H:i:s'); } - $this->processBuilder->add('--before=' . $date); + $this->arguments[] = '--before=' . $date; return $this; } @@ -254,7 +255,7 @@ public function before($date) */ public function author($pattern) { - $this->processBuilder->add('--author=' . $pattern); + $this->arguments[] = '--author=' . $pattern; return $this; } @@ -267,7 +268,7 @@ public function author($pattern) */ public function grepReflog($pattern) { - $this->processBuilder->add('--grep-reflog=' . $pattern); + $this->arguments[] = '--grep-reflog=' . $pattern; return $this; } @@ -280,7 +281,7 @@ public function grepReflog($pattern) */ public function grep($pattern) { - $this->processBuilder->add('--grep=' . $pattern); + $this->arguments[] = '--grep=' . $pattern; return $this; } @@ -291,7 +292,7 @@ public function grep($pattern) */ public function allMatch() { - $this->processBuilder->add('--all-match'); + $this->arguments[] = '--all-match'; return $this; } @@ -302,7 +303,7 @@ public function allMatch() */ public function regexpIgnoreCase() { - $this->processBuilder->add('--regexp-ignore-case'); + $this->arguments[] = '--regexp-ignore-case'; return $this; } @@ -313,7 +314,7 @@ public function regexpIgnoreCase() */ public function basicRegexp() { - $this->processBuilder->add('--basicRegexp'); + $this->arguments[] = '--basicRegexp'; return $this; } @@ -324,7 +325,7 @@ public function basicRegexp() */ public function extendedRegexp() { - $this->processBuilder->add('--extended-regexp'); + $this->arguments[] = '--extended-regexp'; return $this; } @@ -335,7 +336,7 @@ public function extendedRegexp() */ public function fixedStrings() { - $this->processBuilder->add('--fixed-strings'); + $this->arguments[] = '--fixed-strings'; return $this; } @@ -346,7 +347,7 @@ public function fixedStrings() */ public function perlRegexp() { - $this->processBuilder->add('--perl-regexp'); + $this->arguments[] = '--perl-regexp'; return $this; } @@ -357,7 +358,7 @@ public function perlRegexp() */ public function removeEmpty() { - $this->processBuilder->add('--remove-empty'); + $this->arguments[] = '--remove-empty'; return $this; } @@ -368,7 +369,7 @@ public function removeEmpty() */ public function merges() { - $this->processBuilder->add('--merges'); + $this->arguments[] = '--merges'; return $this; } @@ -379,7 +380,7 @@ public function merges() */ public function noMerges() { - $this->processBuilder->add('--no-merges'); + $this->arguments[] = '--no-merges'; return $this; } @@ -392,7 +393,7 @@ public function noMerges() */ public function minParents($number) { - $this->processBuilder->add('--min-parents=' . $number); + $this->arguments[] = '--min-parents=' . $number; return $this; } @@ -405,7 +406,7 @@ public function minParents($number) */ public function maxParents($number) { - $this->processBuilder->add('--max-parents=' . $number); + $this->arguments[] = '--max-parents=' . $number; return $this; } @@ -416,7 +417,7 @@ public function maxParents($number) */ public function noMinParents() { - $this->processBuilder->add('--no-min-parents'); + $this->arguments[] = '--no-min-parents'; return $this; } @@ -427,7 +428,7 @@ public function noMinParents() */ public function noMaxParents() { - $this->processBuilder->add('--no-max-parents'); + $this->arguments[] = '--no-max-parents'; return $this; } @@ -438,7 +439,7 @@ public function noMaxParents() */ public function firstParent() { - $this->processBuilder->add('--first-parent'); + $this->arguments[] = '--first-parent'; return $this; } @@ -449,7 +450,7 @@ public function firstParent() */ public function not() { - $this->processBuilder->add('--not'); + $this->arguments[] = '--not'; return $this; } @@ -460,7 +461,7 @@ public function not() */ public function all() { - $this->processBuilder->add('--all'); + $this->arguments[] = '--all'; return $this; } @@ -473,7 +474,7 @@ public function all() */ public function branches($pattern = null) { - $this->processBuilder->add('--branches' . ($pattern ? '=' . $pattern : '')); + $this->arguments[] = '--branches' . ($pattern ? '=' . $pattern : ''); return $this; } @@ -486,7 +487,7 @@ public function branches($pattern = null) */ public function tags($pattern = null) { - $this->processBuilder->add('--tags' . ($pattern ? '=' . $pattern : '')); + $this->arguments[] = '--tags' . ($pattern ? '=' . $pattern : ''); return $this; } @@ -499,7 +500,7 @@ public function tags($pattern = null) */ public function remotes($pattern = null) { - $this->processBuilder->add('--remotes' . ($pattern ? '=' . $pattern : '')); + $this->arguments[] = '--remotes' . ($pattern ? '=' . $pattern : ''); return $this; } @@ -512,7 +513,7 @@ public function remotes($pattern = null) */ public function glob($pattern = null) { - $this->processBuilder->add('--glob=' . $pattern); + $this->arguments[] = '--glob=' . $pattern; return $this; } @@ -525,7 +526,7 @@ public function glob($pattern = null) */ public function exclude($pattern = null) { - $this->processBuilder->add('--exclude=' . $pattern); + $this->arguments[] = '--exclude=' . $pattern; return $this; } @@ -536,7 +537,7 @@ public function exclude($pattern = null) */ public function ignoreMissing() { - $this->processBuilder->add('--ignore-missing'); + $this->arguments[] = '--ignore-missing'; return $this; } @@ -547,7 +548,7 @@ public function ignoreMissing() */ public function bisect() { - $this->processBuilder->add('--bisect'); + $this->arguments[] = '--bisect'; return $this; } @@ -558,7 +559,7 @@ public function bisect() */ public function cherryMark() { - $this->processBuilder->add('--cherry-mark'); + $this->arguments[] = '--cherry-mark'; return $this; } @@ -569,7 +570,7 @@ public function cherryMark() */ public function cherryPick() { - $this->processBuilder->add('--cherry-pick'); + $this->arguments[] = '--cherry-pick'; return $this; } @@ -580,7 +581,7 @@ public function cherryPick() */ public function leftOnly() { - $this->processBuilder->add('--left-only'); + $this->arguments[] = '--left-only'; return $this; } @@ -591,7 +592,7 @@ public function leftOnly() */ public function rightOnly() { - $this->processBuilder->add('--right-only'); + $this->arguments[] = '--right-only'; return $this; } @@ -602,7 +603,7 @@ public function rightOnly() */ public function cherry() { - $this->processBuilder->add('--cherry'); + $this->arguments[] = '--cherry'; return $this; } @@ -613,7 +614,7 @@ public function cherry() */ public function walkReflogs() { - $this->processBuilder->add('--walk-reflogs'); + $this->arguments[] = '--walk-reflogs'; return $this; } @@ -624,7 +625,7 @@ public function walkReflogs() */ public function merge() { - $this->processBuilder->add('--merge'); + $this->arguments[] = '--merge'; return $this; } @@ -635,7 +636,7 @@ public function merge() */ public function boundary() { - $this->processBuilder->add('--boundary'); + $this->arguments[] = '--boundary'; return $this; } @@ -646,7 +647,7 @@ public function boundary() */ public function simplifyByDecoration() { - $this->processBuilder->add('--simplify-by-decoration'); + $this->arguments[] = '--simplify-by-decoration'; return $this; } @@ -657,7 +658,7 @@ public function simplifyByDecoration() */ public function fullHistory() { - $this->processBuilder->add('--full-history'); + $this->arguments[] = '--full-history'; return $this; } @@ -668,7 +669,7 @@ public function fullHistory() */ public function dense() { - $this->processBuilder->add('--dense'); + $this->arguments[] = '--dense'; return $this; } @@ -679,7 +680,7 @@ public function dense() */ public function sparse() { - $this->processBuilder->add('--sparse'); + $this->arguments[] = '--sparse'; return $this; } @@ -690,7 +691,7 @@ public function sparse() */ public function simplifyMerges() { - $this->processBuilder->add('--simplify-merges'); + $this->arguments[] = '--simplify-merges'; return $this; } @@ -701,7 +702,7 @@ public function simplifyMerges() */ public function ancestryPath() { - $this->processBuilder->add('--ancestry-path'); + $this->arguments[] = '--ancestry-path'; return $this; } @@ -712,7 +713,7 @@ public function ancestryPath() */ public function dateOrder() { - $this->processBuilder->add('--date-order'); + $this->arguments[] = '--date-order'; return $this; } @@ -723,7 +724,7 @@ public function dateOrder() */ public function authorDateOrder() { - $this->processBuilder->add('--author-date-order'); + $this->arguments[] = '--author-date-order'; return $this; } @@ -734,7 +735,7 @@ public function authorDateOrder() */ public function topoOrder() { - $this->processBuilder->add('--topo-order'); + $this->arguments[] = '--topo-order'; return $this; } @@ -745,7 +746,7 @@ public function topoOrder() */ public function reverse() { - $this->processBuilder->add('--reverse'); + $this->arguments[] = '--reverse'; return $this; } @@ -756,7 +757,7 @@ public function reverse() */ public function objects() { - $this->processBuilder->add('--objects'); + $this->arguments[] = '--objects'; return $this; } @@ -767,7 +768,7 @@ public function objects() */ public function objectsEdge() { - $this->processBuilder->add('--objects-edge'); + $this->arguments[] = '--objects-edge'; return $this; } @@ -778,7 +779,7 @@ public function objectsEdge() */ public function unpacked() { - $this->processBuilder->add('--unpacked'); + $this->arguments[] = '--unpacked'; return $this; } @@ -791,7 +792,7 @@ public function unpacked() */ public function noWalk($walk = null) { - $this->processBuilder->add('--no-walk' . ($walk ? '=' . $walk : '')); + $this->arguments[] = '--no-walk' . ($walk ? '=' . $walk : ''); return $this; } @@ -802,7 +803,7 @@ public function noWalk($walk = null) */ public function doWalk() { - $this->processBuilder->add('--do-walk'); + $this->arguments[] = '--do-walk'; return $this; } @@ -815,7 +816,7 @@ public function doWalk() */ public function pretty($format = null) { - $this->processBuilder->add('--pretty' . ($format ? '=' . $format : '')); + $this->arguments[] = '--pretty' . ($format ? '=' . $format : ''); return $this; } @@ -828,7 +829,7 @@ public function pretty($format = null) */ public function format($format) { - $this->processBuilder->add('--format=' . $format); + $this->arguments[] = '--format=' . $format; return $this; } @@ -839,7 +840,7 @@ public function format($format) */ public function abbrevCommit() { - $this->processBuilder->add('--abbrev-commit'); + $this->arguments[] = '--abbrev-commit'; return $this; } @@ -850,7 +851,7 @@ public function abbrevCommit() */ public function noAbbrevCommit() { - $this->processBuilder->add('--no-abbrev-commit'); + $this->arguments[] = '--no-abbrev-commit'; return $this; } @@ -861,7 +862,7 @@ public function noAbbrevCommit() */ public function oneline() { - $this->processBuilder->add('--oneline'); + $this->arguments[] = '--oneline'; return $this; } @@ -874,7 +875,7 @@ public function oneline() */ public function encoding($encoding) { - $this->processBuilder->add('--encoding=' . $encoding); + $this->arguments[] = '--encoding=' . $encoding; return $this; } @@ -887,7 +888,7 @@ public function encoding($encoding) */ public function notes($ref = null) { - $this->processBuilder->add('--notes' . ($ref ? '=' . $ref : '')); + $this->arguments[] = '--notes' . ($ref ? '=' . $ref : ''); return $this; } @@ -898,7 +899,7 @@ public function notes($ref = null) */ public function noNotes() { - $this->processBuilder->add('--no-notes'); + $this->arguments[] = '--no-notes'; return $this; } @@ -911,7 +912,7 @@ public function noNotes() */ public function showNotes($ref = null) { - $this->processBuilder->add('--show-notes' . ($ref ? '=' . $ref : '')); + $this->arguments[] = '--show-notes' . ($ref ? '=' . $ref : ''); return $this; } @@ -922,7 +923,7 @@ public function showNotes($ref = null) */ public function showSignature() { - $this->processBuilder->add('--show-signature'); + $this->arguments[] = '--show-signature'; return $this; } @@ -933,7 +934,7 @@ public function showSignature() */ public function relativeDate() { - $this->processBuilder->add('--relative-date'); + $this->arguments[] = '--relative-date'; return $this; } @@ -946,7 +947,7 @@ public function relativeDate() */ public function date($format) { - $this->processBuilder->add('--date=' . $format); + $this->arguments[] = '--date=' . $format; return $this; } @@ -957,7 +958,7 @@ public function date($format) */ public function parents() { - $this->processBuilder->add('--parents'); + $this->arguments[] = '--parents'; return $this; } @@ -968,7 +969,7 @@ public function parents() */ public function children() { - $this->processBuilder->add('--children'); + $this->arguments[] = '--children'; return $this; } @@ -979,7 +980,7 @@ public function children() */ public function leftRight() { - $this->processBuilder->add('--left-right'); + $this->arguments[] = '--left-right'; return $this; } @@ -990,7 +991,7 @@ public function leftRight() */ public function graph() { - $this->processBuilder->add('--graph'); + $this->arguments[] = '--graph'; return $this; } @@ -1003,7 +1004,7 @@ public function graph() */ public function c() { - $this->processBuilder->add('-c'); + $this->arguments[] = '-c'; return $this; } @@ -1016,7 +1017,7 @@ public function c() */ public function cc() { - $this->processBuilder->add('--cc'); + $this->arguments[] = '--cc'; return $this; } @@ -1029,7 +1030,7 @@ public function cc() */ public function m() { - $this->processBuilder->add('-m'); + $this->arguments[] = '-m'; return $this; } @@ -1042,7 +1043,7 @@ public function m() */ public function r() { - $this->processBuilder->add('-r'); + $this->arguments[] = '-r'; return $this; } @@ -1055,7 +1056,7 @@ public function r() */ public function t() { - $this->processBuilder->add('-t'); + $this->arguments[] = '-t'; return $this; } @@ -1076,9 +1077,9 @@ public function execute($pathspec = null, $_ = null) { $args = func_get_args(); if (count($args)) { - $this->processBuilder->add('--'); + $this->arguments[] = '--'; foreach ($args as $pathspec) { - $this->processBuilder->add($pathspec); + $this->arguments[] = $pathspec; } } return parent::run(); diff --git a/src/Command/LsRemoteCommandBuilder.php b/src/Command/LsRemoteCommandBuilder.php index 5304d37..6d09dff 100644 --- a/src/Command/LsRemoteCommandBuilder.php +++ b/src/Command/LsRemoteCommandBuilder.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Tristan Lins * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -31,7 +32,7 @@ class LsRemoteCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('ls-remote'); + $this->arguments[] = 'ls-remote'; } /** @@ -41,7 +42,7 @@ protected function initializeProcessBuilder() */ public function heads() { - $this->processBuilder->add('--heads'); + $this->arguments[] = '--heads'; return $this; } @@ -52,7 +53,7 @@ public function heads() */ public function tags() { - $this->processBuilder->add('--tags'); + $this->arguments[] = '--tags'; return $this; } @@ -65,7 +66,8 @@ public function tags() */ public function uploadPack($exec) { - $this->processBuilder->add('--upload-pack')->add($exec); + $this->arguments[] = '--upload-pack'; + $this->arguments[] = $exec; return $this; } @@ -76,7 +78,7 @@ public function uploadPack($exec) */ public function exitCode() { - $this->processBuilder->add('--exit-code'); + $this->arguments[] = '--exit-code'; return $this; } @@ -97,12 +99,12 @@ public function exitCode() */ public function execute($remote, $refSpec = null, $_ = null) { - $this->processBuilder->add($remote); + $this->arguments[] = $remote; $refSpec = func_get_args(); array_shift($refSpec); foreach ($refSpec as $ref) { - $this->processBuilder->add($ref); + $this->arguments[] = $ref; } return $this->run(); diff --git a/src/Command/MergeCommandBuilder.php b/src/Command/MergeCommandBuilder.php index 3897ef2..0c5bcfa 100644 --- a/src/Command/MergeCommandBuilder.php +++ b/src/Command/MergeCommandBuilder.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Aaron Rubin * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -31,7 +32,7 @@ class MergeCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('merge'); + $this->arguments[] = 'merge'; } /** @@ -41,7 +42,7 @@ protected function initializeProcessBuilder() */ public function quiet() { - $this->processBuilder->add('--quiet'); + $this->arguments[] = '--quiet'; return $this; } @@ -54,7 +55,7 @@ public function quiet() */ public function strategy($strategy) { - $this->processBuilder->add('--strategy='.$strategy); + $this->arguments[] = '--strategy='.$strategy; return $this; } @@ -76,15 +77,15 @@ public function strategy($strategy) public function execute($branchOrTreeIsh = null, $path = null, $_ = null) { if ($branchOrTreeIsh) { - $this->processBuilder->add($branchOrTreeIsh); + $this->arguments[] = $branchOrTreeIsh; } $paths = func_get_args(); array_shift($paths); if (count($paths)) { - $this->processBuilder->add('--'); + $this->arguments[] = '--'; foreach ($paths as $path) { - $this->processBuilder->add($path); + $this->arguments[] = $path; } } diff --git a/src/Command/PullCommandBuilder.php b/src/Command/PullCommandBuilder.php index 8ce2895..929b9e6 100644 --- a/src/Command/PullCommandBuilder.php +++ b/src/Command/PullCommandBuilder.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Ahmad Marzouq * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -34,7 +35,7 @@ class PullCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('pull'); + $this->arguments[] = 'pull'; } /** @@ -44,7 +45,7 @@ protected function initializeProcessBuilder() */ public function quiet() { - $this->processBuilder->add('--quiet'); + $this->arguments[] = '--quiet'; return $this; } @@ -55,7 +56,7 @@ public function quiet() */ public function verbose() { - $this->processBuilder->add('--verbose'); + $this->arguments[] = '--verbose'; return $this; } @@ -68,7 +69,7 @@ public function verbose() */ public function recurseSubmodules($recurse) { - $this->processBuilder->add('--recurse-submodules=' . $recurse); + $this->arguments[] = '--recurse-submodules=' . $recurse; return $this; } @@ -90,12 +91,12 @@ public function recurseSubmodules($recurse) */ public function execute($repository, $refspec = null, $_ = null) { - $this->processBuilder->add($repository); + $this->arguments[] = $repository; $refspecs = func_get_args(); array_shift($refspecs); foreach ($refspecs as $refspec) { - $this->processBuilder->add($refspec); + $this->arguments[] = $refspec; } return parent::run(); diff --git a/src/Command/PushCommandBuilder.php b/src/Command/PushCommandBuilder.php index c0f8699..c634d83 100644 --- a/src/Command/PushCommandBuilder.php +++ b/src/Command/PushCommandBuilder.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Tristan Lins * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -37,7 +38,7 @@ class PushCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('push'); + $this->arguments[] = 'push'; } /** @@ -47,7 +48,7 @@ protected function initializeProcessBuilder() */ public function all() { - $this->processBuilder->add('--all'); + $this->arguments[] = '--all'; return $this; } @@ -58,7 +59,7 @@ public function all() */ public function prune() { - $this->processBuilder->add('--prune'); + $this->arguments[] = '--prune'; return $this; } @@ -69,7 +70,7 @@ public function prune() */ public function mirror() { - $this->processBuilder->add('--mirror'); + $this->arguments[] = '--mirror'; return $this; } @@ -80,7 +81,7 @@ public function mirror() */ public function dryRun() { - $this->processBuilder->add('--dry-run'); + $this->arguments[] = '--dry-run'; return $this; } @@ -91,7 +92,7 @@ public function dryRun() */ public function porcelain() { - $this->processBuilder->add('--porcelain'); + $this->arguments[] = '--porcelain'; return $this; } @@ -102,7 +103,7 @@ public function porcelain() */ public function delete() { - $this->processBuilder->add('--delete'); + $this->arguments[] = '--delete'; return $this; } @@ -113,7 +114,7 @@ public function delete() */ public function tags() { - $this->processBuilder->add('--tags'); + $this->arguments[] = '--tags'; return $this; } @@ -124,7 +125,7 @@ public function tags() */ public function followTags() { - $this->processBuilder->add('--follow-tags'); + $this->arguments[] = '--follow-tags'; return $this; } @@ -137,7 +138,7 @@ public function followTags() */ public function receivePack($gitReceivePack) { - $this->processBuilder->add('--receive-pack=' . $gitReceivePack); + $this->arguments[] = '--receive-pack=' . $gitReceivePack; return $this; } @@ -152,9 +153,7 @@ public function receivePack($gitReceivePack) */ public function forceWithLease($refname, $expect = null) { - $this->processBuilder->add( - '--force-with-lease' . ($refname ? ('=' . $refname . ($expect ? ':' . $expect : '')) : '') - ); + $this->arguments[] = '--force-with-lease' . ($refname ? ('=' . $refname . ($expect ? ':' . $expect : '')) : ''); return $this; } @@ -165,7 +164,7 @@ public function forceWithLease($refname, $expect = null) */ public function noForceWithLease() { - $this->processBuilder->add('--no-force-with-lease'); + $this->arguments[] = '--no-force-with-lease'; return $this; } @@ -176,7 +175,7 @@ public function noForceWithLease() */ public function force() { - $this->processBuilder->add('--force'); + $this->arguments[] = '--force'; return $this; } @@ -189,7 +188,7 @@ public function force() */ public function repo($repository) { - $this->processBuilder->add('--repo=' . $repository); + $this->arguments[] = '--repo=' . $repository; return $this; } @@ -200,7 +199,7 @@ public function repo($repository) */ public function setUpstream() { - $this->processBuilder->add('--set-upstream'); + $this->arguments[] = '--set-upstream'; return $this; } @@ -211,7 +210,7 @@ public function setUpstream() */ public function thin() { - $this->processBuilder->add('--thin'); + $this->arguments[] = '--thin'; return $this; } @@ -222,7 +221,7 @@ public function thin() */ public function noThin() { - $this->processBuilder->add('--no-thin'); + $this->arguments[] = '--no-thin'; return $this; } @@ -233,7 +232,7 @@ public function noThin() */ public function quiet() { - $this->processBuilder->add('--quiet'); + $this->arguments[] = '--quiet'; return $this; } @@ -244,7 +243,7 @@ public function quiet() */ public function verbose() { - $this->processBuilder->add('--verbose'); + $this->arguments[] = '--verbose'; return $this; } @@ -257,7 +256,7 @@ public function verbose() */ public function recurseSubmodules($recurse) { - $this->processBuilder->add('--recurse-submodules=' . $recurse); + $this->arguments[] = '--recurse-submodules=' . $recurse; return $this; } @@ -268,7 +267,7 @@ public function recurseSubmodules($recurse) */ public function verify() { - $this->processBuilder->add('--verify'); + $this->arguments[] = '--verify'; return $this; } @@ -279,7 +278,7 @@ public function verify() */ public function noVerify() { - $this->processBuilder->add('--no-verify'); + $this->arguments[] = '--no-verify'; return $this; } @@ -300,12 +299,12 @@ public function noVerify() */ public function execute($repository, $refspec = null, $_ = null) { - $this->processBuilder->add($repository); + $this->arguments[] = $repository; $refspecs = func_get_args(); array_shift($refspecs); foreach ($refspecs as $refspec) { - $this->processBuilder->add($refspec); + $this->arguments[] = $refspec; } return parent::run(); diff --git a/src/Command/RemoteCommandBuilder.php b/src/Command/RemoteCommandBuilder.php index 0ae3fe3..5457c42 100644 --- a/src/Command/RemoteCommandBuilder.php +++ b/src/Command/RemoteCommandBuilder.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Tristan Lins * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -33,7 +34,7 @@ class RemoteCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('remote'); + $this->arguments[] = 'remote'; } /** @@ -43,7 +44,7 @@ protected function initializeProcessBuilder() */ public function verbose() { - $this->processBuilder->add('--verbose'); + $this->arguments[] = '--verbose'; return $this; } @@ -58,7 +59,9 @@ public function verbose() */ public function add($name, $url) { - $this->processBuilder->add('add')->add($name)->add($url); + $this->arguments[] = 'add'; + $this->arguments[] = $name; + $this->arguments[] = $url; return $this; } @@ -73,11 +76,11 @@ public function add($name, $url) */ public function rename($new, $old = null) { - $this->processBuilder->add('rename'); + $this->arguments[] = 'rename'; if ($old) { - $this->processBuilder->add($old); + $this->arguments[] = $old; } - $this->processBuilder->add($new); + $this->arguments[] = $new; return $this; } @@ -90,7 +93,8 @@ public function rename($new, $old = null) */ public function remove($name) { - $this->processBuilder->add('remove')->add($name); + $this->arguments[] = 'remove'; + $this->arguments[] = $name; return $this; } @@ -105,7 +109,9 @@ public function remove($name) */ public function setHead($name, $branch) { - $this->processBuilder->add('set-head')->add($name)->add($branch); + $this->arguments[] = 'set-head'; + $this->arguments[] = $name; + $this->arguments[] = $branch; return $this; } @@ -118,7 +124,9 @@ public function setHead($name, $branch) */ public function setHeadAuto($name) { - $this->processBuilder->add('set-head')->add($name)->add('--auto'); + $this->arguments[] = 'set-head'; + $this->arguments[] = $name; + $this->arguments[] = '--auto'; return $this; } @@ -131,7 +139,9 @@ public function setHeadAuto($name) */ public function setHeadDelete($name) { - $this->processBuilder->add('set-head')->add($name)->add('--delete'); + $this->arguments[] = 'set-head'; + $this->arguments[] = $name; + $this->arguments[] = '--delete'; return $this; } @@ -148,11 +158,12 @@ public function setHeadDelete($name) */ public function setBranches($name, $branch, $add = false) { - $this->processBuilder->add('set-branches'); + $this->arguments[] = 'set-branches'; if ($add) { - $this->processBuilder->add('--add'); + $this->arguments[] = '--add'; } - $this->processBuilder->add($name)->add($branch); + $this->arguments[] = $name; + $this->arguments[] = $branch; return $this; } @@ -169,9 +180,11 @@ public function setBranches($name, $branch, $add = false) */ public function setUrl($name, $url, $oldUrl = null) { - $this->processBuilder->add('set-url')->add($name)->add($url); + $this->arguments[] = 'set-url'; + $this->arguments[] = $name; + $this->arguments[] = $url; if ($oldUrl) { - $this->processBuilder->add($oldUrl); + $this->arguments[] = $oldUrl; } return $this; } @@ -189,9 +202,12 @@ public function setUrl($name, $url, $oldUrl = null) */ public function setPushUrl($name, $url, $oldUrl = null) { - $this->processBuilder->add('set-url')->add($name)->add('--push')->add($url); + $this->arguments[] = 'set-url'; + $this->arguments[] = $name; + $this->arguments[] = '--push'; + $this->arguments[] = $url; if ($oldUrl) { - $this->processBuilder->add($oldUrl); + $this->arguments[] = $oldUrl; } return $this; } @@ -207,7 +223,10 @@ public function setPushUrl($name, $url, $oldUrl = null) */ public function addUrl($name, $url) { - $this->processBuilder->add('set-url')->add('--add')->add($name)->add($url); + $this->arguments[] = 'set-url'; + $this->arguments[] = '--add'; + $this->arguments[] = $name; + $this->arguments[] = $url; return $this; } @@ -222,7 +241,11 @@ public function addUrl($name, $url) */ public function addPushUrl($name, $url) { - $this->processBuilder->add('set-url')->add('--add')->add('--push')->add($name)->add($url); + $this->arguments[] = 'set-url'; + $this->arguments[] = '--add'; + $this->arguments[] = '--push'; + $this->arguments[] = $name; + $this->arguments[] = $url; return $this; } @@ -237,7 +260,10 @@ public function addPushUrl($name, $url) */ public function deleteUrl($name, $url) { - $this->processBuilder->add('set-url')->add('--delete')->add($name)->add($url); + $this->arguments[] = 'set-url'; + $this->arguments[] = '--delete'; + $this->arguments[] = $name; + $this->arguments[] = $url; return $this; } @@ -252,7 +278,11 @@ public function deleteUrl($name, $url) */ public function deletePushUrl($name, $url) { - $this->processBuilder->add('set-url')->add('--delete')->add('--push')->add($name)->add($url); + $this->arguments[] = 'set-url'; + $this->arguments[] = '--delete'; + $this->arguments[] = '--push'; + $this->arguments[] = $name; + $this->arguments[] = $url; return $this; } @@ -265,7 +295,8 @@ public function deletePushUrl($name, $url) */ public function show($name) { - $this->processBuilder->add('show')->add($name); + $this->arguments[] = 'show'; + $this->arguments[] = $name; return $this; } @@ -280,11 +311,11 @@ public function show($name) */ public function prune($name, $dryRun = false) { - $this->processBuilder->add('prune'); + $this->arguments[] = 'prune'; if ($dryRun) { - $this->processBuilder->add('--dry-run'); + $this->arguments[] = '--dry-run'; } - $this->processBuilder->add($name); + $this->arguments[] = $name; return $this; } @@ -299,11 +330,11 @@ public function prune($name, $dryRun = false) */ public function update($groupOrRemote, $prune = false) { - $this->processBuilder->add('update'); + $this->arguments[] = 'update'; if ($prune) { - $this->processBuilder->add('--prune'); + $this->arguments[] = '--prune'; } - $this->processBuilder->add($groupOrRemote); + $this->arguments[] = $groupOrRemote; return $this; } diff --git a/src/Command/ResetCommandBuilder.php b/src/Command/ResetCommandBuilder.php index 367bb79..085f2b4 100644 --- a/src/Command/ResetCommandBuilder.php +++ b/src/Command/ResetCommandBuilder.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Tristan Lins * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -31,7 +32,7 @@ class ResetCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('reset'); + $this->arguments[] = 'reset'; } /** @@ -41,7 +42,7 @@ protected function initializeProcessBuilder() */ public function quiet() { - $this->processBuilder->add('--quiet'); + $this->arguments[] = '--quiet'; return $this; } @@ -52,7 +53,7 @@ public function quiet() */ public function patch() { - $this->processBuilder->add('--patch'); + $this->arguments[] = '--patch'; return $this; } @@ -63,7 +64,7 @@ public function patch() */ public function soft() { - $this->processBuilder->add('--soft'); + $this->arguments[] = '--soft'; return $this; } @@ -74,7 +75,7 @@ public function soft() */ public function mixed() { - $this->processBuilder->add('--mixed'); + $this->arguments[] = '--mixed'; return $this; } @@ -85,7 +86,7 @@ public function mixed() */ public function hard() { - $this->processBuilder->add('--hard'); + $this->arguments[] = '--hard'; return $this; } @@ -96,7 +97,7 @@ public function hard() */ public function merge() { - $this->processBuilder->add('--merge'); + $this->arguments[] = '--merge'; return $this; } @@ -107,7 +108,7 @@ public function merge() */ public function keep() { - $this->processBuilder->add('--keep'); + $this->arguments[] = '--keep'; return $this; } @@ -120,7 +121,7 @@ public function keep() */ public function commit($commit) { - $this->processBuilder->add($commit); + $this->arguments[] = $commit; return $this; } @@ -139,9 +140,9 @@ public function commit($commit) */ public function execute($path = null, $_ = null) { - $this->processBuilder->add('--'); + $this->arguments[] = '--'; foreach (func_get_args() as $path) { - $this->processBuilder->add($path); + $this->arguments[] = $path; } return parent::run(); } diff --git a/src/Command/RevParseCommandBuilder.php b/src/Command/RevParseCommandBuilder.php index 15a43b9..58b094e 100644 --- a/src/Command/RevParseCommandBuilder.php +++ b/src/Command/RevParseCommandBuilder.php @@ -14,7 +14,8 @@ * @author Tristan Lins * @author Christian Schiffler * @author Radek Crlik - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -38,7 +39,7 @@ class RevParseCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('rev-parse'); + $this->arguments[] = 'rev-parse'; } /** @@ -48,7 +49,7 @@ protected function initializeProcessBuilder() */ public function parseopt() { - $this->processBuilder->add('--parseopt'); + $this->arguments[] = '--parseopt'; return $this; } @@ -59,7 +60,7 @@ public function parseopt() */ public function keepDashDash() { - $this->processBuilder->add('--keep-dashdash'); + $this->arguments[] = '--keep-dashdash'; return $this; } @@ -70,7 +71,7 @@ public function keepDashDash() */ public function stopAtNonOption() { - $this->processBuilder->add('--stop-at-non-option'); + $this->arguments[] = '--stop-at-non-option'; return $this; } @@ -81,7 +82,7 @@ public function stopAtNonOption() */ public function stuckLong() { - $this->processBuilder->add('--stuck-long'); + $this->arguments[] = '--stuck-long'; return $this; } @@ -92,7 +93,7 @@ public function stuckLong() */ public function sqQuote() { - $this->processBuilder->add('--sq-quote'); + $this->arguments[] = '--sq-quote'; return $this; } @@ -103,7 +104,7 @@ public function sqQuote() */ public function revsOnly() { - $this->processBuilder->add('--revs-only'); + $this->arguments[] = '--revs-only'; return $this; } @@ -114,7 +115,7 @@ public function revsOnly() */ public function noRevs() { - $this->processBuilder->add('--no-revs'); + $this->arguments[] = '--no-revs'; return $this; } @@ -125,7 +126,7 @@ public function noRevs() */ public function flags() { - $this->processBuilder->add('--flags'); + $this->arguments[] = '--flags'; return $this; } @@ -136,7 +137,7 @@ public function flags() */ public function noFlags() { - $this->processBuilder->add('--no-flags'); + $this->arguments[] = '--no-flags'; return $this; } @@ -149,7 +150,8 @@ public function noFlags() */ public function defaultRev($arg) { - $this->processBuilder->add('--default')->add($arg); + $this->arguments[] = '--default'; + $this->arguments[] = $arg; return $this; } @@ -162,7 +164,8 @@ public function defaultRev($arg) */ public function prefix($arg) { - $this->processBuilder->add('--prefix')->add($arg); + $this->arguments[] = '--prefix'; + $this->arguments[] = $arg; return $this; } @@ -173,7 +176,7 @@ public function prefix($arg) */ public function verify() { - $this->processBuilder->add('--verify'); + $this->arguments[] = '--verify'; return $this; } @@ -184,7 +187,7 @@ public function verify() */ public function quiet() { - $this->processBuilder->add('--quiet'); + $this->arguments[] = '--quiet'; return $this; } @@ -197,7 +200,7 @@ public function quiet() */ public function sq() { - $this->processBuilder->add('--sq'); + $this->arguments[] = '--sq'; return $this; } @@ -208,7 +211,7 @@ public function sq() */ public function not() { - $this->processBuilder->add('--not'); + $this->arguments[] = '--not'; return $this; } @@ -221,7 +224,7 @@ public function not() */ public function abbrevRef($abbrev = null) { - $this->processBuilder->add('--abbrev-ref' . ($abbrev ? '=' . $abbrev : '')); + $this->arguments[] = '--abbrev-ref' . ($abbrev ? '=' . $abbrev : ''); return $this; } @@ -234,7 +237,7 @@ public function abbrevRef($abbrev = null) */ public function short($number = null) { - $this->processBuilder->add('--short' . ($number ? '=' . $number : '')); + $this->arguments[] = '--short' . ($number ? '=' . $number : ''); return $this; } @@ -245,7 +248,7 @@ public function short($number = null) */ public function symbolic() { - $this->processBuilder->add('--symbolic'); + $this->arguments[] = '--symbolic'; return $this; } @@ -256,7 +259,7 @@ public function symbolic() */ public function symbolicFullName() { - $this->processBuilder->add('--symbolic-full-name'); + $this->arguments[] = '--symbolic-full-name'; return $this; } @@ -267,7 +270,7 @@ public function symbolicFullName() */ public function all() { - $this->processBuilder->add('--all'); + $this->arguments[] = '--all'; return $this; } @@ -280,7 +283,7 @@ public function all() */ public function branches($pattern) { - $this->processBuilder->add('--branches=' . $pattern); + $this->arguments[] = '--branches=' . $pattern; return $this; } @@ -293,7 +296,7 @@ public function branches($pattern) */ public function tags($pattern) { - $this->processBuilder->add('--tags=' . $pattern); + $this->arguments[] = '--tags=' . $pattern; return $this; } @@ -306,7 +309,7 @@ public function tags($pattern) */ public function remotes($pattern) { - $this->processBuilder->add('--remotes=' . $pattern); + $this->arguments[] = '--remotes=' . $pattern; return $this; } @@ -319,7 +322,7 @@ public function remotes($pattern) */ public function glob($pattern) { - $this->processBuilder->add('--glob=' . $pattern); + $this->arguments[] = '--glob=' . $pattern; return $this; } @@ -332,7 +335,7 @@ public function glob($pattern) */ public function exclude($pattern) { - $this->processBuilder->add('--exclude=' . $pattern); + $this->arguments[] = '--exclude=' . $pattern; return $this; } @@ -345,7 +348,7 @@ public function exclude($pattern) */ public function disambiguate($prefix) { - $this->processBuilder->add('--disambiguate=' . $prefix); + $this->arguments[] = '--disambiguate=' . $prefix; return $this; } @@ -361,7 +364,7 @@ public function since($date) if ($date instanceof \DateTime) { $date = $date->format('Y-m-d H:i:s'); } - $this->processBuilder->add('--since=' . $date); + $this->arguments[] = '--since=' . $date; return $this; } @@ -377,7 +380,7 @@ public function after($date) if ($date instanceof \DateTime) { $date = $date->format('Y-m-d H:i:s'); } - $this->processBuilder->add('--after=' . $date); + $this->arguments[] = '--after=' . $date; return $this; } @@ -393,7 +396,7 @@ public function until($date) if ($date instanceof \DateTime) { $date = $date->format('Y-m-d H:i:s'); } - $this->processBuilder->add('--until=' . $date); + $this->arguments[] = '--until=' . $date; return $this; } @@ -409,7 +412,7 @@ public function before($date) if ($date instanceof \DateTime) { $date = $date->format('Y-m-d H:i:s'); } - $this->processBuilder->add('--before=' . $date); + $this->arguments[] = '--before=' . $date; return $this; } @@ -429,7 +432,7 @@ public function before($date) public function execute($arg = null, $_ = null) { foreach (func_get_args() as $arg) { - $this->processBuilder->add($arg); + $this->arguments[] = $arg; } return parent::run(); } diff --git a/src/Command/RmCommandBuilder.php b/src/Command/RmCommandBuilder.php index 04d67b4..534bb99 100644 --- a/src/Command/RmCommandBuilder.php +++ b/src/Command/RmCommandBuilder.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Tristan Lins * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -31,7 +32,7 @@ class RmCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('rm'); + $this->arguments[] = 'rm'; } /** @@ -41,7 +42,7 @@ protected function initializeProcessBuilder() */ public function force() { - $this->processBuilder->add('--force'); + $this->arguments[] = '--force'; return $this; } @@ -52,7 +53,7 @@ public function force() */ public function dryRun() { - $this->processBuilder->add('--dry-run'); + $this->arguments[] = '--dry-run'; return $this; } @@ -63,7 +64,7 @@ public function dryRun() */ public function recursive() { - $this->processBuilder->add('-r'); + $this->arguments[] = '-r'; return $this; } @@ -74,7 +75,7 @@ public function recursive() */ public function cached() { - $this->processBuilder->add('--cached'); + $this->arguments[] = '--cached'; return $this; } @@ -85,7 +86,7 @@ public function cached() */ public function ignoreUnmatch() { - $this->processBuilder->add('--ignore-unmatch'); + $this->arguments[] = '--ignore-unmatch'; return $this; } @@ -96,7 +97,7 @@ public function ignoreUnmatch() */ public function quiet() { - $this->processBuilder->add('--quiet'); + $this->arguments[] = '--quiet'; return $this; } @@ -117,9 +118,9 @@ public function execute($pathspec = null, $_ = null) { $args = func_get_args(); if (count($args)) { - $this->processBuilder->add('--'); + $this->arguments[] = '--'; foreach ($args as $pathspec) { - $this->processBuilder->add($pathspec); + $this->arguments[] = $pathspec; } } return parent::run(); diff --git a/src/Command/ShortLogCommandBuilder.php b/src/Command/ShortLogCommandBuilder.php index b183572..5fd6ffc 100644 --- a/src/Command/ShortLogCommandBuilder.php +++ b/src/Command/ShortLogCommandBuilder.php @@ -14,7 +14,8 @@ * @author David Molineus * @author Christian Schiffler * @author Tristan Lins - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -32,7 +33,7 @@ class ShortLogCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('shortlog'); + $this->arguments[] = 'shortlog'; } /** @@ -42,7 +43,7 @@ protected function initializeProcessBuilder() */ public function numbered() { - $this->processBuilder->add('--numbered'); + $this->arguments[] = '--numbered'; return $this; } @@ -54,7 +55,7 @@ public function numbered() */ public function summary() { - $this->processBuilder->add('--summary'); + $this->arguments[] = '--summary'; return $this; } @@ -66,7 +67,7 @@ public function summary() */ public function email() { - $this->processBuilder->add('--email'); + $this->arguments[] = '--email'; return $this; } @@ -80,7 +81,7 @@ public function email() */ public function format($format) { - $this->processBuilder->add('--format=' . $format); + $this->arguments[] = '--format=' . $format; return $this; } @@ -94,7 +95,7 @@ public function format($format) */ public function revisionRange($revisionRange) { - $this->processBuilder->add($revisionRange); + $this->arguments[] = $revisionRange; return $this; } @@ -129,7 +130,7 @@ public function w($width, $indent1 = null, $indent2 = null) } } - $this->processBuilder->add('-w' . $width); + $this->arguments[] = '-w' . $width; return $this; } @@ -151,9 +152,9 @@ public function execute($pathSpec = null, $_ = null) { $args = func_get_args(); if (count($args)) { - $this->processBuilder->add('--'); + $this->arguments[] = '--'; foreach ($args as $pathSpec) { - $this->processBuilder->add($pathSpec); + $this->arguments[] = $pathSpec; } } diff --git a/src/Command/ShowCommandBuilder.php b/src/Command/ShowCommandBuilder.php index 6bed92e..1847879 100644 --- a/src/Command/ShowCommandBuilder.php +++ b/src/Command/ShowCommandBuilder.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Tristan Lins * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -33,7 +34,7 @@ class ShowCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('show'); + $this->arguments[] = 'show'; } /** @@ -45,7 +46,7 @@ protected function initializeProcessBuilder() */ public function pretty($format = null) { - $this->processBuilder->add('--pretty' . ($format ? '=' . $format : '')); + $this->arguments[] = '--pretty' . ($format ? '=' . $format : ''); return $this; } @@ -58,7 +59,7 @@ public function pretty($format = null) */ public function format($format) { - $this->processBuilder->add('--format=' . $format); + $this->arguments[] = '--format=' . $format; return $this; } @@ -69,7 +70,7 @@ public function format($format) */ public function abbrevCommit() { - $this->processBuilder->add('--abbrev-commit'); + $this->arguments[] = '--abbrev-commit'; return $this; } @@ -80,7 +81,7 @@ public function abbrevCommit() */ public function noAbbrevCommit() { - $this->processBuilder->add('--no-abbrev-commit'); + $this->arguments[] = '--no-abbrev-commit'; return $this; } @@ -91,7 +92,7 @@ public function noAbbrevCommit() */ public function oneline() { - $this->processBuilder->add('--oneline'); + $this->arguments[] = '--oneline'; return $this; } @@ -104,7 +105,7 @@ public function oneline() */ public function encoding($encoding) { - $this->processBuilder->add('--encoding=' . $encoding); + $this->arguments[] = '--encoding=' . $encoding; return $this; } @@ -117,7 +118,7 @@ public function encoding($encoding) */ public function notes($ref = null) { - $this->processBuilder->add('--notes' . ($ref ? '=' . $ref : '')); + $this->arguments[] = '--notes' . ($ref ? '=' . $ref : ''); return $this; } @@ -128,7 +129,7 @@ public function notes($ref = null) */ public function noNotes() { - $this->processBuilder->add('--no-notes'); + $this->arguments[] = '--no-notes'; return $this; } @@ -141,7 +142,7 @@ public function noNotes() */ public function showNotes($ref = null) { - $this->processBuilder->add('--show-notes' . ($ref ? '=' . $ref : '')); + $this->arguments[] = '--show-notes' . ($ref ? '=' . $ref : ''); return $this; } @@ -152,7 +153,7 @@ public function showNotes($ref = null) */ public function standardNotes() { - $this->processBuilder->add('--standard-notes'); + $this->arguments[] = '--standard-notes'; return $this; } @@ -163,7 +164,7 @@ public function standardNotes() */ public function noStandardNotes() { - $this->processBuilder->add('--no-standard-notes'); + $this->arguments[] = '--no-standard-notes'; return $this; } @@ -174,7 +175,7 @@ public function noStandardNotes() */ public function showSignature() { - $this->processBuilder->add('--show-signature'); + $this->arguments[] = '--show-signature'; return $this; } @@ -185,7 +186,7 @@ public function showSignature() */ public function noPatch() { - $this->processBuilder->add('--no-patch'); + $this->arguments[] = '--no-patch'; return $this; } @@ -202,7 +203,7 @@ public function noPatch() */ public function execute($object) { - $this->processBuilder->add($object); + $this->arguments[] = $object; return parent::run(); } } diff --git a/src/Command/StashCommandBuilder.php b/src/Command/StashCommandBuilder.php index ee9c0e4..91215a8 100644 --- a/src/Command/StashCommandBuilder.php +++ b/src/Command/StashCommandBuilder.php @@ -12,7 +12,8 @@ * * @package bit3/git-php * @author Ahmad Marzouq - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -32,7 +33,7 @@ class StashCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('stash'); + $this->arguments[] = 'stash'; } /** @@ -44,7 +45,7 @@ protected function initializeProcessBuilder() */ public function message($message) { - $this->processBuilder->add($message); + $this->arguments[] = $message; return $this; } @@ -57,9 +58,9 @@ public function message($message) */ public function listStash($options = null) { - $this->processBuilder->add('list'); + $this->arguments[] = 'list'; if ($options) { - $this->processBuilder->add($options); + $this->arguments[] = $options; } return parent::run(); } @@ -75,9 +76,9 @@ public function listStash($options = null) */ public function show($stash = null) { - $this->processBuilder->add('show'); + $this->arguments[] = 'show'; if ($stash) { - $this->processBuilder->add('stash@{' . $stash . '}'); + $this->arguments[] = 'stash@{' . $stash . '}'; } return parent::run(); } @@ -92,9 +93,9 @@ public function show($stash = null) */ public function drop($stash = null) { - $this->processBuilder->add('show'); + $this->arguments[] = 'show'; if ($stash) { - $this->processBuilder->add('stash@{' . $stash . '}'); + $this->arguments[] = 'stash@{' . $stash . '}'; } return parent::run(); } @@ -109,9 +110,9 @@ public function drop($stash = null) */ public function pop($stash = null) { - $this->processBuilder->add('pop'); + $this->arguments[] = 'pop'; if ($stash) { - $this->processBuilder->add('stash@{' . $stash . '}'); + $this->arguments[] = 'stash@{' . $stash . '}'; } return parent::run(); } @@ -127,9 +128,9 @@ public function pop($stash = null) */ public function apply($stash = null) { - $this->processBuilder->add('pop'); + $this->arguments[] = 'pop'; if ($stash) { - $this->processBuilder->add('stash@{' . $stash . '}'); + $this->arguments[] = 'stash@{' . $stash . '}'; } return parent::run(); } @@ -148,10 +149,10 @@ public function apply($stash = null) */ public function branch($branchname, $stash = null) { - $this->processBuilder->add('branch'); - $this->processBuilder->add($branchname); + $this->arguments[] = 'branch'; + $this->arguments[] = $branchname; if ($stash) { - $this->processBuilder->add('stash@{' . $stash . '}'); + $this->arguments[] = 'stash@{' . $stash . '}'; } return parent::run(); } @@ -164,7 +165,7 @@ public function branch($branchname, $stash = null) */ public function clear() { - $this->processBuilder->add('clear'); + $this->arguments[] = 'clear'; return parent::run(); } @@ -181,9 +182,9 @@ public function clear() */ public function save($message = null) { - $this->processBuilder->add('branch'); + $this->arguments[] = 'branch'; if ($message) { - $this->processBuilder->add($message); + $this->arguments[] = $message; } return parent::run(); } @@ -199,9 +200,9 @@ public function save($message = null) */ public function create($message = null) { - $this->processBuilder->add('create'); + $this->arguments[] = 'create'; if ($message) { - $this->processBuilder->add($message); + $this->arguments[] = $message; } return parent::run(); } @@ -219,12 +220,12 @@ public function create($message = null) */ public function store($message = null, $commit = null) { - $this->processBuilder->add('store'); + $this->arguments[] = 'store'; if ($message) { - $this->processBuilder->add('--message '.$message); + $this->arguments[] = '--message '.$message; } if ($commit) { - $this->processBuilder->add($commit); + $this->arguments[] = $commit; } return parent::run(); } diff --git a/src/Command/StatusCommandBuilder.php b/src/Command/StatusCommandBuilder.php index d07ab25..0776d89 100644 --- a/src/Command/StatusCommandBuilder.php +++ b/src/Command/StatusCommandBuilder.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Tristan Lins * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -47,7 +48,7 @@ class StatusCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('status'); + $this->arguments[] = 'status'; } /** @@ -57,7 +58,7 @@ protected function initializeProcessBuilder() */ public function short() { - $this->processBuilder->add('--short'); + $this->arguments[] = '--short'; return $this; } @@ -68,7 +69,7 @@ public function short() */ public function branch() { - $this->processBuilder->add('--branch'); + $this->arguments[] = '--branch'; return $this; } @@ -79,7 +80,7 @@ public function branch() */ public function porcelain() { - $this->processBuilder->add('--porcelain'); + $this->arguments[] = '--porcelain'; return $this; } @@ -90,7 +91,7 @@ public function porcelain() */ public function long() { - $this->processBuilder->add('--long'); + $this->arguments[] = '--long'; return $this; } @@ -103,7 +104,7 @@ public function long() */ public function untrackedFiles($mode = null) { - $this->processBuilder->add('--untracked-files' . ($mode ? '=' . $mode : '')); + $this->arguments[] = '--untracked-files' . ($mode ? '=' . $mode : ''); return $this; } @@ -116,7 +117,7 @@ public function untrackedFiles($mode = null) */ public function ignoreSubmodules($when = null) { - $this->processBuilder->add('--ignore-submodules' . ($when ? '=' . $when : '')); + $this->arguments[] = '--ignore-submodules' . ($when ? '=' . $when : ''); return $this; } @@ -127,7 +128,7 @@ public function ignoreSubmodules($when = null) */ public function ignored() { - $this->processBuilder->add('--ignored'); + $this->arguments[] = '--ignored'; return $this; } @@ -140,7 +141,7 @@ public function ignored() */ public function z() { - $this->processBuilder->add('-z'); + $this->arguments[] = '-z'; return $this; } @@ -153,7 +154,7 @@ public function z() */ public function column($options = null) { - $this->processBuilder->add('--column' . ($options ? '=' . $options : '')); + $this->arguments[] = '--column' . ($options ? '=' . $options : ''); return $this; } @@ -164,7 +165,7 @@ public function column($options = null) */ public function noColumn() { - $this->processBuilder->add('--no-column'); + $this->arguments[] = '--no-column'; return $this; } @@ -321,9 +322,9 @@ public function execute($pathspec = null, $_ = null) { $args = func_get_args(); if (count($args)) { - $this->processBuilder->add('--'); + $this->arguments[] = '--'; foreach ($args as $pathspec) { - $this->processBuilder->add($pathspec); + $this->arguments[] = $pathspec; } } return parent::run(); diff --git a/src/Command/TagCommandBuilder.php b/src/Command/TagCommandBuilder.php index e0067b7..489de8f 100644 --- a/src/Command/TagCommandBuilder.php +++ b/src/Command/TagCommandBuilder.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Tristan Lins * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -53,7 +54,7 @@ class TagCommandBuilder extends AbstractCommandBuilder */ protected function initializeProcessBuilder() { - $this->processBuilder->add('tag'); + $this->arguments[] = 'tag'; } /** @@ -63,7 +64,7 @@ protected function initializeProcessBuilder() */ public function annotate() { - $this->processBuilder->add('--annotate'); + $this->arguments[] = '--annotate'; return $this; } @@ -74,8 +75,8 @@ public function annotate() */ public function sign() { - $this->signIsset = true; - $this->processBuilder->add('--sign'); + $this->signIsset = true; + $this->arguments[] = '--sign'; return $this; } @@ -89,7 +90,7 @@ public function sign() public function localUser($keyId) { $this->localUserIsset = true; - $this->processBuilder->add('--local-user=' . $keyId); + $this->arguments[] = '--local-user=' . $keyId; return $this; } @@ -100,7 +101,7 @@ public function localUser($keyId) */ public function force() { - $this->processBuilder->add('--force'); + $this->arguments[] = '--force'; return $this; } @@ -111,7 +112,7 @@ public function force() */ public function delete() { - $this->processBuilder->add('--delete'); + $this->arguments[] = '--delete'; return $this; } @@ -122,7 +123,7 @@ public function delete() */ public function verify() { - $this->processBuilder->add('--verify'); + $this->arguments[] = '--verify'; return $this; } @@ -137,7 +138,7 @@ public function verify() */ public function n($num) { - $this->processBuilder->add('-n' . $num); + $this->arguments[] = '-n' . $num; return $this; } @@ -152,7 +153,8 @@ public function n($num) */ public function l($pattern) { - $this->processBuilder->add('--list')->add($pattern); + $this->arguments[] = '--list'; + $this->arguments[] = $pattern; return $this; } @@ -165,7 +167,7 @@ public function l($pattern) */ public function column($options = null) { - $this->processBuilder->add('--column' . ($options ? '=' . $options : '')); + $this->arguments[] = '--column' . ($options ? '=' . $options : ''); return $this; } @@ -176,7 +178,7 @@ public function column($options = null) */ public function noColumn() { - $this->processBuilder->add('--no-column'); + $this->arguments[] = '--no-column'; return $this; } @@ -189,7 +191,8 @@ public function noColumn() */ public function contains($commit) { - $this->processBuilder->add('--contains')->add($commit); + $this->arguments[] = '--contains'; + $this->arguments[] = $commit; return $this; } @@ -202,7 +205,8 @@ public function contains($commit) */ public function pointsAt($object) { - $this->processBuilder->add('--points-at')->add($object); + $this->arguments[] = '--points-at'; + $this->arguments[] = $object; return $this; } @@ -215,7 +219,7 @@ public function pointsAt($object) */ public function message($message) { - $this->processBuilder->add('--message=' . $message); + $this->arguments[] = '--message=' . $message; return $this; } @@ -228,7 +232,7 @@ public function message($message) */ public function file($file) { - $this->processBuilder->add('--file=' . $file); + $this->arguments[] = '--file=' . $file; return $this; } @@ -241,7 +245,7 @@ public function file($file) */ public function cleanup($mode) { - $this->processBuilder->add('--cleanup=' . $mode); + $this->arguments[] = '--cleanup=' . $mode; return $this; } @@ -269,11 +273,11 @@ public function execute($tagName = null, $commit = null) } if ($tagName) { - $this->processBuilder->add($tagName); + $this->arguments[] = $tagName; } if ($commit) { - $this->processBuilder->add($commit); + $this->arguments[] = $commit; } return parent::run(); diff --git a/tests/GitRepositoryTest.php b/tests/GitRepositoryTest.php index 5bf716c..ea30268 100644 --- a/tests/GitRepositoryTest.php +++ b/tests/GitRepositoryTest.php @@ -26,7 +26,7 @@ use Bit3\GitPhp\GitRepository; use PHPUnit\Framework\TestCase; use Symfony\Component\Filesystem\Filesystem; -use Symfony\Component\Process\ProcessBuilder; +use Symfony\Component\Process\Process; /** * GIT repository unit tests. @@ -161,9 +161,8 @@ public function testConfigSetOnInitializedRepository() { $this->initializedGitRepository->config()->file('local')->execute('user.name', 'CCA unittest 2'); - $process = ProcessBuilder::create(array('git', 'config', '--local', 'user.name')) - ->setWorkingDirectory($this->initializedRepositoryPath) - ->getProcess(); + $process = new Process(['git', 'config', '--local', 'user.name'], $this->initializedRepositoryPath); + $process->setCommandLine($process->getCommandLine()); $process->run(); $this->assertEquals( @@ -176,9 +175,10 @@ public function testConfigAddOnInitializedRepository() { $this->initializedGitRepository->config()->file('local')->add('user.name', 'CCA unittest 2')->execute(); - $process = ProcessBuilder::create(array('git', 'config', '--local', '--get-all', 'user.name')) - ->setWorkingDirectory($this->initializedRepositoryPath) - ->getProcess(); + $process = new Process( + ['git', 'config', '--local', '--get-all', 'user.name'], $this->initializedRepositoryPath + ); + $process->setCommandLine($process->getCommandLine()); $process->run(); $names = explode("\n", $process->getOutput()); @@ -321,9 +321,8 @@ public function testRemoteSetUrlOnInitializedRepository() { $this->initializedGitRepository->remote()->setUrl('local', $this->uninitializedRepositoryPath)->execute(); - $process = ProcessBuilder::create(array('git', 'config', 'remote.local.url')) - ->setWorkingDirectory($this->initializedRepositoryPath) - ->getProcess(); + $process = new Process(['git', 'config', 'remote.local.url'], $this->initializedRepositoryPath); + $process->setCommandLine($process->getCommandLine()); $process->run(); $this->assertEquals( @@ -357,9 +356,8 @@ public function testRemoteSetPushUrlOnInitializedRepository() { $this->initializedGitRepository->remote()->setPushUrl('local', $this->uninitializedRepositoryPath)->execute(); - $process = ProcessBuilder::create(array('git', 'config', 'remote.local.url')) - ->setWorkingDirectory($this->initializedRepositoryPath) - ->getProcess(); + $process = new Process(['git', 'config', 'remote.local.url'], $this->initializedRepositoryPath); + $process->setCommandLine($process->getCommandLine()); $process->run(); $this->assertEquals( @@ -367,9 +365,8 @@ public function testRemoteSetPushUrlOnInitializedRepository() '/tmp/git' ); - $process = ProcessBuilder::create(array('git', 'config', 'remote.local.pushurl')) - ->setWorkingDirectory($this->initializedRepositoryPath) - ->getProcess(); + $process = new Process(['git', 'config', 'remote.local.pushurl'], $this->initializedRepositoryPath); + $process->setCommandLine($process->getCommandLine()); $process->run(); $this->assertEquals( @@ -403,9 +400,8 @@ public function testRemoteAddOnInitializedRepository() { $this->initializedGitRepository->remote()->add('origin', $this->uninitializedRepositoryPath)->execute(); - $process = ProcessBuilder::create(array('git', 'config', 'remote.origin.url')) - ->setWorkingDirectory($this->initializedRepositoryPath) - ->getProcess(); + $process = new Process(['git', 'config', 'remote.origin.url'], $this->initializedRepositoryPath); + $process->setCommandLine($process->getCommandLine()); $process->run(); $this->assertEquals( @@ -436,16 +432,16 @@ public function testRemoteAddOnUninitializedRepository() */ public function testRemoteFetchOnInitializedRepository() { - $process = ProcessBuilder::create(array('git', 'remote', 'add', 'origin', $this->initializedRepositoryPath)) - ->setWorkingDirectory($this->initializedRepositoryPath) - ->getProcess(); + $process = new Process( + ['git', 'remote', 'add', 'origin', $this->initializedRepositoryPath], $this->initializedRepositoryPath + ); + $process->setCommandLine($process->getCommandLine()); $process->run(); $this->initializedGitRepository->fetch()->execute(); - $process = ProcessBuilder::create(array('git', 'branch', '-a')) - ->setWorkingDirectory($this->initializedRepositoryPath) - ->getProcess(); + $process = new Process(['git', 'branch', '-a'], $this->initializedRepositoryPath); + $process->setCommandLine($process->getCommandLine()); $process->run(); $branches = explode("\n", $process->getOutput()); @@ -478,16 +474,16 @@ public function testRemoteFetchOnUninitializedRepository() */ public function testCheckoutOnInitializedRepository() { - $process = ProcessBuilder::create(array('git', 'remote', 'add', 'origin', $this->initializedRepositoryPath)) - ->setWorkingDirectory($this->initializedRepositoryPath) - ->getProcess(); + $process = new Process( + ['git', 'remote', 'add', 'origin', $this->initializedRepositoryPath], $this->initializedRepositoryPath + ); + $process->setCommandLine($process->getCommandLine()); $process->run(); $this->initializedGitRepository->checkout()->execute('6c42d7ba78e0e956bd4e25661a6c13d826ef590a'); - $process = ProcessBuilder::create(array('git', 'describe')) - ->setWorkingDirectory($this->initializedRepositoryPath) - ->getProcess(); + $process = new Process(['git', 'describe'], $this->initializedRepositoryPath); + $process->setCommandLine($process->getCommandLine()); $process->run(); $this->assertEquals( @@ -571,9 +567,8 @@ public function testAddOnInitializedRepository() { $this->initializedGitRepository->add()->execute('unknown-file.txt'); - $process = ProcessBuilder::create(array('git', 'status', '-s')) - ->setWorkingDirectory($this->initializedRepositoryPath) - ->getProcess(); + $process = new Process(['git', 'status', '-s'], $this->initializedRepositoryPath); + $process->setCommandLine($process->getCommandLine()); $process->run(); $status = explode("\n", $process->getOutput()); @@ -607,9 +602,8 @@ public function testRmOnInitializedRepository() { $this->initializedGitRepository->rm()->execute('existing-file.txt'); - $process = ProcessBuilder::create(array('git', 'status', '-s')) - ->setWorkingDirectory($this->initializedRepositoryPath) - ->getProcess(); + $process = new Process(['git', 'status', '-s'], $this->initializedRepositoryPath); + $process->setCommandLine($process->getCommandLine()); $process->run(); $status = explode("\n", $process->getOutput()); @@ -644,9 +638,8 @@ public function testCommitOnInitializedRepository() { $this->initializedGitRepository->commit()->message('Commit changes')->execute(); - $process = ProcessBuilder::create(array('git', 'status', '-s')) - ->setWorkingDirectory($this->initializedRepositoryPath) - ->getProcess(); + $process = new Process(['git', 'status', '-s'], $this->initializedRepositoryPath); + $process->setCommandLine($process->getCommandLine()); $process->run(); $status = explode("\n", $process->getOutput()); @@ -687,9 +680,8 @@ public function testTagOnInitializedRepository() { $this->initializedGitRepository->tag()->execute('unit-test'); - $process = ProcessBuilder::create(array('git', 'tag')) - ->setWorkingDirectory($this->initializedRepositoryPath) - ->getProcess(); + $process = new Process(['git', 'tag'], $this->initializedRepositoryPath); + $process->setCommandLine($process->getCommandLine()); $process->run(); $tags = explode("\n", $process->getOutput()); From eb367af4b9d3b93932675d0dfd4a42370e162c98 Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Sat, 25 Aug 2018 22:01:18 +0200 Subject: [PATCH 22/48] Add memory limit to the travis configuration --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 2e85143..6143e51 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,9 @@ php: sudo: false +before_install: + - echo "memory_limit = -1" > travis.php.ini && phpenv config-add travis.php.ini + install: - travis_retry composer self-update && composer --version - travis_retry composer update --prefer-dist --dev --no-interaction From 5b0ff4aaf8bcdf240ea67ed00c0b0bfad27652a1 Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Sat, 25 Aug 2018 22:02:14 +0200 Subject: [PATCH 23/48] Fix travis install chapter --- .travis.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6143e51..e91b654 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,8 +14,18 @@ before_install: - echo "memory_limit = -1" > travis.php.ini && phpenv config-add travis.php.ini install: - - travis_retry composer self-update && composer --version - - travis_retry composer update --prefer-dist --dev --no-interaction + - travis_retry composer self-update && composer --version + # We have to supply the branch alias here again as travis checks out a commit hash and therefore destroys the + # circular dependency phpcq/all-tasks -> phpcq/autoload-validation -> phpcq/all-tasks. + - > + if [ "x${TRAVIS_TAG}" != "x" ]; then + COMPOSER_ROOT_VERSION=${TRAVIS_TAG} travis_retry composer update --prefer-dist --no-interaction; + else + COMPOSER_ROOT_VERSION=$([[ ${TRAVIS_BRANCH} =~ hotfix/([0-9.]*(-(alpha|beta|rc)[0-9]+)?) ]] \ + && echo ${BASH_REMATCH[1]} \ + || echo dev-${TRAVIS_BRANCH}) \ + travis_retry composer update --prefer-dist --no-interaction; + fi script: ant -keep-going From 4efab6282fbca5aaa9017786e31c2f78c0f4bd49 Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Sat, 25 Aug 2018 22:03:21 +0200 Subject: [PATCH 24/48] Update the php version for the travis test --- .travis.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index e91b654..679d72b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,10 @@ language: php php: - - "5.3" - - "5.4" - - "5.5" - - "5.6" - - "7.0" + - "7.2" - "7.1" + - "7.0" + - "5.6" sudo: false From 9ce07adee2a9734ab25c7bd68a73dae916f350e0 Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Sat, 25 Aug 2018 22:24:24 +0200 Subject: [PATCH 25/48] Declare global functions --- src/Command/AbstractCommandBuilder.php | 4 +- src/Command/AddCommandBuilder.php | 4 +- src/Command/BranchCommandBuilder.php | 10 ++-- src/Command/CheckoutCommandBuilder.php | 6 +-- src/Command/CommitCommandBuilder.php | 4 +- src/Command/ConfigCommandBuilder.php | 6 +-- src/Command/FetchCommandBuilder.php | 4 +- src/Command/LogCommandBuilder.php | 4 +- src/Command/LsRemoteCommandBuilder.php | 16 +++--- src/Command/MergeCommandBuilder.php | 6 +-- src/Command/PullCommandBuilder.php | 4 +- src/Command/PushCommandBuilder.php | 4 +- src/Command/RemoteCommandBuilder.php | 6 +-- src/Command/ResetCommandBuilder.php | 2 +- src/Command/RevParseCommandBuilder.php | 2 +- src/Command/RmCommandBuilder.php | 4 +- src/Command/ShortLogCommandBuilder.php | 4 +- src/Command/StatusCommandBuilder.php | 36 +++++++------- src/Command/TagCommandBuilder.php | 6 +-- src/GitException.php | 7 +-- src/GitRepository.php | 5 +- tests/GitRepositoryTest.php | 68 +++++++++++++------------- 22 files changed, 107 insertions(+), 105 deletions(-) diff --git a/src/Command/AbstractCommandBuilder.php b/src/Command/AbstractCommandBuilder.php index 93ccaa0..49e0e16 100644 --- a/src/Command/AbstractCommandBuilder.php +++ b/src/Command/AbstractCommandBuilder.php @@ -155,7 +155,7 @@ protected function run() } $this->repository->getConfig()->getLogger()->debug( - sprintf('[ccabs-repository-git] exec [%s] %s', $this->workingDirectory, $process->getCommandLine()) + \sprintf('[ccabs-repository-git] exec [%s] %s', $this->workingDirectory, $process->getCommandLine()) ); if ($this->dryRun) { @@ -164,7 +164,7 @@ protected function run() $process->run(); $this->output = $process->getOutput(); - $this->output = rtrim($this->output, "\r\n"); + $this->output = \rtrim($this->output, "\r\n"); if (!$process->isSuccessful()) { throw GitException::createFromProcess('Could not execute git command', $process); diff --git a/src/Command/AddCommandBuilder.php b/src/Command/AddCommandBuilder.php index b7546fa..4254c98 100644 --- a/src/Command/AddCommandBuilder.php +++ b/src/Command/AddCommandBuilder.php @@ -173,8 +173,8 @@ public function ignoreMissing() */ public function execute($pathspec = null, $_ = null) { - $args = func_get_args(); - if (count($args)) { + $args = \func_get_args(); + if (\count($args)) { $this->arguments[] = '--'; foreach ($args as $pathspec) { $this->arguments[] = $pathspec; diff --git a/src/Command/BranchCommandBuilder.php b/src/Command/BranchCommandBuilder.php index 054f98e..f4462ec 100644 --- a/src/Command/BranchCommandBuilder.php +++ b/src/Command/BranchCommandBuilder.php @@ -345,15 +345,15 @@ public function execute($branchName = null) public function getNames() { $branches = $this->execute(); - $branches = explode("\n", $branches); - $branches = array_map( + $branches = \explode("\n", $branches); + $branches = \array_map( function ($branch) { - return ltrim($branch, '*'); + return \ltrim($branch, '*'); }, $branches ); - $branches = array_map('trim', $branches); - $branches = array_filter($branches); + $branches = \array_map('trim', $branches); + $branches = \array_filter($branches); return $branches; } diff --git a/src/Command/CheckoutCommandBuilder.php b/src/Command/CheckoutCommandBuilder.php index 296a716..55d0b3b 100644 --- a/src/Command/CheckoutCommandBuilder.php +++ b/src/Command/CheckoutCommandBuilder.php @@ -219,9 +219,9 @@ public function execute($branchOrTreeIsh = null, $path = null, $_ = null) $this->arguments[] = $branchOrTreeIsh; } - $paths = func_get_args(); - array_shift($paths); - if (count($paths)) { + $paths = \func_get_args(); + \array_shift($paths); + if (\count($paths)) { $this->arguments[] = '--'; foreach ($paths as $path) { $this->arguments[] = $path; diff --git a/src/Command/CommitCommandBuilder.php b/src/Command/CommitCommandBuilder.php index 0dcb5b3..58e9b5e 100644 --- a/src/Command/CommitCommandBuilder.php +++ b/src/Command/CommitCommandBuilder.php @@ -458,8 +458,8 @@ public function execute($pathspec = null, $_ = null) $this->gpgSign($this->repository->getConfig()->getSignCommitUser()); } - $args = func_get_args(); - if (count($args)) { + $args = \func_get_args(); + if (\count($args)) { $this->arguments[] = '--'; foreach ($args as $pathspec) { $this->arguments[] = $pathspec; diff --git a/src/Command/ConfigCommandBuilder.php b/src/Command/ConfigCommandBuilder.php index ce33232..aba1f84 100644 --- a/src/Command/ConfigCommandBuilder.php +++ b/src/Command/ConfigCommandBuilder.php @@ -47,7 +47,7 @@ protected function initializeProcessBuilder() */ public function file($file) { - if (in_array($file, array('global', 'system', 'local'))) { + if (\in_array($file, array('global', 'system', 'local'))) { $this->arguments[] = '--' . $file; } else { $this->arguments[] = '--file'; @@ -82,7 +82,7 @@ public function blob($blobId) */ public function type($type) { - if (in_array($type, array('bool', 'int', 'bool-or-int', 'path'))) { + if (\in_array($type, array('bool', 'int', 'bool-or-int', 'path'))) { $this->arguments[] = '--' . $type; } else { throw new \InvalidArgumentException('Invalid configuration type supplied.'); @@ -327,7 +327,7 @@ public function getColorBool($name, $stdoutIsTty = null) { $this->arguments[] = '--get-colorbool'; $this->arguments[] = $name; - if (is_bool($stdoutIsTty)) { + if (\is_bool($stdoutIsTty)) { $this->arguments[] = $stdoutIsTty ? 'true' : 'false'; } return $this; diff --git a/src/Command/FetchCommandBuilder.php b/src/Command/FetchCommandBuilder.php index 1d8c392..2d0d240 100644 --- a/src/Command/FetchCommandBuilder.php +++ b/src/Command/FetchCommandBuilder.php @@ -293,8 +293,8 @@ public function execute($repository = 'origin', $refspec = null, $_ = null) { $this->arguments[] = $repository; - $refspecs = func_get_args(); - array_shift($refspecs); + $refspecs = \func_get_args(); + \array_shift($refspecs); foreach ($refspecs as $refspec) { $this->arguments[] = $refspec; } diff --git a/src/Command/LogCommandBuilder.php b/src/Command/LogCommandBuilder.php index 71e2786..d818c72 100644 --- a/src/Command/LogCommandBuilder.php +++ b/src/Command/LogCommandBuilder.php @@ -1075,8 +1075,8 @@ public function t() */ public function execute($pathspec = null, $_ = null) { - $args = func_get_args(); - if (count($args)) { + $args = \func_get_args(); + if (\count($args)) { $this->arguments[] = '--'; foreach ($args as $pathspec) { $this->arguments[] = $pathspec; diff --git a/src/Command/LsRemoteCommandBuilder.php b/src/Command/LsRemoteCommandBuilder.php index 6d09dff..fb4e25d 100644 --- a/src/Command/LsRemoteCommandBuilder.php +++ b/src/Command/LsRemoteCommandBuilder.php @@ -101,8 +101,8 @@ public function execute($remote, $refSpec = null, $_ = null) { $this->arguments[] = $remote; - $refSpec = func_get_args(); - array_shift($refSpec); + $refSpec = \func_get_args(); + \array_shift($refSpec); foreach ($refSpec as $ref) { $this->arguments[] = $ref; } @@ -127,17 +127,17 @@ public function execute($remote, $refSpec = null, $_ = null) */ public function getRefs($remote, $refSpec = null, $_ = null) { - $output = call_user_func_array(array($this, 'execute'), func_get_args()); - $output = explode("\n", $output); - $output = array_map('trim', $output); - $output = array_filter($output); + $output = \call_user_func_array(array($this, 'execute'), \func_get_args()); + $output = \explode("\n", $output); + $output = \array_map('trim', $output); + $output = \array_filter($output); $refs = array(); foreach ($output as $line) { - $line = preg_split('~\s+~', $line); + $line = \preg_split('~\s+~', $line); - if ('^{}' != substr($line[1], -3)) { + if ('^{}' != \substr($line[1], -3)) { $refs[$line[1]] = $line[0]; } } diff --git a/src/Command/MergeCommandBuilder.php b/src/Command/MergeCommandBuilder.php index 0c5bcfa..25d5d0a 100644 --- a/src/Command/MergeCommandBuilder.php +++ b/src/Command/MergeCommandBuilder.php @@ -80,9 +80,9 @@ public function execute($branchOrTreeIsh = null, $path = null, $_ = null) $this->arguments[] = $branchOrTreeIsh; } - $paths = func_get_args(); - array_shift($paths); - if (count($paths)) { + $paths = \func_get_args(); + \array_shift($paths); + if (\count($paths)) { $this->arguments[] = '--'; foreach ($paths as $path) { $this->arguments[] = $path; diff --git a/src/Command/PullCommandBuilder.php b/src/Command/PullCommandBuilder.php index 929b9e6..5916df3 100644 --- a/src/Command/PullCommandBuilder.php +++ b/src/Command/PullCommandBuilder.php @@ -93,8 +93,8 @@ public function execute($repository, $refspec = null, $_ = null) { $this->arguments[] = $repository; - $refspecs = func_get_args(); - array_shift($refspecs); + $refspecs = \func_get_args(); + \array_shift($refspecs); foreach ($refspecs as $refspec) { $this->arguments[] = $refspec; } diff --git a/src/Command/PushCommandBuilder.php b/src/Command/PushCommandBuilder.php index c634d83..c218c30 100644 --- a/src/Command/PushCommandBuilder.php +++ b/src/Command/PushCommandBuilder.php @@ -301,8 +301,8 @@ public function execute($repository, $refspec = null, $_ = null) { $this->arguments[] = $repository; - $refspecs = func_get_args(); - array_shift($refspecs); + $refspecs = \func_get_args(); + \array_shift($refspecs); foreach ($refspecs as $refspec) { $this->arguments[] = $refspec; } diff --git a/src/Command/RemoteCommandBuilder.php b/src/Command/RemoteCommandBuilder.php index 5457c42..9ba3d47 100644 --- a/src/Command/RemoteCommandBuilder.php +++ b/src/Command/RemoteCommandBuilder.php @@ -356,9 +356,9 @@ public function execute() public function getNames() { $remotes = $this->execute(); - $remotes = explode("\n", $remotes); - $remotes = array_map('trim', $remotes); - $remotes = array_filter($remotes); + $remotes = \explode("\n", $remotes); + $remotes = \array_map('trim', $remotes); + $remotes = \array_filter($remotes); return $remotes; } diff --git a/src/Command/ResetCommandBuilder.php b/src/Command/ResetCommandBuilder.php index 085f2b4..eb9e59e 100644 --- a/src/Command/ResetCommandBuilder.php +++ b/src/Command/ResetCommandBuilder.php @@ -141,7 +141,7 @@ public function commit($commit) public function execute($path = null, $_ = null) { $this->arguments[] = '--'; - foreach (func_get_args() as $path) { + foreach (\func_get_args() as $path) { $this->arguments[] = $path; } return parent::run(); diff --git a/src/Command/RevParseCommandBuilder.php b/src/Command/RevParseCommandBuilder.php index 58b094e..727b5fb 100644 --- a/src/Command/RevParseCommandBuilder.php +++ b/src/Command/RevParseCommandBuilder.php @@ -431,7 +431,7 @@ public function before($date) */ public function execute($arg = null, $_ = null) { - foreach (func_get_args() as $arg) { + foreach (\func_get_args() as $arg) { $this->arguments[] = $arg; } return parent::run(); diff --git a/src/Command/RmCommandBuilder.php b/src/Command/RmCommandBuilder.php index 534bb99..7e00ed2 100644 --- a/src/Command/RmCommandBuilder.php +++ b/src/Command/RmCommandBuilder.php @@ -116,8 +116,8 @@ public function quiet() */ public function execute($pathspec = null, $_ = null) { - $args = func_get_args(); - if (count($args)) { + $args = \func_get_args(); + if (\count($args)) { $this->arguments[] = '--'; foreach ($args as $pathspec) { $this->arguments[] = $pathspec; diff --git a/src/Command/ShortLogCommandBuilder.php b/src/Command/ShortLogCommandBuilder.php index 5fd6ffc..bd0157c 100644 --- a/src/Command/ShortLogCommandBuilder.php +++ b/src/Command/ShortLogCommandBuilder.php @@ -150,8 +150,8 @@ public function w($width, $indent1 = null, $indent2 = null) */ public function execute($pathSpec = null, $_ = null) { - $args = func_get_args(); - if (count($args)) { + $args = \func_get_args(); + if (\count($args)) { $this->arguments[] = '--'; foreach ($args as $pathSpec) { $this->arguments[] = $pathSpec; diff --git a/src/Command/StatusCommandBuilder.php b/src/Command/StatusCommandBuilder.php index 0776d89..7a181bb 100644 --- a/src/Command/StatusCommandBuilder.php +++ b/src/Command/StatusCommandBuilder.php @@ -196,18 +196,18 @@ public function getStatus($pathspec = null, $_ = null) { $this->porcelain(); - $status = call_user_func_array(array($this, 'execute'), func_get_args()); - $status = explode("\n", $status); + $status = \call_user_func_array(array($this, 'execute'), \func_get_args()); + $status = \explode("\n", $status); $files = array(); foreach ($status as $line) { - if (trim($line)) { - $index = trim(substr($line, 0, 1)); - $worktree = trim(substr($line, 1, 1)); + if (\trim($line)) { + $index = \trim(\substr($line, 0, 1)); + $worktree = \trim(\substr($line, 1, 1)); if ($index && $worktree) { - $file = trim(substr($line, 2)); + $file = \trim(\substr($line, 2)); $files[$file] = array( 'index' => $index ?: false, 'worktree' => $worktree ?: false, @@ -243,17 +243,17 @@ public function getIndexStatus($pathspec = null, $_ = null) { $this->porcelain(); - $status = call_user_func_array(array($this, 'execute'), func_get_args()); - $status = explode("\n", $status); + $status = \call_user_func_array(array($this, 'execute'), \func_get_args()); + $status = \explode("\n", $status); $files = array(); foreach ($status as $line) { - if ($line = trim($line)) { - $index = substr($line, 0, 1); + if ($line = \trim($line)) { + $index = \substr($line, 0, 1); if ($index) { - $file = trim(substr($line, 2)); + $file = \trim(\substr($line, 2)); $files[$file] = $index; } } @@ -286,17 +286,17 @@ public function getWorkTreeStatus($pathspec = null, $_ = null) { $this->porcelain(); - $status = call_user_func_array(array($this, 'execute'), func_get_args()); - $status = explode("\n", $status); + $status = \call_user_func_array(array($this, 'execute'), \func_get_args()); + $status = \explode("\n", $status); $files = array(); foreach ($status as $line) { - if ($line = trim($line)) { - $worktree = trim(substr($line, 1, 1)); + if ($line = \trim($line)) { + $worktree = \trim(\substr($line, 1, 1)); if ($worktree) { - $file = trim(substr($line, 2)); + $file = \trim(\substr($line, 2)); $files[$file] = $worktree; } } @@ -320,8 +320,8 @@ public function getWorkTreeStatus($pathspec = null, $_ = null) */ public function execute($pathspec = null, $_ = null) { - $args = func_get_args(); - if (count($args)) { + $args = \func_get_args(); + if (\count($args)) { $this->arguments[] = '--'; foreach ($args as $pathspec) { $this->arguments[] = $pathspec; diff --git a/src/Command/TagCommandBuilder.php b/src/Command/TagCommandBuilder.php index 489de8f..240cca2 100644 --- a/src/Command/TagCommandBuilder.php +++ b/src/Command/TagCommandBuilder.php @@ -291,9 +291,9 @@ public function execute($tagName = null, $commit = null) public function getNames() { $tags = $this->execute(); - $tags = explode("\n", $tags); - $tags = array_map('trim', $tags); - $tags = array_filter($tags); + $tags = \explode("\n", $tags); + $tags = \array_map('trim', $tags); + $tags = \array_filter($tags); return $tags; } diff --git a/src/GitException.php b/src/GitException.php index 0b95986..2dedd91 100644 --- a/src/GitException.php +++ b/src/GitException.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Tristan Lins * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -130,8 +131,8 @@ public function getErrorOutput() public static function createFromProcess($message, Process $process) { return new static( - sprintf('%s [%s]', $message, $process->getCommandLine()) . - PHP_EOL . sprintf('work dir: %s', $process->getWorkingDirectory()) . + \sprintf('%s [%s]', $message, $process->getCommandLine()) . + PHP_EOL . \sprintf('work dir: %s', $process->getWorkingDirectory()) . PHP_EOL . $process->getErrorOutput(), $process->getWorkingDirectory(), $process->getCommandLine(), diff --git a/src/GitRepository.php b/src/GitRepository.php index 0ce1aee..20804cc 100644 --- a/src/GitRepository.php +++ b/src/GitRepository.php @@ -17,7 +17,8 @@ * @author Aaron Rubin * @author Matthew Gamble * @author Ahmad Marzouq - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -110,7 +111,7 @@ public function getConfig() */ public function isInitialized() { - return is_dir($this->repositoryPath . DIRECTORY_SEPARATOR . '.git'); + return \is_dir($this->repositoryPath . DIRECTORY_SEPARATOR . '.git'); } /** diff --git a/tests/GitRepositoryTest.php b/tests/GitRepositoryTest.php index ea30268..70f457f 100644 --- a/tests/GitRepositoryTest.php +++ b/tests/GitRepositoryTest.php @@ -55,13 +55,13 @@ class GitRepositoryTest extends TestCase public function setUp() { - $this->initializedRepositoryPath = tempnam(sys_get_temp_dir(), 'git_'); - unlink($this->initializedRepositoryPath); - mkdir($this->initializedRepositoryPath); + $this->initializedRepositoryPath = \tempnam(\sys_get_temp_dir(), 'git_'); + \unlink($this->initializedRepositoryPath); + \mkdir($this->initializedRepositoryPath); - $this->uninitializedRepositoryPath = tempnam(sys_get_temp_dir(), 'git_'); - unlink($this->uninitializedRepositoryPath); - mkdir($this->uninitializedRepositoryPath); + $this->uninitializedRepositoryPath = \tempnam(\sys_get_temp_dir(), 'git_'); + \unlink($this->uninitializedRepositoryPath); + \mkdir($this->uninitializedRepositoryPath); $zip = new \ZipArchive(); $zip->open(__DIR__ . DIRECTORY_SEPARATOR . 'git.zip'); @@ -120,7 +120,7 @@ public function testInit() $this->uninitializedGitRepository->init()->execute(); $this->assertTrue( - is_dir($this->uninitializedRepositoryPath . DIRECTORY_SEPARATOR . '.git') + \is_dir($this->uninitializedRepositoryPath . DIRECTORY_SEPARATOR . '.git') ); } @@ -181,9 +181,9 @@ public function testConfigAddOnInitializedRepository() $process->setCommandLine($process->getCommandLine()); $process->run(); - $names = explode("\n", $process->getOutput()); - $names = array_map('trim', $names); - $names = array_filter($names); + $names = \explode("\n", $process->getOutput()); + $names = \array_map('trim', $names); + $names = \array_filter($names); $this->assertEquals( array('CCA unittest', 'CCA unittest 2'), @@ -195,9 +195,9 @@ public function testConfigGetAllOnInitializedRepository() { $values = $this->initializedGitRepository->config()->file('local')->getAll('gitphp.test2')->execute(); - $values = explode("\n", $values); - $values = array_map('trim', $values); - $values = array_filter($values); + $values = \explode("\n", $values); + $values = \array_map('trim', $values); + $values = \array_filter($values); $this->assertEquals( array('aa123', 'ab234', 'ac345', 'bb234'), @@ -206,9 +206,9 @@ public function testConfigGetAllOnInitializedRepository() $values = $this->initializedGitRepository->config()->file('local')->getAll('gitphp.test2', '^a.+3.+$')->execute(); - $values = explode("\n", $values); - $values = array_map('trim', $values); - $values = array_filter($values); + $values = \explode("\n", $values); + $values = \array_map('trim', $values); + $values = \array_filter($values); $this->assertEquals( array('ab234', 'ac345'), @@ -326,7 +326,7 @@ public function testRemoteSetUrlOnInitializedRepository() $process->run(); $this->assertEquals( - trim($process->getOutput()), + \trim($process->getOutput()), $this->uninitializedRepositoryPath ); } @@ -361,7 +361,7 @@ public function testRemoteSetPushUrlOnInitializedRepository() $process->run(); $this->assertEquals( - trim($process->getOutput()), + \trim($process->getOutput()), '/tmp/git' ); @@ -370,7 +370,7 @@ public function testRemoteSetPushUrlOnInitializedRepository() $process->run(); $this->assertEquals( - trim($process->getOutput()), + \trim($process->getOutput()), $this->uninitializedRepositoryPath ); } @@ -449,7 +449,7 @@ public function testRemoteFetchOnInitializedRepository() $branches = array_filter($branches); $this->assertTrue( - in_array('remotes/origin/master', $branches) + \in_array('remotes/origin/master', $branches) ); } @@ -487,7 +487,7 @@ public function testCheckoutOnInitializedRepository() $process->run(); $this->assertEquals( - trim($process->getOutput()), + \trim($process->getOutput()), 'annotated-tag' ); } @@ -571,11 +571,11 @@ public function testAddOnInitializedRepository() $process->setCommandLine($process->getCommandLine()); $process->run(); - $status = explode("\n", $process->getOutput()); - $status = array_map('trim', $status); + $status = \explode("\n", $process->getOutput()); + $status = \array_map('trim', $status); $this->assertTrue( - in_array('A unknown-file.txt', $status) + \in_array('A unknown-file.txt', $status) ); } @@ -606,11 +606,11 @@ public function testRmOnInitializedRepository() $process->setCommandLine($process->getCommandLine()); $process->run(); - $status = explode("\n", $process->getOutput()); - $status = array_map('trim', $status); + $status = \explode("\n", $process->getOutput()); + $status = \array_map('trim', $status); $this->assertTrue( - in_array('D existing-file.txt', $status) + \in_array('D existing-file.txt', $status) ); } @@ -642,9 +642,9 @@ public function testCommitOnInitializedRepository() $process->setCommandLine($process->getCommandLine()); $process->run(); - $status = explode("\n", $process->getOutput()); - $status = array_map('trim', $status); - $status = array_filter($status); + $status = \explode("\n", $process->getOutput()); + $status = \array_map('trim', $status); + $status = \array_filter($status); $this->assertEquals( array( @@ -684,12 +684,12 @@ public function testTagOnInitializedRepository() $process->setCommandLine($process->getCommandLine()); $process->run(); - $tags = explode("\n", $process->getOutput()); - $tags = array_map('trim', $tags); - $tags = array_filter($tags); + $tags = \explode("\n", $process->getOutput()); + $tags = \array_map('trim', $tags); + $tags = \array_filter($tags); $this->assertTrue( - in_array('unit-test', $tags) + \in_array('unit-test', $tags) ); } From 649104bd2749675355549ef0a58297a89ed76dae Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Sat, 25 Aug 2018 22:31:21 +0200 Subject: [PATCH 26/48] Convert array to the short syntax --- src/Command/ConfigCommandBuilder.php | 4 ++-- src/Command/LsRemoteCommandBuilder.php | 4 ++-- src/Command/StatusCommandBuilder.php | 16 ++++++++-------- tests/GitRepositoryTest.php | 24 ++++++++++++------------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/Command/ConfigCommandBuilder.php b/src/Command/ConfigCommandBuilder.php index aba1f84..6fbd02e 100644 --- a/src/Command/ConfigCommandBuilder.php +++ b/src/Command/ConfigCommandBuilder.php @@ -47,7 +47,7 @@ protected function initializeProcessBuilder() */ public function file($file) { - if (\in_array($file, array('global', 'system', 'local'))) { + if (\in_array($file, ['global', 'system', 'local'])) { $this->arguments[] = '--' . $file; } else { $this->arguments[] = '--file'; @@ -82,7 +82,7 @@ public function blob($blobId) */ public function type($type) { - if (\in_array($type, array('bool', 'int', 'bool-or-int', 'path'))) { + if (\in_array($type, ['bool', 'int', 'bool-or-int', 'path'])) { $this->arguments[] = '--' . $type; } else { throw new \InvalidArgumentException('Invalid configuration type supplied.'); diff --git a/src/Command/LsRemoteCommandBuilder.php b/src/Command/LsRemoteCommandBuilder.php index fb4e25d..122eb7b 100644 --- a/src/Command/LsRemoteCommandBuilder.php +++ b/src/Command/LsRemoteCommandBuilder.php @@ -127,12 +127,12 @@ public function execute($remote, $refSpec = null, $_ = null) */ public function getRefs($remote, $refSpec = null, $_ = null) { - $output = \call_user_func_array(array($this, 'execute'), \func_get_args()); + $output = \call_user_func_array([$this, 'execute'], \func_get_args()); $output = \explode("\n", $output); $output = \array_map('trim', $output); $output = \array_filter($output); - $refs = array(); + $refs = []; foreach ($output as $line) { $line = \preg_split('~\s+~', $line); diff --git a/src/Command/StatusCommandBuilder.php b/src/Command/StatusCommandBuilder.php index 7a181bb..787e54c 100644 --- a/src/Command/StatusCommandBuilder.php +++ b/src/Command/StatusCommandBuilder.php @@ -196,10 +196,10 @@ public function getStatus($pathspec = null, $_ = null) { $this->porcelain(); - $status = \call_user_func_array(array($this, 'execute'), \func_get_args()); + $status = \call_user_func_array([$this, 'execute'], \func_get_args()); $status = \explode("\n", $status); - $files = array(); + $files = []; foreach ($status as $line) { if (\trim($line)) { @@ -208,10 +208,10 @@ public function getStatus($pathspec = null, $_ = null) if ($index && $worktree) { $file = \trim(\substr($line, 2)); - $files[$file] = array( + $files[$file] = [ 'index' => $index ?: false, 'worktree' => $worktree ?: false, - ); + ]; } } } @@ -243,10 +243,10 @@ public function getIndexStatus($pathspec = null, $_ = null) { $this->porcelain(); - $status = \call_user_func_array(array($this, 'execute'), \func_get_args()); + $status = \call_user_func_array([$this, 'execute'], \func_get_args()); $status = \explode("\n", $status); - $files = array(); + $files = []; foreach ($status as $line) { if ($line = \trim($line)) { @@ -286,10 +286,10 @@ public function getWorkTreeStatus($pathspec = null, $_ = null) { $this->porcelain(); - $status = \call_user_func_array(array($this, 'execute'), \func_get_args()); + $status = \call_user_func_array([$this, 'execute'], \func_get_args()); $status = \explode("\n", $status); - $files = array(); + $files = []; foreach ($status as $line) { if ($line = \trim($line)) { diff --git a/tests/GitRepositoryTest.php b/tests/GitRepositoryTest.php index 70f457f..abb11e0 100644 --- a/tests/GitRepositoryTest.php +++ b/tests/GitRepositoryTest.php @@ -186,7 +186,7 @@ public function testConfigAddOnInitializedRepository() $names = \array_filter($names); $this->assertEquals( - array('CCA unittest', 'CCA unittest 2'), + ['CCA unittest', 'CCA unittest 2'], $names ); } @@ -200,7 +200,7 @@ public function testConfigGetAllOnInitializedRepository() $values = \array_filter($values); $this->assertEquals( - array('aa123', 'ab234', 'ac345', 'bb234'), + ['aa123', 'ab234', 'ac345', 'bb234'], $values ); @@ -211,7 +211,7 @@ public function testConfigGetAllOnInitializedRepository() $values = \array_filter($values); $this->assertEquals( - array('ab234', 'ac345'), + ['ab234', 'ac345'], $values ); } @@ -223,7 +223,7 @@ public function testConfigGetAllOnInitializedRepository() public function testListRemotesOnInitializedRepository() { $this->assertEquals( - array('local'), + ['local'], $this->initializedGitRepository->remote()->getNames() ); } @@ -251,11 +251,11 @@ public function testListRemotesOnUninitializedRepository() public function testListBranchesOnInitializedRepository() { $this->assertEquals( - array('master'), + ['master'], $this->initializedGitRepository->branch()->getNames() ); $this->assertEquals( - array('master', 'remotes/local/master'), + ['master', 'remotes/local/master'], $this->initializedGitRepository->branch()->all()->getNames() ); } @@ -536,10 +536,10 @@ public function testStatusOnInitializedRepository() $status = $this->initializedGitRepository->status()->getStatus(); $this->assertEquals( - array( - 'removed-but-staged.txt' => array('index' => 'A', 'worktree' => 'D'), - 'unknown-file.txt' => array('index' => '?', 'worktree' => '?'), - ), + [ + 'removed-but-staged.txt' => ['index' => 'A', 'worktree' => 'D'], + 'unknown-file.txt' => ['index' => '?', 'worktree' => '?'], + ], $status ); } @@ -647,11 +647,11 @@ public function testCommitOnInitializedRepository() $status = \array_filter($status); $this->assertEquals( - array( + [ 'D existing-file.txt', 'D removed-but-staged.txt', '?? unknown-file.txt', - ), + ], $status ); } From 45de0cd2d37749b9cd639b806d88f2f0aeb90522 Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Sat, 25 Aug 2018 22:36:41 +0200 Subject: [PATCH 27/48] Remove null assignment for class property --- src/GitConfig.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/GitConfig.php b/src/GitConfig.php index 23709fb..9f5e183 100644 --- a/src/GitConfig.php +++ b/src/GitConfig.php @@ -13,7 +13,8 @@ * @package bit3/git-php * @author Tristan Lins * @author Christian Schiffler - * @copyright 2014 Tristan Lins + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -41,14 +42,14 @@ class GitConfig * * @var string|null */ - protected $signCommitUser = null; + protected $signCommitUser; /** * ID of the GPG certificate to sign tags. * * @var string|null */ - protected $signTagUser = null; + protected $signTagUser; /** * Logger facility. From b60170470d68b6be5e91ca0da8dc61223a678570 Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Sat, 25 Aug 2018 22:37:28 +0200 Subject: [PATCH 28/48] Fix return annotation --- src/Command/InitCommandBuilder.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Command/InitCommandBuilder.php b/src/Command/InitCommandBuilder.php index 865e011..327b69d 100644 --- a/src/Command/InitCommandBuilder.php +++ b/src/Command/InitCommandBuilder.php @@ -52,7 +52,7 @@ protected function initializeProcessBuilder() /** * Add the quiet option to the command line. * - * @return FetchCommandBuilder + * @return InitCommandBuilder */ public function quiet() { @@ -63,7 +63,7 @@ public function quiet() /** * Add the bare option to the command line. * - * @return FetchCommandBuilder + * @return InitCommandBuilder */ public function bare() { @@ -76,7 +76,7 @@ public function bare() * * @param string $templateDirectory Path to the template directory. * - * @return FetchCommandBuilder + * @return InitCommandBuilder */ public function template($templateDirectory) { @@ -89,7 +89,7 @@ public function template($templateDirectory) * * @param string $gitDir Path to the .git dir. * - * @return FetchCommandBuilder + * @return InitCommandBuilder */ public function separateGitDir($gitDir) { @@ -102,7 +102,7 @@ public function separateGitDir($gitDir) * * @param string $share The share value. * - * @return FetchCommandBuilder + * @return InitCommandBuilder */ public function shared($share) { From 7607b045d5cb19b780698013a4e29e9697823a7c Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Sat, 25 Aug 2018 23:04:16 +0200 Subject: [PATCH 29/48] Convert abstract class to trait --- src/Command/AddCommandBuilder.php | 6 +++-- src/Command/BranchCommandBuilder.php | 6 +++-- src/Command/CheckoutCommandBuilder.php | 6 +++-- src/Command/CloneCommandBuilder.php | 6 +++-- ...andBuilder.php => CommandBuilderTrait.php} | 6 ++--- src/Command/CommitCommandBuilder.php | 6 +++-- src/Command/ConfigCommandBuilder.php | 6 +++-- src/Command/DescribeCommandBuilder.php | 6 +++-- src/Command/FetchCommandBuilder.php | 6 +++-- src/Command/InitCommandBuilder.php | 6 +++-- src/Command/LogCommandBuilder.php | 6 +++-- src/Command/LsRemoteCommandBuilder.php | 4 ++- src/Command/MergeCommandBuilder.php | 6 +++-- src/Command/PullCommandBuilder.php | 5 ++-- src/Command/PushCommandBuilder.php | 6 +++-- src/Command/RemoteCommandBuilder.php | 4 ++- src/Command/ResetCommandBuilder.php | 6 +++-- src/Command/RevParseCommandBuilder.php | 6 +++-- src/Command/RmCommandBuilder.php | 6 +++-- src/Command/ShortLogCommandBuilder.php | 6 +++-- src/Command/ShowCommandBuilder.php | 6 +++-- src/Command/StashCommandBuilder.php | 26 ++++++++++--------- src/Command/StatusCommandBuilder.php | 6 +++-- src/Command/TagCommandBuilder.php | 6 +++-- 24 files changed, 101 insertions(+), 58 deletions(-) rename src/Command/{AbstractCommandBuilder.php => CommandBuilderTrait.php} (96%) diff --git a/src/Command/AddCommandBuilder.php b/src/Command/AddCommandBuilder.php index 4254c98..482abfe 100644 --- a/src/Command/AddCommandBuilder.php +++ b/src/Command/AddCommandBuilder.php @@ -27,8 +27,10 @@ * * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ -class AddCommandBuilder extends AbstractCommandBuilder +class AddCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; + /** * {@inheritDoc} */ @@ -180,6 +182,6 @@ public function execute($pathspec = null, $_ = null) $this->arguments[] = $pathspec; } } - return parent::run(); + return $this->run(); } } diff --git a/src/Command/BranchCommandBuilder.php b/src/Command/BranchCommandBuilder.php index f4462ec..8f1349a 100644 --- a/src/Command/BranchCommandBuilder.php +++ b/src/Command/BranchCommandBuilder.php @@ -27,8 +27,10 @@ * * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ -class BranchCommandBuilder extends AbstractCommandBuilder +class BranchCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; + const WHEN_ALWAYS = 'always'; const WHEN_NEVER = 'never'; @@ -334,7 +336,7 @@ public function execute($branchName = null) if ($branchName) { $this->arguments[] = $branchName; } - return parent::run(); + return $this->run(); } /** diff --git a/src/Command/CheckoutCommandBuilder.php b/src/Command/CheckoutCommandBuilder.php index 55d0b3b..2b39df8 100644 --- a/src/Command/CheckoutCommandBuilder.php +++ b/src/Command/CheckoutCommandBuilder.php @@ -27,8 +27,10 @@ * * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ -class CheckoutCommandBuilder extends AbstractCommandBuilder +class CheckoutCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; + /** * {@inheritDoc} */ @@ -228,6 +230,6 @@ public function execute($branchOrTreeIsh = null, $path = null, $_ = null) } } - return parent::run(); + return $this->run(); } } diff --git a/src/Command/CloneCommandBuilder.php b/src/Command/CloneCommandBuilder.php index ef5d9cb..0c021c4 100644 --- a/src/Command/CloneCommandBuilder.php +++ b/src/Command/CloneCommandBuilder.php @@ -27,8 +27,10 @@ * * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ -class CloneCommandBuilder extends AbstractCommandBuilder +class CloneCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; + /** * {@inheritDoc} */ @@ -292,6 +294,6 @@ public function execute($repositoryUrl) { $this->arguments[] = $repositoryUrl; $this->arguments[] = $this->repository->getRepositoryPath(); - return parent::run(); + return $this->run(); } } diff --git a/src/Command/AbstractCommandBuilder.php b/src/Command/CommandBuilderTrait.php similarity index 96% rename from src/Command/AbstractCommandBuilder.php rename to src/Command/CommandBuilderTrait.php index 49e0e16..a25cfc0 100644 --- a/src/Command/AbstractCommandBuilder.php +++ b/src/Command/CommandBuilderTrait.php @@ -32,7 +32,7 @@ * * @SuppressWarnings(PHPMD.NumberOfChildren) */ -abstract class AbstractCommandBuilder implements CommandBuilderInterface +trait CommandBuilderTrait { /** * The path to the git repository. @@ -99,9 +99,7 @@ public function enableDryRun() * * @return void */ - protected function initializeProcessBuilder() - { - } + abstract protected function initializeProcessBuilder(); /** * Retrieve the output text. diff --git a/src/Command/CommitCommandBuilder.php b/src/Command/CommitCommandBuilder.php index 58e9b5e..bd28aad 100644 --- a/src/Command/CommitCommandBuilder.php +++ b/src/Command/CommitCommandBuilder.php @@ -27,8 +27,10 @@ * * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ -class CommitCommandBuilder extends AbstractCommandBuilder +class CommitCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; + const CLEANUP_STRIP = 'strip'; const CLEANUP_WHITESPACE = 'whitespace'; @@ -466,6 +468,6 @@ public function execute($pathspec = null, $_ = null) } } - return parent::run(); + return $this->run(); } } diff --git a/src/Command/ConfigCommandBuilder.php b/src/Command/ConfigCommandBuilder.php index 6fbd02e..4584f20 100644 --- a/src/Command/ConfigCommandBuilder.php +++ b/src/Command/ConfigCommandBuilder.php @@ -27,8 +27,10 @@ * * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ -class ConfigCommandBuilder extends AbstractCommandBuilder +class ConfigCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; + /** * {@inheritDoc} */ @@ -372,6 +374,6 @@ public function execute($name = null, $value = null, $valueRegex = null) } } } - return parent::run(); + return $this->run(); } } diff --git a/src/Command/DescribeCommandBuilder.php b/src/Command/DescribeCommandBuilder.php index afc8395..d1f2415 100644 --- a/src/Command/DescribeCommandBuilder.php +++ b/src/Command/DescribeCommandBuilder.php @@ -27,8 +27,10 @@ * * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ -class DescribeCommandBuilder extends AbstractCommandBuilder +class DescribeCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; + /** * {@inheritDoc} */ @@ -195,6 +197,6 @@ public function firstParent() public function execute($commit = 'HEAD') { $this->arguments[] = $commit; - return parent::run(); + return $this->run(); } } diff --git a/src/Command/FetchCommandBuilder.php b/src/Command/FetchCommandBuilder.php index 2d0d240..c288047 100644 --- a/src/Command/FetchCommandBuilder.php +++ b/src/Command/FetchCommandBuilder.php @@ -27,8 +27,10 @@ * * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ -class FetchCommandBuilder extends AbstractCommandBuilder +class FetchCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; + const RECURSE_SUBMODULES_YES = 'yes'; const RECURSE_SUBMODULES_ON_DEMAND = 'on-demand'; @@ -299,6 +301,6 @@ public function execute($repository = 'origin', $refspec = null, $_ = null) $this->arguments[] = $refspec; } - return parent::run(); + return $this->run(); } } diff --git a/src/Command/InitCommandBuilder.php b/src/Command/InitCommandBuilder.php index 327b69d..6864b23 100644 --- a/src/Command/InitCommandBuilder.php +++ b/src/Command/InitCommandBuilder.php @@ -25,8 +25,10 @@ /** * Init command builder. */ -class InitCommandBuilder extends AbstractCommandBuilder +class InitCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; + const SHARE_FALSE = 'false'; const SHARE_TRUE = 'true'; @@ -118,6 +120,6 @@ public function shared($share) public function execute() { $this->arguments[] = $this->repository->getRepositoryPath(); - return parent::run(); + return $this->run(); } } diff --git a/src/Command/LogCommandBuilder.php b/src/Command/LogCommandBuilder.php index d818c72..55dd086 100644 --- a/src/Command/LogCommandBuilder.php +++ b/src/Command/LogCommandBuilder.php @@ -30,8 +30,10 @@ * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ -class LogCommandBuilder extends AbstractCommandBuilder +class LogCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; + const DECORATE_SHORT = 'short'; const DECORATE_FULL = 'full'; @@ -1082,6 +1084,6 @@ public function execute($pathspec = null, $_ = null) $this->arguments[] = $pathspec; } } - return parent::run(); + return $this->run(); } } diff --git a/src/Command/LsRemoteCommandBuilder.php b/src/Command/LsRemoteCommandBuilder.php index 122eb7b..a2b20ec 100644 --- a/src/Command/LsRemoteCommandBuilder.php +++ b/src/Command/LsRemoteCommandBuilder.php @@ -25,8 +25,10 @@ /** * Ls remote command builder. */ -class LsRemoteCommandBuilder extends AbstractCommandBuilder +class LsRemoteCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; + /** * {@inheritDoc} */ diff --git a/src/Command/MergeCommandBuilder.php b/src/Command/MergeCommandBuilder.php index 25d5d0a..a75a5cc 100644 --- a/src/Command/MergeCommandBuilder.php +++ b/src/Command/MergeCommandBuilder.php @@ -25,8 +25,10 @@ /** * Merge command builder. */ -class MergeCommandBuilder extends AbstractCommandBuilder +class MergeCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; + /** * {@inheritDoc} */ @@ -89,6 +91,6 @@ public function execute($branchOrTreeIsh = null, $path = null, $_ = null) } } - return parent::run(); + return $this->run(); } } diff --git a/src/Command/PullCommandBuilder.php b/src/Command/PullCommandBuilder.php index 5916df3..00a26d5 100644 --- a/src/Command/PullCommandBuilder.php +++ b/src/Command/PullCommandBuilder.php @@ -27,8 +27,9 @@ * * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ -class PullCommandBuilder extends AbstractCommandBuilder +class PullCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; /** * {@inheritDoc} @@ -99,6 +100,6 @@ public function execute($repository, $refspec = null, $_ = null) $this->arguments[] = $refspec; } - return parent::run(); + return $this->run(); } } diff --git a/src/Command/PushCommandBuilder.php b/src/Command/PushCommandBuilder.php index c218c30..84e53f9 100644 --- a/src/Command/PushCommandBuilder.php +++ b/src/Command/PushCommandBuilder.php @@ -27,8 +27,10 @@ * * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ -class PushCommandBuilder extends AbstractCommandBuilder +class PushCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; + const RECURSE_SUBMODULES_CHECK = 'check'; const RECURSE_SUBMODULES_ON_DEMAND = 'on-demand'; @@ -307,6 +309,6 @@ public function execute($repository, $refspec = null, $_ = null) $this->arguments[] = $refspec; } - return parent::run(); + return $this->run(); } } diff --git a/src/Command/RemoteCommandBuilder.php b/src/Command/RemoteCommandBuilder.php index 9ba3d47..5d56c6b 100644 --- a/src/Command/RemoteCommandBuilder.php +++ b/src/Command/RemoteCommandBuilder.php @@ -27,8 +27,10 @@ * * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ -class RemoteCommandBuilder extends AbstractCommandBuilder +class RemoteCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; + /** * {@inheritDoc} */ diff --git a/src/Command/ResetCommandBuilder.php b/src/Command/ResetCommandBuilder.php index eb9e59e..11235ca 100644 --- a/src/Command/ResetCommandBuilder.php +++ b/src/Command/ResetCommandBuilder.php @@ -25,8 +25,10 @@ /** * Reset command builder. */ -class ResetCommandBuilder extends AbstractCommandBuilder +class ResetCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; + /** * {@inheritDoc} */ @@ -144,6 +146,6 @@ public function execute($path = null, $_ = null) foreach (\func_get_args() as $path) { $this->arguments[] = $path; } - return parent::run(); + return $this->run(); } } diff --git a/src/Command/RevParseCommandBuilder.php b/src/Command/RevParseCommandBuilder.php index 727b5fb..ac47b7a 100644 --- a/src/Command/RevParseCommandBuilder.php +++ b/src/Command/RevParseCommandBuilder.php @@ -28,8 +28,10 @@ * * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ -class RevParseCommandBuilder extends AbstractCommandBuilder +class RevParseCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; + const ABBREV_REF_STRICT = 'strict'; const ABBREV_REF_LOOSE = 'loose'; @@ -434,6 +436,6 @@ public function execute($arg = null, $_ = null) foreach (\func_get_args() as $arg) { $this->arguments[] = $arg; } - return parent::run(); + return $this->run(); } } diff --git a/src/Command/RmCommandBuilder.php b/src/Command/RmCommandBuilder.php index 7e00ed2..3911aef 100644 --- a/src/Command/RmCommandBuilder.php +++ b/src/Command/RmCommandBuilder.php @@ -25,8 +25,10 @@ /** * Rm command builder. */ -class RmCommandBuilder extends AbstractCommandBuilder +class RmCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; + /** * {@inheritDoc} */ @@ -123,6 +125,6 @@ public function execute($pathspec = null, $_ = null) $this->arguments[] = $pathspec; } } - return parent::run(); + return $this->run(); } } diff --git a/src/Command/ShortLogCommandBuilder.php b/src/Command/ShortLogCommandBuilder.php index bd0157c..8340d1e 100644 --- a/src/Command/ShortLogCommandBuilder.php +++ b/src/Command/ShortLogCommandBuilder.php @@ -26,8 +26,10 @@ /** * ShortLog command builder. */ -class ShortLogCommandBuilder extends AbstractCommandBuilder +class ShortLogCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; + /** * {@inheritDoc} */ @@ -158,6 +160,6 @@ public function execute($pathSpec = null, $_ = null) } } - return parent::run(); + return $this->run(); } } diff --git a/src/Command/ShowCommandBuilder.php b/src/Command/ShowCommandBuilder.php index 1847879..020577e 100644 --- a/src/Command/ShowCommandBuilder.php +++ b/src/Command/ShowCommandBuilder.php @@ -27,8 +27,10 @@ * * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ -class ShowCommandBuilder extends AbstractCommandBuilder +class ShowCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; + /** * {@inheritDoc} */ @@ -204,6 +206,6 @@ public function noPatch() public function execute($object) { $this->arguments[] = $object; - return parent::run(); + return $this->run(); } } diff --git a/src/Command/StashCommandBuilder.php b/src/Command/StashCommandBuilder.php index 91215a8..480a832 100644 --- a/src/Command/StashCommandBuilder.php +++ b/src/Command/StashCommandBuilder.php @@ -26,8 +26,10 @@ * * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ -class StashCommandBuilder extends AbstractCommandBuilder +class StashCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; + /** * {@inheritDoc} */ @@ -62,7 +64,7 @@ public function listStash($options = null) if ($options) { $this->arguments[] = $options; } - return parent::run(); + return $this->run(); } /** @@ -80,7 +82,7 @@ public function show($stash = null) if ($stash) { $this->arguments[] = 'stash@{' . $stash . '}'; } - return parent::run(); + return $this->run(); } /** @@ -97,7 +99,7 @@ public function drop($stash = null) if ($stash) { $this->arguments[] = 'stash@{' . $stash . '}'; } - return parent::run(); + return $this->run(); } /** @@ -114,7 +116,7 @@ public function pop($stash = null) if ($stash) { $this->arguments[] = 'stash@{' . $stash . '}'; } - return parent::run(); + return $this->run(); } /** @@ -132,7 +134,7 @@ public function apply($stash = null) if ($stash) { $this->arguments[] = 'stash@{' . $stash . '}'; } - return parent::run(); + return $this->run(); } @@ -154,7 +156,7 @@ public function branch($branchname, $stash = null) if ($stash) { $this->arguments[] = 'stash@{' . $stash . '}'; } - return parent::run(); + return $this->run(); } @@ -166,7 +168,7 @@ public function branch($branchname, $stash = null) public function clear() { $this->arguments[] = 'clear'; - return parent::run(); + return $this->run(); } @@ -186,7 +188,7 @@ public function save($message = null) if ($message) { $this->arguments[] = $message; } - return parent::run(); + return $this->run(); } /** @@ -204,7 +206,7 @@ public function create($message = null) if ($message) { $this->arguments[] = $message; } - return parent::run(); + return $this->run(); } /** @@ -227,7 +229,7 @@ public function store($message = null, $commit = null) if ($commit) { $this->arguments[] = $commit; } - return parent::run(); + return $this->run(); } /** * Execute the command and return the result. @@ -237,6 +239,6 @@ public function store($message = null, $commit = null) */ public function execute() { - return parent::run(); + return $this->run(); } } diff --git a/src/Command/StatusCommandBuilder.php b/src/Command/StatusCommandBuilder.php index 787e54c..1f348c0 100644 --- a/src/Command/StatusCommandBuilder.php +++ b/src/Command/StatusCommandBuilder.php @@ -27,8 +27,10 @@ * * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ -class StatusCommandBuilder extends AbstractCommandBuilder +class StatusCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; + const UNTRACKED_FILES_NO = 'no'; const UNTRACKED_FILES_NORMAL = 'normal'; @@ -327,6 +329,6 @@ public function execute($pathspec = null, $_ = null) $this->arguments[] = $pathspec; } } - return parent::run(); + return $this->run(); } } diff --git a/src/Command/TagCommandBuilder.php b/src/Command/TagCommandBuilder.php index 240cca2..c089b99 100644 --- a/src/Command/TagCommandBuilder.php +++ b/src/Command/TagCommandBuilder.php @@ -27,8 +27,10 @@ * * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ -class TagCommandBuilder extends AbstractCommandBuilder +class TagCommandBuilder implements CommandBuilderInterface { + use CommandBuilderTrait; + const CLEANUP_VERBATIM = 'verbatim'; const CLEANUP_WHITESPACE = 'whitespace'; @@ -280,7 +282,7 @@ public function execute($tagName = null, $commit = null) $this->arguments[] = $commit; } - return parent::run(); + return $this->run(); } /** From 745fd1ec91062fc308fc719df8a45c2b747a0006 Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Sat, 25 Aug 2018 23:05:11 +0200 Subject: [PATCH 30/48] Code styling --- src/Command/MergeCommandBuilder.php | 64 ++++++++++++++--------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/src/Command/MergeCommandBuilder.php b/src/Command/MergeCommandBuilder.php index a75a5cc..ff5ba5d 100644 --- a/src/Command/MergeCommandBuilder.php +++ b/src/Command/MergeCommandBuilder.php @@ -27,55 +27,55 @@ */ class MergeCommandBuilder implements CommandBuilderInterface { - use CommandBuilderTrait; + use CommandBuilderTrait; - /** - * {@inheritDoc} - */ + /** + * {@inheritDoc} + */ protected function initializeProcessBuilder() { $this->arguments[] = 'merge'; } - /** - * Add the quiet option to the command line. - * - * @return MergeCommandBuilder - */ + /** + * Add the quiet option to the command line. + * + * @return MergeCommandBuilder + */ public function quiet() { $this->arguments[] = '--quiet'; return $this; } - /** - * Add the strategy option to the command line with the given strategy. - * - * @param string $strategy Strategy to use when merging. - * - * @return MergeCommandBuilder - */ + /** + * Add the strategy option to the command line with the given strategy. + * + * @param string $strategy Strategy to use when merging. + * + * @return MergeCommandBuilder + */ public function strategy($strategy) { - $this->arguments[] = '--strategy='.$strategy; + $this->arguments[] = '--strategy=' . $strategy; return $this; } - /** - * Build the command and execute it. - * - * @param null|string $branchOrTreeIsh Name of the branch or tree. - * - * @param null| $path Path to which check out. - * - * @param null|string $_ More optional arguments to append to the command. - * - * @return mixed - * - * @SuppressWarnings(PHPMD.ShortVariableName) - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * @SuppressWarnings(PHPMD.CamelCaseParameterName) - */ + /** + * Build the command and execute it. + * + * @param null|string $branchOrTreeIsh Name of the branch or tree. + * + * @param null| $path Path to which check out. + * + * @param null|string $_ More optional arguments to append to the command. + * + * @return mixed + * + * @SuppressWarnings(PHPMD.ShortVariableName) + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.CamelCaseParameterName) + */ public function execute($branchOrTreeIsh = null, $path = null, $_ = null) { if ($branchOrTreeIsh) { From 2e5dd589b2648edd4401580b15d4ebe68d229627 Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Sat, 25 Aug 2018 23:06:47 +0200 Subject: [PATCH 31/48] Bump branch alias --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index f58fb21..3eec1e7 100644 --- a/composer.json +++ b/composer.json @@ -21,8 +21,8 @@ "prefer-stable": true, "extra": { "branch-alias": { - "dev-master": "1.4.x-dev", - "dev-develop": "1.5.x-dev" + "dev-master": "1.5.x-dev", + "dev-develop": "1.6.x-dev" } } } From ac4841efacc017bd352a94f29435e2945c55b8c6 Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Mon, 27 Aug 2018 12:21:31 +0200 Subject: [PATCH 32/48] Fix author validation issue --- src/Command/AbstractCommandBuilder.php | 35 ++++++++++++++++++++++++++ src/Command/ShortLogCommandBuilder.php | 1 - 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 src/Command/AbstractCommandBuilder.php diff --git a/src/Command/AbstractCommandBuilder.php b/src/Command/AbstractCommandBuilder.php new file mode 100644 index 0000000..0ba22b1 --- /dev/null +++ b/src/Command/AbstractCommandBuilder.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * This project is provided in good faith and hope to be usable by anyone. + * + * @package bit3/git-php + * @author Tristan Lins + * @author Christian Schiffler + * @author Sven Baumann + * @copyright 2014-2018 Tristan Lins + * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT + * @link https://github.com/bit3/git-php + * @filesource + */ + +namespace Bit3\GitPhp\Command; + +/** + * Abstract command builder. + * + * @SuppressWarnings(PHPMD.NumberOfChildren) + * + * @deprecated This class is deprecated since 1.5 and where removed in 2.0. Use the trait CommandBuilderTrait. + */ +abstract class AbstractCommandBuilder implements CommandBuilderInterface +{ + use CommandBuilderTrait; +} diff --git a/src/Command/ShortLogCommandBuilder.php b/src/Command/ShortLogCommandBuilder.php index 8340d1e..a871d9a 100644 --- a/src/Command/ShortLogCommandBuilder.php +++ b/src/Command/ShortLogCommandBuilder.php @@ -13,7 +13,6 @@ * @package bit3/git-php * @author David Molineus * @author Christian Schiffler - * @author Tristan Lins * @author Sven Baumann * @copyright 2014-2018 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT From d1ef6e5671d877720c576e55cc8e0f6f965b47a7 Mon Sep 17 00:00:00 2001 From: Christian Schiffler Date: Mon, 27 Aug 2018 16:53:06 +0200 Subject: [PATCH 33/48] Remove minimum stability --- composer.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/composer.json b/composer.json index 3eec1e7..7a119f2 100644 --- a/composer.json +++ b/composer.json @@ -17,8 +17,6 @@ "Bit3\\GitPhp\\Test\\": "tests" } }, - "minimum-stability": "dev", - "prefer-stable": true, "extra": { "branch-alias": { "dev-master": "1.5.x-dev", From ee4eb76da23ff556f9894798d6a93053eb633e77 Mon Sep 17 00:00:00 2001 From: Idris Dose Date: Fri, 27 Dec 2019 17:18:46 +1100 Subject: [PATCH 34/48] Added default value for PullCommand to mirror FetchCommand --- src/Command/PullCommandBuilder.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Command/PullCommandBuilder.php b/src/Command/PullCommandBuilder.php index 00a26d5..de86df9 100644 --- a/src/Command/PullCommandBuilder.php +++ b/src/Command/PullCommandBuilder.php @@ -74,7 +74,6 @@ public function recurseSubmodules($recurse) return $this; } - /** * Build the command and execute it. * @@ -90,7 +89,7 @@ public function recurseSubmodules($recurse) * @SuppressWarnings(PHPMD.UnusedFormalParameter) * @SuppressWarnings(PHPMD.CamelCaseParameterName) */ - public function execute($repository, $refspec = null, $_ = null) + public function execute($repository = 'origin', $refspec = null, $_ = null) { $this->arguments[] = $repository; From 4d560a4621efb2bc869f15756eb48d4bf3c5bda8 Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Tue, 27 Dec 2022 09:45:59 +0100 Subject: [PATCH 35/48] Adapt branch alias --- composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 7a119f2..131dd0e 100644 --- a/composer.json +++ b/composer.json @@ -19,8 +19,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.5.x-dev", - "dev-develop": "1.6.x-dev" + "dev-release/1.5.1": "1.5.1-dev" } } } From 48c171d80bf42b1e0378a206d12f35a9d6c52cbf Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Tue, 27 Dec 2022 09:49:29 +0100 Subject: [PATCH 36/48] Update Symfony requirements --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 131dd0e..7456715 100644 --- a/composer.json +++ b/composer.json @@ -5,10 +5,10 @@ "require": { "php": "^5.6 || ^7.0", "psr/log": "^1.0", - "symfony/process": "^3.4 || ^4.0" + "symfony/process": "^3.4 || ^4.0 || ^5.0" }, "require-dev": { - "symfony/filesystem": "^3.4 || ^4.0", + "symfony/filesystem": "^3.4 || ^4.0 || ^5.0", "phpcq/all-tasks": "^1.1" }, "autoload": { From dd22409c8ceda0ccaafdcdf2bbcfb9ad49f5d8b0 Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Tue, 27 Dec 2022 10:46:57 +0100 Subject: [PATCH 37/48] Define which phpunit version is allowed in our test case --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7456715..157cec0 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,8 @@ }, "require-dev": { "symfony/filesystem": "^3.4 || ^4.0 || ^5.0", - "phpcq/all-tasks": "^1.1" + "phpcq/all-tasks": "^1.1", + "phpunit/phpunit": "^5.0 || ^6.0 || ^7.0" }, "autoload": { "psr-4": { From 0b6a6c6c57dbc776dfaf75926b28b352b81e7c60 Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Tue, 27 Dec 2022 11:40:54 +0100 Subject: [PATCH 38/48] Refactor phpcq build configuration --- build.xml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/build.xml b/build.xml index 295be32..daac69b 100644 --- a/build.xml +++ b/build.xml @@ -1,21 +1,12 @@ - - - - - - - - + + From 3c2c351de39893d7e8e526267c7203b9a6634479 Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Tue, 27 Dec 2022 11:41:19 +0100 Subject: [PATCH 39/48] Refactor phpunit configuration --- phpunit.xml.dist | 31 +++++++++++++++++++------------ tests/bootstrap.php | 33 --------------------------------- 2 files changed, 19 insertions(+), 45 deletions(-) delete mode 100644 tests/bootstrap.php diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 0d52510..336c61f 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,18 +1,25 @@ - - + + + forceCoversAnnotation="true" + failOnRisky="true" + failOnWarning="true" + beStrictAboutChangesToGlobalState="true" + beStrictAboutOutputDuringTests="true" + beStrictAboutResourceUsageDuringSmallTests="true" + beStrictAboutTodoAnnotatedTests="true" + bootstrap="vendor/autoload.php" +> - ./tests/ + ./tests + + + ./src + + diff --git a/tests/bootstrap.php b/tests/bootstrap.php deleted file mode 100644 index 598d394..0000000 --- a/tests/bootstrap.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * This project is provided in good faith and hope to be usable by anyone. - * - * @package bit3/git-php - * @author Tristan Lins - * @copyright 2014 Tristan Lins - * @link https://github.com/bit3/git-php - * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT - * @filesource - */ - -error_reporting(E_ALL); - -function includeIfExists($file) -{ - return file_exists($file) ? include $file : false; -} - -if ((!$loader = includeIfExists(__DIR__.'/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__.'/../../../autoload.php'))) { - echo 'You must set up the project dependencies, run the following commands:'.PHP_EOL. - 'curl -sS https://getcomposer.org/installer | php'.PHP_EOL. - 'php composer.phar install'.PHP_EOL; - exit(1); -} From aff5dff6e1fd32224cd2d66c976399cb3fb3d3e0 Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Tue, 27 Dec 2022 13:38:55 +0100 Subject: [PATCH 40/48] Fix phpcs error issues --- src/Command/CheckoutCommandBuilder.php | 4 ++-- src/Command/CommitCommandBuilder.php | 4 ++-- src/Command/MergeCommandBuilder.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Command/CheckoutCommandBuilder.php b/src/Command/CheckoutCommandBuilder.php index 2b39df8..87fe062 100644 --- a/src/Command/CheckoutCommandBuilder.php +++ b/src/Command/CheckoutCommandBuilder.php @@ -14,7 +14,7 @@ * @author Tristan Lins * @author Christian Schiffler * @author Sven Baumann - * @copyright 2014-2018 Tristan Lins + * @copyright 2014-2022 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -205,7 +205,7 @@ public function patch() * * @param null|string $branchOrTreeIsh Name of the branch or tree. * - * @param null| $path Path to which check out. + * @param null $path Path to which check out. * * @param null|string $_ More optional arguments to append to the command. * diff --git a/src/Command/CommitCommandBuilder.php b/src/Command/CommitCommandBuilder.php index bd28aad..08d20c2 100644 --- a/src/Command/CommitCommandBuilder.php +++ b/src/Command/CommitCommandBuilder.php @@ -14,7 +14,7 @@ * @author Tristan Lins * @author Christian Schiffler * @author Sven Baumann - * @copyright 2014-2018 Tristan Lins + * @copyright 2014-2022 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -441,7 +441,7 @@ public function gpgSign($keyId = null) /** * Build the command and execute it. * - * @param null| $pathspec Path to commit. + * @param null $pathspec Path to commit. * * @param null|string $_ More optional pathes to commit. * diff --git a/src/Command/MergeCommandBuilder.php b/src/Command/MergeCommandBuilder.php index ff5ba5d..82c40a7 100644 --- a/src/Command/MergeCommandBuilder.php +++ b/src/Command/MergeCommandBuilder.php @@ -14,7 +14,7 @@ * @author Aaron Rubin * @author Christian Schiffler * @author Sven Baumann - * @copyright 2014-2018 Tristan Lins + * @copyright 2014-2022 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -66,7 +66,7 @@ public function strategy($strategy) * * @param null|string $branchOrTreeIsh Name of the branch or tree. * - * @param null| $path Path to which check out. + * @param null $path Path to which check out. * * @param null|string $_ More optional arguments to append to the command. * From 338487df69bfdd269b71501505042598ca930cc3 Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Tue, 27 Dec 2022 13:45:06 +0100 Subject: [PATCH 41/48] We do not replace the prozess command line after create it. This is obsulete --- src/Command/CommandBuilderTrait.php | 4 +--- tests/GitRepositoryTest.php | 16 +--------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/src/Command/CommandBuilderTrait.php b/src/Command/CommandBuilderTrait.php index a25cfc0..c9216b2 100644 --- a/src/Command/CommandBuilderTrait.php +++ b/src/Command/CommandBuilderTrait.php @@ -14,7 +14,7 @@ * @author Tristan Lins * @author Christian Schiffler * @author Sven Baumann - * @copyright 2014-2018 Tristan Lins + * @copyright 2014-2022 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -126,8 +126,6 @@ protected function buildProcess() $process = new Process($this->arguments, $this->workingDirectory); - $process->setCommandLine($process->getCommandLine()); - return $process; } diff --git a/tests/GitRepositoryTest.php b/tests/GitRepositoryTest.php index abb11e0..ec1268f 100644 --- a/tests/GitRepositoryTest.php +++ b/tests/GitRepositoryTest.php @@ -15,7 +15,7 @@ * @author Christian Schiffler * @author Matthew Gamble * @author Sven Baumann - * @copyright 2014-2018 Tristan Lins + * @copyright 2014-2022 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource @@ -162,7 +162,6 @@ public function testConfigSetOnInitializedRepository() $this->initializedGitRepository->config()->file('local')->execute('user.name', 'CCA unittest 2'); $process = new Process(['git', 'config', '--local', 'user.name'], $this->initializedRepositoryPath); - $process->setCommandLine($process->getCommandLine()); $process->run(); $this->assertEquals( @@ -178,7 +177,6 @@ public function testConfigAddOnInitializedRepository() $process = new Process( ['git', 'config', '--local', '--get-all', 'user.name'], $this->initializedRepositoryPath ); - $process->setCommandLine($process->getCommandLine()); $process->run(); $names = \explode("\n", $process->getOutput()); @@ -322,7 +320,6 @@ public function testRemoteSetUrlOnInitializedRepository() $this->initializedGitRepository->remote()->setUrl('local', $this->uninitializedRepositoryPath)->execute(); $process = new Process(['git', 'config', 'remote.local.url'], $this->initializedRepositoryPath); - $process->setCommandLine($process->getCommandLine()); $process->run(); $this->assertEquals( @@ -357,7 +354,6 @@ public function testRemoteSetPushUrlOnInitializedRepository() $this->initializedGitRepository->remote()->setPushUrl('local', $this->uninitializedRepositoryPath)->execute(); $process = new Process(['git', 'config', 'remote.local.url'], $this->initializedRepositoryPath); - $process->setCommandLine($process->getCommandLine()); $process->run(); $this->assertEquals( @@ -366,7 +362,6 @@ public function testRemoteSetPushUrlOnInitializedRepository() ); $process = new Process(['git', 'config', 'remote.local.pushurl'], $this->initializedRepositoryPath); - $process->setCommandLine($process->getCommandLine()); $process->run(); $this->assertEquals( @@ -401,7 +396,6 @@ public function testRemoteAddOnInitializedRepository() $this->initializedGitRepository->remote()->add('origin', $this->uninitializedRepositoryPath)->execute(); $process = new Process(['git', 'config', 'remote.origin.url'], $this->initializedRepositoryPath); - $process->setCommandLine($process->getCommandLine()); $process->run(); $this->assertEquals( @@ -435,13 +429,11 @@ public function testRemoteFetchOnInitializedRepository() $process = new Process( ['git', 'remote', 'add', 'origin', $this->initializedRepositoryPath], $this->initializedRepositoryPath ); - $process->setCommandLine($process->getCommandLine()); $process->run(); $this->initializedGitRepository->fetch()->execute(); $process = new Process(['git', 'branch', '-a'], $this->initializedRepositoryPath); - $process->setCommandLine($process->getCommandLine()); $process->run(); $branches = explode("\n", $process->getOutput()); @@ -477,13 +469,11 @@ public function testCheckoutOnInitializedRepository() $process = new Process( ['git', 'remote', 'add', 'origin', $this->initializedRepositoryPath], $this->initializedRepositoryPath ); - $process->setCommandLine($process->getCommandLine()); $process->run(); $this->initializedGitRepository->checkout()->execute('6c42d7ba78e0e956bd4e25661a6c13d826ef590a'); $process = new Process(['git', 'describe'], $this->initializedRepositoryPath); - $process->setCommandLine($process->getCommandLine()); $process->run(); $this->assertEquals( @@ -568,7 +558,6 @@ public function testAddOnInitializedRepository() $this->initializedGitRepository->add()->execute('unknown-file.txt'); $process = new Process(['git', 'status', '-s'], $this->initializedRepositoryPath); - $process->setCommandLine($process->getCommandLine()); $process->run(); $status = \explode("\n", $process->getOutput()); @@ -603,7 +592,6 @@ public function testRmOnInitializedRepository() $this->initializedGitRepository->rm()->execute('existing-file.txt'); $process = new Process(['git', 'status', '-s'], $this->initializedRepositoryPath); - $process->setCommandLine($process->getCommandLine()); $process->run(); $status = \explode("\n", $process->getOutput()); @@ -639,7 +627,6 @@ public function testCommitOnInitializedRepository() $this->initializedGitRepository->commit()->message('Commit changes')->execute(); $process = new Process(['git', 'status', '-s'], $this->initializedRepositoryPath); - $process->setCommandLine($process->getCommandLine()); $process->run(); $status = \explode("\n", $process->getOutput()); @@ -681,7 +668,6 @@ public function testTagOnInitializedRepository() $this->initializedGitRepository->tag()->execute('unit-test'); $process = new Process(['git', 'tag'], $this->initializedRepositoryPath); - $process->setCommandLine($process->getCommandLine()); $process->run(); $tags = \explode("\n", $process->getOutput()); From 2d17c24f5c1dfade82245cf53b15e5bdd19fbc22 Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Tue, 27 Dec 2022 14:07:11 +0100 Subject: [PATCH 42/48] Switch to github action --- .github/workflows/diagnostics.yml | 48 +++++++++++++++++++++++++++++++ .travis.yml | 32 --------------------- 2 files changed, 48 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/diagnostics.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/diagnostics.yml b/.github/workflows/diagnostics.yml new file mode 100644 index 0000000..9952d42 --- /dev/null +++ b/.github/workflows/diagnostics.yml @@ -0,0 +1,48 @@ +name: Git php + +on: + push: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + php: [5.6, 7.1, 7.2, 7.3, 7.4] + + steps: + - name: PHP ${{ matrix.php }} Pull source + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + # see https://github.com/shivammathur/setup-php + - name: PHP ${{ matrix.php }} Setup PHP. + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: none + + - name: PHP ${{ matrix.php }} Cache composer cache directory + uses: actions/cache@v1 + env: + cache-name: composer-cache-dir + with: + path: ~/.cache/composer + key: ${{ runner.os }}-build-${{ env.cache-name }} + + - name: PHP ${{ matrix.php }} Cache vendor directory + uses: actions/cache@v1 + env: + cache-name: composer-vendor + with: + path: vendor + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + - name: PHP ${{ matrix.php }} Install composer dependencies + run: composer update --prefer-dist --no-interaction --no-suggest + + - name: PHP ${{ matrix.php }} Run tests + run: ant -keep-going diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 679d72b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -language: php - -php: - - "7.2" - - "7.1" - - "7.0" - - "5.6" - -sudo: false - -before_install: - - echo "memory_limit = -1" > travis.php.ini && phpenv config-add travis.php.ini - -install: - - travis_retry composer self-update && composer --version - # We have to supply the branch alias here again as travis checks out a commit hash and therefore destroys the - # circular dependency phpcq/all-tasks -> phpcq/autoload-validation -> phpcq/all-tasks. - - > - if [ "x${TRAVIS_TAG}" != "x" ]; then - COMPOSER_ROOT_VERSION=${TRAVIS_TAG} travis_retry composer update --prefer-dist --no-interaction; - else - COMPOSER_ROOT_VERSION=$([[ ${TRAVIS_BRANCH} =~ hotfix/([0-9.]*(-(alpha|beta|rc)[0-9]+)?) ]] \ - && echo ${BASH_REMATCH[1]} \ - || echo dev-${TRAVIS_BRANCH}) \ - travis_retry composer update --prefer-dist --no-interaction; - fi - -script: ant -keep-going - -# Hack to make things work again - we can not use a shallow repository. -git: - depth: 2147483647 From 9e8d7fe5450c272bfeff99d30c3e6c8aac2f5234 Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Tue, 27 Dec 2022 15:46:39 +0100 Subject: [PATCH 43/48] Revere adding a new line --- src/Command/PullCommandBuilder.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Command/PullCommandBuilder.php b/src/Command/PullCommandBuilder.php index de86df9..5604fc8 100644 --- a/src/Command/PullCommandBuilder.php +++ b/src/Command/PullCommandBuilder.php @@ -74,6 +74,7 @@ public function recurseSubmodules($recurse) return $this; } + /** * Build the command and execute it. * From b30b802134df7c1e99d1da32e6d570ce5081140a Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Tue, 27 Dec 2022 15:54:14 +0100 Subject: [PATCH 44/48] Added missing author --- src/Command/PullCommandBuilder.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Command/PullCommandBuilder.php b/src/Command/PullCommandBuilder.php index 5604fc8..443e686 100644 --- a/src/Command/PullCommandBuilder.php +++ b/src/Command/PullCommandBuilder.php @@ -14,7 +14,8 @@ * @author Ahmad Marzouq * @author Christian Schiffler * @author Sven Baumann - * @copyright 2014-2018 Tristan Lins + * @author Idris Dose + * @copyright 2014-2022 Tristan Lins * @license https://github.com/bit3/git-php/blob/master/LICENSE MIT * @link https://github.com/bit3/git-php * @filesource From f879ae78078795290528af1c79ee65764dbb948e Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Wed, 28 Dec 2022 06:46:22 +0100 Subject: [PATCH 45/48] Update badges in the README.md --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9c7be21..cddc204 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ -[![Version](http://img.shields.io/packagist/v/bit3/git-php.svg?style=flat-square)](https://packagist.org/packages/bit3/git-php) -[![Stable Build Status](http://img.shields.io/travis/bit3/git-php/master.svg?style=flat-square&label=stable build)](https://travis-ci.org/bit3/git-php) -[![Upstream Build Status](http://img.shields.io/travis/bit3/git-php/develop.svg?style=flat-square&label=dev build)](https://travis-ci.org/bit3/git-php) -[![License](http://img.shields.io/packagist/l/bit3/git-php.svg?style=flat-square)](https://github.com/bit3/git-php/blob/master/LICENSE) -[![Downloads](http://img.shields.io/packagist/dt/bit3/git-php.svg?style=flat-square)](https://packagist.org/packages/bit3/git-php) +[![Build Status](https://github.com/bit3/git-php/actions/workflows/diagnostics.yml/badge.svg)](https://github.com/bit3/git-php/actions) +[![Latest Version tagged](http://img.shields.io/github/tag/bit3/git-php.svg)](https://github.com/bit3/git-php/tags) +[![Latest Version on Packagist](http://img.shields.io/packagist/v/bit3/git-php.svg)](https://packagist.org/packages/bit3/git-php) +[![Installations via composer per month](http://img.shields.io/packagist/dm/bit3/git-php.svg)](https://packagist.org/packages/bit3/git-php) Easy to use GIT wrapper for php =============================== From 164da96755e8cf81d846d22ed868b85be2d8a6e8 Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Wed, 28 Dec 2022 11:10:09 +0100 Subject: [PATCH 46/48] Remove unnecessary branch-alias --- composer.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/composer.json b/composer.json index 7a119f2..ff21b4b 100644 --- a/composer.json +++ b/composer.json @@ -16,11 +16,5 @@ "Bit3\\GitPhp\\": "src", "Bit3\\GitPhp\\Test\\": "tests" } - }, - "extra": { - "branch-alias": { - "dev-master": "1.5.x-dev", - "dev-develop": "1.6.x-dev" - } } } From e8f82fb15d367102edbcc97d70a1a11edad48605 Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Wed, 28 Dec 2022 11:26:42 +0100 Subject: [PATCH 47/48] Revert "Remove unnecessary branch-alias" This reverts commit 164da96755e8cf81d846d22ed868b85be2d8a6e8. --- composer.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/composer.json b/composer.json index 11e5f27..ff38fcf 100644 --- a/composer.json +++ b/composer.json @@ -17,5 +17,11 @@ "Bit3\\GitPhp\\": "src", "Bit3\\GitPhp\\Test\\": "tests" } + }, + "extra": { + "branch-alias": { + "dev-master": "1.5.x-dev", + "dev-develop": "1.6.x-dev" + } } } From 31c66b65864f3c0cc026a58ca01c7c5c3636c9bf Mon Sep 17 00:00:00 2001 From: Sven Baumann Date: Wed, 28 Dec 2022 11:29:12 +0100 Subject: [PATCH 48/48] Remove develop branch alias --- composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index ff38fcf..bdb4c38 100644 --- a/composer.json +++ b/composer.json @@ -20,8 +20,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.5.x-dev", - "dev-develop": "1.6.x-dev" + "dev-master": "1.5.x-dev" } } }