summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-01-10 09:47:31 +0100
committerRemi Collet <remi@remirepo.net>2020-01-10 09:47:31 +0100
commitc8188c2839e48faf4a2c0e1e8c50925ae80eca98 (patch)
tree19f1dabdc0e19c3dfc5e733e87229c32a2fc95e5
parentcff2f0c795cd105e4e229ff68add0faa36e6c213 (diff)
switch to Laminas
-rw-r--r--composer.json64
-rw-r--r--php-laminas-inputfilter.spec156
2 files changed, 125 insertions, 95 deletions
diff --git a/composer.json b/composer.json
index cf355a2..fe92618 100644
--- a/composer.json
+++ b/composer.json
@@ -1,56 +1,57 @@
{
- "name": "zendframework/zend-inputfilter",
+ "name": "laminas/laminas-inputfilter",
"description": "Normalize and validate input sets from the web, APIs, the CLI, and more, including files",
"license": "BSD-3-Clause",
"keywords": [
- "zf",
- "zendframework",
+ "laminas",
"inputfilter"
],
+ "homepage": "https://laminas.dev",
"support": {
- "docs": "https://docs.zendframework.com/zend-inputfilter/",
- "issues": "https://github.com/zendframework/zend-inputfilter/issues",
- "source": "https://github.com/zendframework/zend-inputfilter",
- "rss": "https://github.com/zendframework/zend-inputfilter/releases.atom",
- "chat": "https://zendframework-slack.herokuapp.com",
- "forum": "https://discourse.zendframework.com/c/questions/components"
+ "docs": "https://docs.laminas.dev/laminas-inputfilter/",
+ "issues": "https://github.com/laminas/laminas-inputfilter/issues",
+ "source": "https://github.com/laminas/laminas-inputfilter",
+ "rss": "https://github.com/laminas/laminas-inputfilter/releases.atom",
+ "chat": "https://laminas.dev/chat",
+ "forum": "https://discourse.laminas.dev"
+ },
+ "config": {
+ "sort-packages": true
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.10.x-dev",
+ "dev-develop": "2.11.x-dev"
+ },
+ "laminas": {
+ "component": "Laminas\\InputFilter",
+ "config-provider": "Laminas\\InputFilter\\ConfigProvider"
+ }
},
"require": {
"php": "^5.6 || ^7.0",
- "zendframework/zend-filter": "^2.9.1",
- "zendframework/zend-servicemanager": "^2.7.10 || ^3.3.1",
- "zendframework/zend-stdlib": "^2.7 || ^3.0",
- "zendframework/zend-validator": "^2.11"
+ "laminas/laminas-filter": "^2.9.1",
+ "laminas/laminas-servicemanager": "^2.7.10 || ^3.3.1",
+ "laminas/laminas-stdlib": "^2.7 || ^3.0",
+ "laminas/laminas-validator": "^2.11",
+ "laminas/laminas-zendframework-bridge": "^1.0"
},
"require-dev": {
+ "laminas/laminas-coding-standard": "~1.0.0",
"phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.15",
- "psr/http-message": "^1.0",
- "zendframework/zend-coding-standard": "~1.0.0"
+ "psr/http-message": "^1.0"
},
"suggest": {
"psr/http-message-implementation": "PSR-7 is required if you wish to validate PSR-7 UploadedFileInterface payloads"
},
"autoload": {
"psr-4": {
- "Zend\\InputFilter\\": "src/"
+ "Laminas\\InputFilter\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
- "ZendTest\\InputFilter\\": "test/"
- }
- },
- "config": {
- "sort-packages": true
- },
- "extra": {
- "branch-alias": {
- "dev-master": "2.10.x-dev",
- "dev-develop": "2.11.x-dev"
- },
- "zf": {
- "component": "Zend\\InputFilter",
- "config-provider": "Zend\\InputFilter\\ConfigProvider"
+ "LaminasTest\\InputFilter\\": "test/"
}
},
"scripts": {
@@ -62,5 +63,8 @@
"cs-fix": "phpcbf",
"test": "phpunit --colors=always",
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
+ },
+ "replace": {
+ "zendframework/zend-inputfilter": "self.version"
}
}
diff --git a/php-laminas-inputfilter.spec b/php-laminas-inputfilter.spec
index f5af800..eac58de 100644
--- a/php-laminas-inputfilter.spec
+++ b/php-laminas-inputfilter.spec
@@ -1,4 +1,4 @@
-# remirepo/Fedora spec file for php-zendframework-zend-inputfilter
+# remirepo/Fedora spec file for php-laminas-inputfilter
#
# Copyright (c) 2015-2020 Remi Collet
# License: CC-BY-SA
@@ -7,11 +7,13 @@
# Please, preserve the changelog entries
#
%global bootstrap 0
-%global gh_commit 1f44a2e9bc394a71638b43bc7024b572fa65410e
+%global gh_commit b29ce8f512c966468eee37ea4873ae5fb545d00a
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
-%global gh_owner zendframework
-%global gh_project zend-inputfilter
+%global gh_owner laminas
+%global gh_project laminas-inputfilter
+%global zf_name zend-inputfilter
%global php_home %{_datadir}/php
+%global namespace Laminas
%global library InputFilter
%if %{bootstrap}
%global with_tests 0%{?_with_tests:1}
@@ -19,13 +21,13 @@
%global with_tests 0%{!?_without_tests:1}
%endif
-Name: php-%{gh_owner}-%{gh_project}
+Name: php-%{gh_project}
Version: 2.10.1
Release: 1%{?dist}
-Summary: Zend Framework %{library} component
+Summary: %{namespace} Framework %{library} component
License: BSD
-URL: https://zendframework.github.io/%{gh_project}/
+URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
@@ -36,81 +38,78 @@ BuildRequires: php(language) >= 5.6
BuildRequires: php-spl
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-autoloader(%{gh_owner}/zend-filter) >= 2.9.1 with php-autoloader(%{gh_owner}/zend-filter) < 3)
-BuildRequires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 2.5 with php-autoloader(%{gh_owner}/zend-stdlib) < 4)
-BuildRequires: (php-autoloader(%{gh_owner}/zend-validator) >= 2.11 with php-autoloader(%{gh_owner}/zend-validator) < 3)
-BuildRequires: (php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.10 with php-autoloader(%{gh_owner}/zend-servicemanager) < 4)
-# remirepo:10
-%else
-BuildRequires: php-autoloader(%{gh_owner}/zend-filter) < 3
-BuildRequires: php-autoloader(%{gh_owner}/zend-filter) >= 2.9.1
-BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) < 4
-BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.5
-BuildRequires: php-autoloader(%{gh_owner}/zend-validator) < 3
-BuildRequires: php-autoloader(%{gh_owner}/zend-validator) >= 2.11
-BuildRequires: php-autoloader(%{gh_owner}/zend-servicemanager) < 4
-BuildRequires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.10
-%endif
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-filter) >= 2.9.1 with php-autoloader(%{gh_owner}/laminas-filter) < 3)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-servicemanager) >= 3.3.1 with php-autoloader(%{gh_owner}/laminas-servicemanager) < 4)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.0 with php-autoloader(%{gh_owner}/laminas-stdlib) < 4)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-validator) >= 2.11 with php-autoloader(%{gh_owner}/laminas-validator) < 3)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-zendframework-bridge) >= 1.0 with php-autoloader(%{gh_owner}/laminas-zendframework-bridge) < 2)
# From composer, "require-dev": {
+# "laminas/laminas-coding-standard": "~1.0.0",
# "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.15",
-# "psr/http-message": "^1.0",
-# "zendframework/zend-coding-standard": "~1.0.0"
-BuildRequires: phpunit7 >= 7.5
-# remirepo:1
-%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+# "psr/http-message": "^1.0"
BuildRequires: (php-composer(psr/http-message) >= 1.0 with php-composer(psr/http-message) < 2)
-# remirepo:4
+# remirepo:10
%else
-BuildRequires: php-composer(psr/http-message) < 2
-BuildRequires: php-composer(psr/http-message) >= 1.0
+BuildRequires: php-laminas-filter
+BuildRequires: php-laminas-servicemanager
+BuildRequires: php-laminas-stdlib
+BuildRequires: php-laminas-validator
+BuildRequires: php-laminas-zendframework-bridge
+BuildRequires: php-psr-http-message
%endif
+BuildRequires: phpunit7 >= 7.5
%endif
# Autoloader
BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
# "php": "^5.6 || ^7.0",
-# "zendframework/zend-filter": "^2.9.1",
-# "zendframework/zend-stdlib": "^2.7 || ^3.0"
-# "zendframework/zend-servicemanager": "^2.7.10 || ^3.3.1"
-# "zendframework/zend-validator": "^2.11",
+# "laminas/laminas-filter": "^2.9.1",
+# "laminas/laminas-servicemanager": "^2.7.10 || ^3.3.1",
+# "laminas/laminas-stdlib": "^2.7 || ^3.0",
+# "laminas/laminas-validator": "^2.11",
+# "laminas/laminas-zendframework-bridge": "^1.0"
Requires: php(language) >= 5.6
%if ! %{bootstrap}
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (php-autoloader(%{gh_owner}/zend-filter) >= 2.9.1 with php-autoloader(%{gh_owner}/zend-filter) < 3)
-Requires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 2.5 with php-autoloader(%{gh_owner}/zend-stdlib) < 4)
-Requires: (php-autoloader(%{gh_owner}/zend-validator) >= 2.11 with php-autoloader(%{gh_owner}/zend-validator) < 3)
-Requires: (php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.10 with php-autoloader(%{gh_owner}/zend-servicemanager) < 4)
-# remirepo:10
+Requires: (php-autoloader(%{gh_owner}/laminas-filter) >= 2.9.1 with php-autoloader(%{gh_owner}/laminas-filter) < 3)
+Requires: (php-autoloader(%{gh_owner}/laminas-servicemanager) >= 3.3.1 with php-autoloader(%{gh_owner}/laminas-servicemanager) < 4)
+Requires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.0 with php-autoloader(%{gh_owner}/laminas-stdlib) < 4)
+Requires: (php-autoloader(%{gh_owner}/laminas-validator) >= 2.11 with php-autoloader(%{gh_owner}/laminas-validator) < 3)
+Requires: (php-autoloader(%{gh_owner}/laminas-zendframework-bridge) >= 1.0 with php-autoloader(%{gh_owner}/laminas-zendframework-bridge) < 2)
+# remirepo:7
%else
-Requires: php-autoloader(%{gh_owner}/zend-filter) < 3
-Requires: php-autoloader(%{gh_owner}/zend-filter) >= 2.9.1
-Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4
-Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
-Requires: php-autoloader(%{gh_owner}/zend-validator) < 3
-Requires: php-autoloader(%{gh_owner}/zend-validator) >= 2.11
-Requires: php-autoloader(%{gh_owner}/zend-servicemanager) < 4
-Requires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.10
+Requires: php-laminas-filter
+Requires: php-laminas-servicemanager
+Requires: php-laminas-stdlib
+Requires: php-laminas-validator
+Requires: php-laminas-zendframework-bridge
%endif
%endif
# Autoloader
Requires: php-composer(fedora/autoloader)
-# From phpcompatinfo report for version 2.5.5
+# From phpcompatinfo report for version 2.10.1
Requires: php-spl
-Obsoletes: php-ZendFramework2-%{library} < 2.5
-Provides: php-ZendFramework2-%{library} = %{version}
-Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version}
+# remirepo:2
+Obsoletes: php-ZendFramework2-%{library} < 2.5
+Provides: php-ZendFramework2-%{library} = %{version}
+# Compatibily ensure by the bridge
+Obsoletes: php-zendframework-%{zf_name} < 2.10.1-99
+Provides: php-zendframework-%{zf_name} = %{version}-99
+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
-The Zend\InputFilter component can be used to filter and validate generic sets
-of input data. For instance, you could use it to filter $_GET or $_POST values,
-CLI arguments, etc.
+The %{namespace}\InputFilter component can be used to filter and validate generic
+sets of input data. For instance, you could use it to filter $_GET or $_POST
+values, CLI arguments, etc.
-Documentation: https://zendframework.github.io/%{gh_project}/
+Documentation: https://docs.laminas.dev/%{gh_project}/
%prep
@@ -123,20 +122,34 @@ mv LICENSE.md LICENSE
phpab --template fedora --output src/autoload.php src
cat << 'EOF' | tee -a src/autoload.php
\Fedora\Autoloader\Dependencies::required([
- '%{php_home}/Zend/Filter/autoload.php',
- '%{php_home}/Zend/Stdlib/autoload.php',
- '%{php_home}/Zend/Validator/autoload.php',
+ '%{php_home}/%{namespace}/Filter/autoload.php',
+ '%{php_home}/%{namespace}/Stdlib/autoload.php',
+ '%{php_home}/%{namespace}/Validator/autoload.php',
]);
\Fedora\Autoloader\Dependencies::optional([
- '%{php_home}/Zend/ServiceManager/autoload.php',
+ '%{php_home}/%{namespace}/ServiceManager/autoload.php',
'%{php_home}/Psr/Http/Message/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}/autoload.php',
+]);
+EOF
+
%install
-mkdir -p %{buildroot}%{php_home}/Zend/
-cp -pr src %{buildroot}%{php_home}/Zend/%{library}
+: Laminas library
+mkdir -p %{buildroot}%{php_home}/%{namespace}/
+cp -pr src %{buildroot}%{php_home}/%{namespace}/%{library}
+
+: Zend equiv
+mkdir -p %{buildroot}%{php_home}/Zend/%{library}
+cp -pr zf.php %{buildroot}%{php_home}/Zend/%{library}/autoload.php
%check
@@ -144,14 +157,23 @@ cp -pr src %{buildroot}%{php_home}/Zend/%{library}
mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?php
-require_once '%{buildroot}%{php_home}/Zend/%{library}/autoload.php';
-\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\%{library}\\', dirname(__DIR__) . '/test');
+require_once '%{buildroot}%{php_home}/%{namespace}/%{library}/autoload.php';
+\Fedora\Autoloader\Autoload::addPsr4('%{namespace}Test\\%{library}\\', dirname(__DIR__) . '/test');
EOF
+: check compat autoloader
+php -r '
+require "%{buildroot}%{php_home}/Zend/%{library}/autoload.php";
+return (class_exists("\\Zend\\%{library}\\Message") ? 0 : 1);
+'
+
+: upstream test suite
ret=0
for cmd in php php72 php73 php74; do
if which $cmd; then
- $cmd %{_bindir}/phpunit7 --verbose || ret=1
+ $cmd %{_bindir}/phpunit7 \
+ --filter '^((?!(testProvidesExpectedConfiguration)).)*$' \
+ --verbose || ret=1
fi
done
exit $ret
@@ -161,14 +183,18 @@ exit $ret
%files
+# remirepo:1
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md
%doc composer.json
%{php_home}/Zend/%{library}
-
+%{php_home}/%{namespace}/%{library}
%changelog
+* Fri Jan 10 2020 Remi Collet <remi@remirepo.net> - 2.10.1-1
+- switch to Laminas
+
* Thu Aug 29 2019 Remi Collet <remi@remirepo.net> - 2.10.1-1
- update to 2.10.1
- switch to phpunit7