summaryrefslogtreecommitdiffstats
path: root/php-ocramius-proxy-manager-rpm.patch
diff options
context:
space:
mode:
Diffstat (limited to 'php-ocramius-proxy-manager-rpm.patch')
-rw-r--r--php-ocramius-proxy-manager-rpm.patch50
1 files changed, 45 insertions, 5 deletions
diff --git a/php-ocramius-proxy-manager-rpm.patch b/php-ocramius-proxy-manager-rpm.patch
index 2d5f7d1..da809ed 100644
--- a/php-ocramius-proxy-manager-rpm.patch
+++ b/php-ocramius-proxy-manager-rpm.patch
@@ -1,7 +1,27 @@
-diff -up src/ProxyManager/Version.php.rpm src/ProxyManager/Version.php
---- src/ProxyManager/Version.php.rpm 2016-06-29 16:37:55.000000000 +0200
-+++ src/ProxyManager/Version.php 2016-06-29 16:38:44.000000000 +0200
-@@ -20,8 +20,6 @@ declare(strict_types=1);
+diff -up ./src/ProxyManager/Generator/Util/IdentifierSuffixer.php.rpm ./src/ProxyManager/Generator/Util/IdentifierSuffixer.php
+--- ./src/ProxyManager/Generator/Util/IdentifierSuffixer.php.rpm 2017-11-17 13:44:40.268314310 +0100
++++ ./src/ProxyManager/Generator/Util/IdentifierSuffixer.php 2017-11-17 13:47:14.351074468 +0100
+@@ -4,8 +4,6 @@ declare(strict_types=1);
+
+ namespace ProxyManager\Generator\Util;
+
+-use PackageVersions\Versions;
+-
+ /**
+ * Utility class capable of generating
+ * valid class/property/method identifiers
+@@ -45,6 +43,6 @@ abstract class IdentifierSuffixer
+
+ private static function loadBaseHashSalt() : string
+ {
+- return \sha1(\serialize(Versions::VERSIONS));
++ return \sha1_file(__FILE__);
+ }
+ }
+diff -up ./src/ProxyManager/Version.php.rpm ./src/ProxyManager/Version.php
+--- ./src/ProxyManager/Version.php.rpm 2017-11-17 13:11:06.000000000 +0100
++++ ./src/ProxyManager/Version.php 2017-11-17 13:43:57.787104733 +0100
+@@ -4,8 +4,6 @@ declare(strict_types=1);
namespace ProxyManager;
@@ -10,7 +30,7 @@ diff -up src/ProxyManager/Version.php.rpm src/ProxyManager/Version.php
/**
* Version class - to be adjusted when a new release is created.
*
-@@ -47,6 +45,6 @@ final class Version
+@@ -33,6 +31,6 @@ final class Version
*/
public static function getVersion() : string
{
@@ -18,3 +38,23 @@ diff -up src/ProxyManager/Version.php.rpm src/ProxyManager/Version.php
+ return '@VERSION@@@COMMIT@';
}
}
+diff -up ./tests/ProxyManagerTest/Generator/Util/IdentifierSuffixerTest.php.rpm ./tests/ProxyManagerTest/Generator/Util/IdentifierSuffixerTest.php
+--- ./tests/ProxyManagerTest/Generator/Util/IdentifierSuffixerTest.php.rpm 2017-11-17 13:44:45.583340528 +0100
++++ ./tests/ProxyManagerTest/Generator/Util/IdentifierSuffixerTest.php 2017-11-17 13:47:06.259034546 +0100
+@@ -4,7 +4,6 @@ declare(strict_types=1);
+
+ namespace ProxyManagerTest\Generator\Util;
+
+-use PackageVersions\Versions;
+ use PHPUnit\Framework\TestCase;
+ use ProxyManager\Generator\Util\IdentifierSuffixer;
+
+@@ -36,7 +35,7 @@ class IdentifierSuffixerTest extends Tes
+ public function testGeneratedSuffixDependsOnPackageInstalledVersions(string $name) : void
+ {
+ self::assertStringEndsWith(
+- \substr(sha1($name . sha1(serialize(Versions::VERSIONS))), 0, 5),
++ \substr(sha1($name . sha1_file(__DIR__ . '/../../../../src/ProxyManager/Generator/Util/IdentifierSuffixer.php')), 0, 5),
+ IdentifierSuffixer::getIdentifier($name)
+ );
+ }