Skip to content

Commit 10d7c43

Browse files
authored
Merge pull request #197 from netiul/fix/release-command
Minimal changes required to make the release command work
2 parents b1bcf62 + 8e40735 commit 10d7c43

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

src/Package/PHP/Command/Release.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
namespace Pickle\Package\PHP\Command;
3838

39+
use Closure;
3940
use Pickle\Base\Interfaces;
4041
use Pickle\Package;
4142
use Pickle\Package\PHP\Util\PackageXml;
@@ -76,7 +77,7 @@ public function __construct($path, $cb = null, $noConvert = false)
7677

7778
protected function readPackage($path)
7879
{
79-
$package = PackageJson::readPackage($path, $noconvert);
80+
$package = PackageJson::readPackage($path, $this->noConvert);
8081
$package->setRootDir(realpath($path));
8182

8283
/* We're not adding any versions into the composer.json for the source release.

src/Package/PHP/Command/Release/Windows/Binary.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ protected function composerJsonBak(\Pickle\Base\Interfaces\Package $pkg, $restor
106106

107107
protected function readPackage($path)
108108
{
109-
$package = PackageJson::readPackage($path, $noconvert);
109+
$package = PackageJson::readPackage($path, $this->noConvert);
110110
$this->composerJsonBak($package);
111111

112112
/* For the binary release, json badly need the version informatio

src/Package/PHP/Util/PackageJson.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
class PackageJson
4444
{
45-
protected function readPackage($path, $noconvert)
45+
public static function readPackage($path, $noconvert)
4646
{
4747
$jsonLoader = new Package\Util\JSON\Loader(new Package\Util\Loader());
4848
$package = null;
@@ -74,6 +74,8 @@ protected function readPackage($path, $noconvert)
7474
}
7575

7676
$package->setRootDir(realpath($path));
77+
78+
return $package;
7779
}
7880
}
7981

src/Package/Util/JSON/Loader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function __construct(LoaderInterface $loader)
5050
/**
5151
* @param string $path
5252
*
53-
* @return Pickle\Base\Interfaces\Package
53+
* @return \Pickle\Base\Interfaces\Package
5454
*/
5555
public function load($path)
5656
{

0 commit comments

Comments
 (0)