summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2022-01-06 11:45:35 +0100
committerRemi Collet <remi@php.net>2022-01-06 11:45:35 +0100
commit750e6f9960eaa3b9d3d2865833a78f8d3e0d13a5 (patch)
tree32657becc1d4515f487f6d969940d83ec498135c
parent734839e12a07bf053ecf28e5bb51d437792ac9d6 (diff)
update to 4.3.1HEADmaster
rename to php-laminas-hydrator4 install in /usr/share/php/Laminas/Hydrator4 add dependency on webmozart/assert drop ZF compatibility layer
-rw-r--r--composer.json21
-rw-r--r--php-laminas-hydrator4.spec82
2 files changed, 50 insertions, 53 deletions
diff --git a/composer.json b/composer.json
index 536ddee..508f417 100644
--- a/composer.json
+++ b/composer.json
@@ -25,18 +25,21 @@
}
},
"require": {
- "php": "^7.3 || ~8.0.0",
+ "php": "^7.3 || ~8.0.0 || ~8.1.0",
"laminas/laminas-stdlib": "^3.3",
- "laminas/laminas-zendframework-bridge": "^1.0"
+ "webmozart/assert": "^1.10"
},
"require-dev": {
- "laminas/laminas-coding-standard": "~1.0.0",
+ "laminas/laminas-coding-standard": "~2.3.0",
"laminas/laminas-eventmanager": "^3.2.1",
"laminas/laminas-modulemanager": "^2.8",
"laminas/laminas-serializer": "^2.9",
"laminas/laminas-servicemanager": "^3.3.2",
- "phpunit/phpunit": "~9.3.0",
- "vimeo/psalm": "^3.16"
+ "phpbench/phpbench": "^1.0",
+ "phpunit/phpunit": "~9.5.5",
+ "psalm/plugin-phpunit": "^0.16.1",
+ "psr/cache": "1.0.1",
+ "vimeo/psalm": "^4.8.1"
},
"suggest": {
"laminas/laminas-eventmanager": "^3.2, to support aggregate hydrator usage",
@@ -50,10 +53,12 @@
},
"autoload-dev": {
"psr-4": {
- "LaminasTest\\Hydrator\\": "test/"
+ "LaminasTest\\Hydrator\\": "test/",
+ "LaminasBench\\Hydrator\\": "benchmark/"
}
},
"scripts": {
+ "benchmark": "phpbench run --revs=2 --iterations=2 --report=aggregate",
"check": [
"@cs-check",
"@test"
@@ -64,7 +69,7 @@
"test": "phpunit --colors=always",
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
},
- "replace": {
- "zendframework/zend-hydrator": "^3.0.2"
+ "conflict": {
+ "zendframework/zend-hydrator": "*"
}
}
diff --git a/php-laminas-hydrator4.spec b/php-laminas-hydrator4.spec
index 4960a19..fa4d48f 100644
--- a/php-laminas-hydrator4.spec
+++ b/php-laminas-hydrator4.spec
@@ -10,26 +10,21 @@
# TODO: v2 pulled by php-ocramius-generated-hydrator
# pulled by php-ocramius-proxy-manager
-%global bootstrap 0
-%global gh_commit 41aaccb9a0b8e25b1742f78427aa90504a6eb1cd
+%bcond_without tests
+
+%global gh_commit cc5ea6b42d318dbac872d94e8dca2d3013a37ab5
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner laminas
%global gh_project laminas-hydrator
-%global zf_name zend-hydrator
%global php_home %{_datadir}/php
%global namespace Laminas
%global library Hydrator
-%global major 3
-%if %{bootstrap}
-%global with_tests 0%{?_with_tests:1}
-%else
-%global with_tests 0%{!?_without_tests:1}
-%endif
+%global major 4
Name: php-%{gh_project}%{major}
-Version: 3.2.1
+Version: 4.3.1
Release: 1%{?dist}
-Summary: %{namespace} Framework %{library} component v%{major}
+Summary: %{namespace} Framework %{library} component version %{major}
License: BSD
URL: https://github.com/%{gh_owner}/%{gh_project}
@@ -38,7 +33,7 @@ Source1: makesrc.sh
BuildArch: noarch
# Tests
-%if %{with_tests}
+%if %{with tests}
BuildRequires: php(language) >= 7.3
BuildRequires: php-date
BuildRequires: php-reflection
@@ -46,41 +41,48 @@ BuildRequires: php-spl
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
BuildRequires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.3 with php-autoloader(%{gh_owner}/laminas-stdlib) < 4)
-BuildRequires: (php-autoloader(%{gh_owner}/laminas-zendframework-bridge) >= 1.0 with php-autoloader(%{gh_owner}/laminas-zendframework-bridge) < 2)
+BuildRequires: (php-composer(webmozart/assert) >= 1.10 with php-composer(webmozart/assert) < 2)
# From composer, "require-dev": {
+# "laminas/laminas-coding-standard": "~2.3.0",
# "laminas/laminas-eventmanager": "^3.2.1",
# "laminas/laminas-modulemanager": "^2.8",
# "laminas/laminas-serializer": "^2.9",
# "laminas/laminas-servicemanager": "^3.3.2",
-# "phpunit/phpunit": "~9.3.0",
-# "vimeo/psalm": "^3.16"
+# "phpbench/phpbench": "^1.0",
+# "phpunit/phpunit": "~9.5.5",
+# "psalm/plugin-phpunit": "^0.16.1",
+# "psr/cache": "1.0.1",
+# "vimeo/psalm": "^4.8.1"
BuildRequires: (php-autoloader(%{gh_owner}/laminas-eventmanager) >= 3.2.1 with php-autoloader(%{gh_owner}/laminas-eventmanager) < 4)
BuildRequires: (php-autoloader(%{gh_owner}/laminas-modulemanager) >= 2.8 with php-autoloader(%{gh_owner}/laminas-modulemanager) < 3)
BuildRequires: (php-autoloader(%{gh_owner}/laminas-serializer) >= 2.9 with php-autoloader(%{gh_owner}/laminas-serializer) < 3)
BuildRequires: (php-autoloader(%{gh_owner}/laminas-servicemanager) >= 3.3.2 with php-autoloader(%{gh_owner}/laminas-servicemanager) < 4)
-# remirepo:8
+BuildRequires: (php-composer(psr/cache) >= 1.0.1 with php-composer(psr/cache) < 2)
+# remirepo:9
%else
BuildRequires: php-laminas-stdlib
-BuildRequires: php-laminas-zendframework-bridge
+BuildRequires: php-webmozart-assert
BuildRequires: php-laminas-eventmanager
BuildRequires: php-laminas-modulemanager
BuildRequires: php-laminas-serializer
BuildRequires: php-laminas-servicemanager
+BuildRequires: php-psr-cache
%endif
%global phpunit %{_bindir}/phpunit9
-BuildRequires: phpunit9 >= 9.3
+BuildRequires: phpunit9 >= 9.5.5
%endif
# Autoloader
BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
-# "php": "^7.3 || ~8.0.0",
+# "php": "^7.3 || ~8.0.0 || ~8.1.0",
# "laminas/laminas-stdlib": "^3.3",
+# "webmozart/assert": "^1.10"
Requires: php(language) >= 7.3
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
Requires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.3 with php-autoloader(%{gh_owner}/laminas-stdlib) < 4)
-Requires: (php-autoloader(%{gh_owner}/laminas-zendframework-bridge) >= 1.0 with php-autoloader(%{gh_owner}/laminas-zendframework-bridge) < 2)
+Requires: (php-composer(webmozart/assert) >= 1.10 with php-composer(webmozart/assert) < 2)
# From composer, "suggest": {
# "laminas/laminas-eventmanager": "^3.2, to support aggregate hydrator usage",
# "laminas/laminas-serializer": "^2.9, to use the SerializableStrategy",
@@ -91,7 +93,7 @@ Suggests: php-autoloader(%{gh_owner}/laminas-servicemanager) >= 3.3
# remirepo:4
%else
Requires: php-laminas-stdlib
-Requires: php-laminas-zendframework-bridge
+Requires: php-webmozart-assert
%endif
# Autoloader
Requires: php-composer(fedora/autoloader)
@@ -101,9 +103,7 @@ Requires: php-pcre
Requires: php-spl
Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version}
-Provides: php-composer(zendframework/%{zf_name}) = %{version}
Provides: php-autoloader(%{gh_owner}/%{gh_project}) = %{version}
-Provides: php-autoloader(zendframework/%{zf_name}) = %{version}
%description
@@ -134,49 +134,35 @@ cat << 'EOF' | tee -a src/autoload.php
]);
EOF
-cat << 'EOF' | tee zf.php
-<?php
-require_once '%{php_home}/Fedora/Autoloader/autoload.php';
-\Fedora\Autoloader\Dependencies::required([
- '%{php_home}/%{namespace}/ZendFrameworkBridge/autoload.php',
- dirname(dirname(__DIR__)) . '/%{namespace}/%{library}%{major}/autoload.php',
-]);
-EOF
-
%install
: Laminas library
mkdir -p %{buildroot}%{php_home}/%{namespace}/
cp -pr src %{buildroot}%{php_home}/%{namespace}/%{library}%{major}
-: Zend equiv
-mkdir -p %{buildroot}%{php_home}/Zend/%{library}%{major}
-cp -pr zf.php %{buildroot}%{php_home}/Zend/%{library}%{major}/autoload.php
-
%check
-%if %{with_tests}
+%if %{with tests}
mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?php
require_once '%{buildroot}%{php_home}/%{namespace}/%{library}%{major}/autoload.php';
\Fedora\Autoloader\Dependencies::required([
'%{php_home}/%{namespace}/ModuleManager/autoload.php',
+ '%{php_home}//Psr/Cache/autoload.php',
]);
\Fedora\Autoloader\Autoload::addPsr4('%{namespace}Test\\%{library}\\', dirname(__DIR__) . '/test');
+\Fedora\Autoloader\Autoload::addPsr4('%{namespace}Bench\\%{library}\\', dirname(__DIR__) . '/benchmark');
EOF
-: check compat autoloader
-php -r '
-require "%{buildroot}%{php_home}/Zend/%{library}%{major}/autoload.php";
-exit (class_exists("\\Zend\\%{library}\\Reflection") ? 0 : 1);
-'
-
: upstream test suite
ret=0
-for cmdarg in "php %{phpunit}" php73 php74 php80; do
+for cmdarg in "php %{phpunit}" php74 php80 php81; do
if which $cmdarg; then
set $cmdarg
+ if [ $($1 -r 'echo PHP_VERSION_ID;') -ge 80100 ]; then
+ sed -e "/'Implicit conversion'/d" -i test/NamingStrategy/MapNamingStrategyTest.php
+ fi
$1 ${2:-%{_bindir}/phpunit9} -d memory_limit=1G || ret=1
fi
done
@@ -192,11 +178,17 @@ exit $ret
%license LICENSE
%doc *.md
%doc composer.json
-%{php_home}/Zend/%{library}%{major}
%{php_home}/%{namespace}/%{library}%{major}
%changelog
+* Thu Jan 6 2022 Remi Collet <remi@remirepo.net> - 4.3.1-1
+- update to 4.3.1
+- rename to php-laminas-hydrator4
+- install in /usr/share/php/Laminas/Hydrator4
+- add dependency on webmozart/assert
+- drop ZF compatibility layer
+
* Tue Jun 29 2021 Remi Collet <remi@remirepo.net> - 3.2.1-1
- update to 3.2.1