1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
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;
-use PackageVersions\Versions;
-
/**
* Version class - to be adjusted when a new release is created.
*
@@ -33,6 +31,6 @@ final class Version
*/
public static function getVersion() : string
{
- return Versions::getVersion('ocramius/proxy-manager');
+ 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)
);
}
|