summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-11-17 14:06:56 +0100
committerRemi Collet <remi@remirepo.net>2017-11-17 14:06:56 +0100
commit03381435e3ba8e72086795f571e42fe4618f640e (patch)
treecfeb939781084b21dbe2a6bc8f19c27954e491f9
parent59e16cefc7d9fa4684e7bc9da1d20ea85dbfffb7 (diff)
v2.2.0
-rw-r--r--composer.json21
-rw-r--r--php-ocramius-proxy-manager-rpm.patch50
-rw-r--r--php-ocramius-proxy-manager.spec32
3 files changed, 71 insertions, 32 deletions
diff --git a/composer.json b/composer.json
index 4510413..989a60d 100644
--- a/composer.json
+++ b/composer.json
@@ -19,20 +19,21 @@
}
],
"require": {
- "php": "^7.1.0",
- "zendframework/zend-code": "^3.1.0",
- "ocramius/package-versions": "^1.1.1"
+ "php": "^7.2.0",
+ "zendframework/zend-code": "^3.3.0",
+ "ocramius/package-versions": "^1.1.3"
},
"require-dev": {
"ext-phar": "*",
- "phpunit/phpunit": "^5.6.4",
- "phpunit/phpunit-mock-objects": "^3.4.1",
- "squizlabs/php_codesniffer": "^2.7.0",
- "couscous/couscous": "^1.5.2",
+ "phpunit/phpunit": "^6.4.3",
+ "squizlabs/php_codesniffer": "^2.9.1",
+ "couscous/couscous": "^1.6.1",
"phpbench/phpbench": "^0.12.2",
- "phpstan/phpstan": "^0.6.4",
- "nikic/php-parser": "^3.0.4",
- "humbug/humbug": "dev-master@DEV"
+ "phpstan/phpstan": "dev-master#856eb10a81c1d27c701a83f167dc870fd8f4236a as 0.9.999",
+ "phpstan/phpstan-phpunit": "dev-master#5629c0a1f4a9c417cb1077cf6693ad9753895761",
+ "nikic/php-parser": "^3.1.1",
+ "humbug/humbug": "1.0.0-RC.0@RC",
+ "padraic/phpunit-accelerator": "dev-master@DEV"
},
"suggest": {
"ocramius/generated-hydrator": "To have very fast object to array to object conversion for ghost objects",
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)
+ );
+ }
diff --git a/php-ocramius-proxy-manager.spec b/php-ocramius-proxy-manager.spec
index fb172dc..623697b 100644
--- a/php-ocramius-proxy-manager.spec
+++ b/php-ocramius-proxy-manager.spec
@@ -12,17 +12,17 @@
%global github_owner Ocramius
%global github_name ProxyManager
-%global github_version 2.1.1
-%global github_commit e18ac876b2e4819c76349de8f78ccc8ef1554cd7
+%global github_version 2.2.0
+%global github_commit 81d53b2878f1d1c40ad27270e64b51798485dfc5
%global github_short %(c=%{github_commit}; echo ${c:0:7})
%global composer_vendor ocramius
%global composer_project proxy-manager
-# "php": "^7.1.0"
-%global php_min_ver 7.1.0
-# "zendframework/zend-code": "^3.1.0"
-%global zf_min_ver 3.1.0
+# "php": "^7.2.0"
+%global php_min_ver 7.2
+# "zendframework/zend-code": "^3.3.0"
+%global zf_min_ver 3.3
%global zf_max_ver 4
# Build using "--without tests" to disable tests
@@ -46,7 +46,6 @@ Source1: makesrc.sh
# drop dependency on ocramius/package-versions
Patch0: %{name}-rpm.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
# Autoloader
BuildRequires: %{_bindir}/phpab
@@ -58,18 +57,18 @@ BuildRequires: php-composer(zendframework/zend-code) >= %{zf_min_ver}
BuildRequires: php-composer(zendframework/zend-code) < %{zf_max_ver}
BuildRequires: php-composer(zendframework/zend-loader)
BuildRequires: php-composer(ocramius/generated-hydrator) >= 2
-## phpcompatinfo (computed from version 2.0.0)
+## phpcompatinfo (computed from version 2.2.0)
BuildRequires: php-pcre
BuildRequires: php-reflection
BuildRequires: php-spl
-BuildRequires: php-composer(phpunit/phpunit) >= 5.6.4
+BuildRequires: phpunit6 >= 6.4.3
%endif
# composer.json
Requires: php(language) >= %{php_min_ver}
Requires: php-composer(zendframework/zend-code) >= %{zf_min_ver}
Requires: php-composer(zendframework/zend-code) < %{zf_max_ver}
-# phpcompatinfo (computed from version 2.1.1)
+# phpcompatinfo (computed from version 2.2.0)
Requires: php-pcre
Requires: php-reflection
Requires: php-spl
@@ -129,7 +128,6 @@ AUTOLOAD
%install
-rm -rf %{buildroot}
mkdir -p %{buildroot}%{phpdir}
cp -rp src/* %{buildroot}%{phpdir}/
@@ -144,18 +142,13 @@ require_once '%{buildroot}%{phpdir}/ProxyManager/autoload.php';
EOF
: Run tests
-%{_bindir}/phpunit --verbose
+%{_bindir}/phpunit6 --verbose
%else
: Tests skipped
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md
@@ -164,6 +157,11 @@ rm -rf %{buildroot}
%changelog
+* Fri Nov 17 2017 Remi Collet <remi@remirepo.net> - 2.2.0-1
+- Update to 2.2.0
+- raise dependency on PHP 7.2
+- raise dependency on zend-code 3.3
+
* Thu May 4 2017 Remi Collet <remi@remirepo.net> - 2.1.1-1
- Update to 2.1.1