summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-01-09 14:41:47 +0100
committerRemi Collet <remi@remirepo.net>2020-01-09 14:41:47 +0100
commit3d0e3ff204cd6a379d23af563e3efb9e3b200703 (patch)
tree485882fe7d7b3811dfdbd200343500ed01ddebf1
parent7114997ca1857b0e093ebe29ee06059a39f85c77 (diff)
switch to Laminas
update to 2.9.3
-rw-r--r--composer.json76
-rw-r--r--php-laminas-filter.spec180
2 files changed, 142 insertions, 114 deletions
diff --git a/composer.json b/composer.json
index 5463c42..62683f9 100644
--- a/composer.json
+++ b/composer.json
@@ -1,64 +1,65 @@
{
- "name": "zendframework/zend-filter",
+ "name": "laminas/laminas-filter",
"description": "Programmatically filter and normalize data and files",
"license": "BSD-3-Clause",
"keywords": [
- "zf",
- "zendframework",
+ "laminas",
"filter"
],
+ "homepage": "https://laminas.dev",
"support": {
- "docs": "https://docs.zendframework.com/zend-filter/",
- "issues": "https://github.com/zendframework/zend-filter/issues",
- "source": "https://github.com/zendframework/zend-filter",
- "rss": "https://github.com/zendframework/zend-filter/releases.atom",
- "chat": "https://zendframework-slack.herokuapp.com",
- "forum": "https://discourse.zendframework.com/c/questions/components"
+ "docs": "https://docs.laminas.dev/laminas-filter/",
+ "issues": "https://github.com/laminas/laminas-filter/issues",
+ "source": "https://github.com/laminas/laminas-filter",
+ "rss": "https://github.com/laminas/laminas-filter/releases.atom",
+ "chat": "https://laminas.dev/chat",
+ "forum": "https://discourse.laminas.dev"
+ },
+ "config": {
+ "sort-packages": true
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.9.x-dev",
+ "dev-develop": "2.10.x-dev"
+ },
+ "laminas": {
+ "component": "Laminas\\Filter",
+ "config-provider": "Laminas\\Filter\\ConfigProvider"
+ }
},
"require": {
"php": "^5.6 || ^7.0",
- "zendframework/zend-stdlib": "^2.7.7 || ^3.1"
+ "laminas/laminas-stdlib": "^2.7.7 || ^3.1",
+ "laminas/laminas-zendframework-bridge": "^1.0"
},
"require-dev": {
+ "laminas/laminas-coding-standard": "~1.0.0",
+ "laminas/laminas-crypt": "^3.2.1",
+ "laminas/laminas-servicemanager": "^2.7.8 || ^3.3",
+ "laminas/laminas-uri": "^2.6",
"pear/archive_tar": "^1.4.3",
"phpunit/phpunit": "^5.7.23 || ^6.4.3",
- "psr/http-factory": "^1.0",
- "zendframework/zend-coding-standard": "~1.0.0",
- "zendframework/zend-crypt": "^3.2.1",
- "zendframework/zend-servicemanager": "^2.7.8 || ^3.3",
- "zendframework/zend-uri": "^2.6"
+ "psr/http-factory": "^1.0"
},
"conflict": {
- "zendframework/zend-validator": "<2.10.1"
+ "laminas/laminas-validator": "<2.10.1"
},
"suggest": {
- "psr/http-factory-implementation": "psr/http-factory-implementation, for creating file upload instances when consuming PSR-7 in file upload filters",
- "zendframework/zend-crypt": "Zend\\Crypt component, for encryption filters",
- "zendframework/zend-i18n": "Zend\\I18n component for filters depending on i18n functionality",
- "zendframework/zend-servicemanager": "Zend\\ServiceManager component, for using the filter chain functionality",
- "zendframework/zend-uri": "Zend\\Uri component, for the UriNormalize filter"
+ "laminas/laminas-crypt": "Laminas\\Crypt component, for encryption filters",
+ "laminas/laminas-i18n": "Laminas\\I18n component for filters depending on i18n functionality",
+ "laminas/laminas-servicemanager": "Laminas\\ServiceManager component, for using the filter chain functionality",
+ "laminas/laminas-uri": "Laminas\\Uri component, for the UriNormalize filter",
+ "psr/http-factory-implementation": "psr/http-factory-implementation, for creating file upload instances when consuming PSR-7 in file upload filters"
},
"autoload": {
"psr-4": {
- "Zend\\Filter\\": "src/"
+ "Laminas\\Filter\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
- "ZendTest\\Filter\\": "test/"
- }
- },
- "config": {
- "sort-packages": true
- },
- "extra": {
- "branch-alias": {
- "dev-master": "2.9.x-dev",
- "dev-develop": "2.10.x-dev"
- },
- "zf": {
- "component": "Zend\\Filter",
- "config-provider": "Zend\\Filter\\ConfigProvider"
+ "LaminasTest\\Filter\\": "test/"
}
},
"scripts": {
@@ -70,5 +71,8 @@
"cs-fix": "phpcbf",
"test": "phpunit --colors=always",
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
+ },
+ "replace": {
+ "zendframework/zend-filter": "self.version"
}
}
diff --git a/php-laminas-filter.spec b/php-laminas-filter.spec
index 8468d82..b2a3179 100644
--- a/php-laminas-filter.spec
+++ b/php-laminas-filter.spec
@@ -1,4 +1,4 @@
-# remirepo/Fedora spec file for php-zendframework-zend-filter
+# remirepo/Fedora spec file for php-laminas-filter
#
# Copyright (c) 2015-2020 Remi Collet
# License: CC-BY-SA
@@ -7,26 +7,23 @@
# Please, preserve the changelog entries
#
%global bootstrap 0
-%global gh_commit d78f2cdde1c31975e18b2a0753381ed7b61118ef
+%global gh_commit 52b5cdbef8902280996e687e7352a648a8e22f31
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
-%global gh_owner zendframework
-%global gh_project zend-filter
+%global gh_owner laminas
+%global gh_project laminas-filter
+%global zf_name zend-filter
%global php_home %{_datadir}/php
+%global namespace Laminas
%global library Filter
-%if %{bootstrap}
-%global with_tests 0%{?_with_tests:1}
-%else
%global with_tests 0%{!?_without_tests:1}
-%endif
-%global php_version %(php -r 'echo PHP_VERSION;')
-Name: php-%{gh_owner}-%{gh_project}
-Version: 2.9.2
+Name: php-%{gh_project}
+Version: 2.9.3
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
@@ -44,94 +41,94 @@ BuildRequires: php-spl
BuildRequires: php-zip
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 3.1.0 with php-autoloader(%{gh_owner}/zend-stdlib) < 4)
-# remirepo:3
-%else
-BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 3.1.0
-%endif
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.1.0 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)
# From composer, "require-dev": {
+# "laminas/laminas-coding-standard": "~1.0.0",
+# "laminas/laminas-crypt": "^3.2.1",
+# "laminas/laminas-servicemanager": "^2.7.8 || ^3.3",
+# "laminas/laminas-uri": "^2.6",
# "pear/archive_tar": "^1.4.3",
# "phpunit/phpunit": "^5.7.23 || ^6.4.3",
-# "psr/http-factory": "^1.0",
-# "zendframework/zend-coding-standard": "~1.0.0",
-# "zendframework/zend-crypt": "^3.2.1",
-# "zendframework/zend-servicemanager": "^2.7.8 || ^3.3",
-# "zendframework/zend-uri": "^2.6"
-BuildRequires: php-autoloader(pear/archive_tar) >= 1.4.3
-%global phpunit %{_bindir}/phpunit6
-BuildRequires: phpunit6 >= 6.4.3
-%endif
-# remirepo:1
-%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-composer(psr/http-factory) >= 1.0 with php-composer(psr/http-factory) < 2)
-BuildRequires: (php-autoloader(%{gh_owner}/zend-crypt) >= 3.2.1 with php-autoloader(%{gh_owner}/zend-crypt) < 4)
-BuildRequires: (php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.8 with php-autoloader(%{gh_owner}/zend-servicemanager) < 4)
-BuildRequires: (php-autoloader(%{gh_owner}/zend-uri) >= 2.6 with php-autoloader(%{gh_owner}/zend-uri) < 3)
-# remirepo:6
+# "psr/http-factory": "^1.0"
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-crypt) >= 3.2.1 with php-autoloader(%{gh_owner}/laminas-crypt) < 4)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-servicemanager) >= 3.3 with php-autoloader(%{gh_owner}/laminas-servicemanager) < 4)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-uri) >= 2.6 with php-autoloader(%{gh_owner}/laminas-uri) < 3)
+BuildRequires: (php-composer(psr/http-factory) >= 1.0 with php-composer(psr/http-factory) < 2)
+# remirepo:8
%else
+BuildRequires: php-laminas-stdlib
+BuildRequires: php-laminas-zendframework-bridge
+BuildRequires: php-laminas-crypt
+BuildRequires: php-laminas-servicemanager
+BuildRequires: php-laminas-uri
BuildRequires: php-composer(psr/http-factory)
-BuildRequires: php-autoloader(%{gh_owner}/zend-crypt) >= 3.2.1
-BuildRequires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.8
-BuildRequires: php-autoloader(%{gh_owner}/zend-uri) >= 2.6
+%endif
+BuildRequires: php-autoloader(pear/archive_tar) >= 1.4.3
+%global phpunit %{_bindir}/phpunit6
+BuildRequires: phpunit6 >= 6.4.3
%endif
# Autoloader
BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
# "php": "^5.6 || ^7.0",
-# "zendframework/zend-stdlib": "^2.7.7 || ^3.1"
+# "laminas/laminas-stdlib": "^2.7.7 || ^3.1",
+# "laminas/laminas-zendframework-bridge": "^1.0"
Requires: php(language) >= 5.6
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 3.1.0 with php-autoloader(%{gh_owner}/zend-stdlib) < 4)
-# remirepo:4
-%else
-Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 3.1.0
-Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4
-%endif
-%if ! %{bootstrap}
+Requires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.1.0 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)
# From composer, "suggest": {
-# "psr/http-factory-implementation": "psr/http-factory-implementation, for creating file upload instances when consuming PSR-7 in file upload filters",
-# "zendframework/zend-crypt": "Zend\\Crypt component",
-# "zendframework/zend-i18n": "Zend\\I18n component",
-# "zendframework/zend-servicemanager": "Zend\\ServiceManager component",
-# "zendframework/zend-uri": "Zend\\Uri component for UriNormalize filter"
+# "laminas/laminas-crypt": "Laminas\\Crypt component, for encryption filters",
+# "laminas/laminas-i18n": "Laminas\\I18n component for filters depending on i18n functionality",
+# "laminas/laminas-servicemanager": "Laminas\\ServiceManager component, for using the filter chain functionality",
+# "laminas/laminas-uri": "Laminas\\Uri component, for the UriNormalize filter",
+# "psr/http-factory-implementation": "psr/http-factory-implementation, for creating file upload instances when consuming PSR-7 in file upload filters"
+Suggests: php-autoloader(%{gh_owner}/laminas-crypt)
+Suggests: php-autoloader(%{gh_owner}/laminas-i18n)
+Suggests: php-autoloader(%{gh_owner}/laminas-servicemanager)
+Suggests: php-autoloader(%{gh_owner}/laminas-uri)
Suggests: php-composer(psr/http-factory-implementation)
-Suggests: php-autoloader(%{gh_owner}/zend-crypt)
-Suggests: php-autoloader(%{gh_owner}/zend-i18n)
-Suggests: php-autoloader(%{gh_owner}/zend-servicemanager)
-Suggests: php-autoloader(%{gh_owner}/zend-uri)
+# optional compression extensions
+Recommends: php-bz2
+Recommends: php-zlib
+Suggests: php-lzf
+# remirepo:2
+Suggests: php-snappy
+Suggests: php-rar
+Recommends: php-zip
+# remirepo:4
+%else
+Requires: php-laminas-stdlib
+Requires: php-laminas-zendframework-bridge
%endif
# Autoloader
Requires: php-composer(fedora/autoloader)
-# From phpcompatinfo report for version 2.8.0
+# From phpcompatinfo report for version 2.9.3
Requires: php-date
Requires: php-iconv
Requires: php-mbstring
Requires: php-openssl
Requires: php-pcre
Requires: php-spl
-# optional compression extensions
-Requires: php-bz2
-Requires: php-zlib
-Suggests: php-lzf
-Recommends: php-zip
-# remirepo:2
-Suggests: php-snappy
-Suggests: php-rar
-Obsoletes: php-ZendFramework2-%{library} < 2.5
-Provides: php-ZendFramework2-%{library} = %{version}
-Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version}
+# Compatibily ensure by the bridge
+Obsoletes: php-zendframework-%{zf_name} < 2.9.3
+Provides: php-zendframework-%{zf_name} = %{version}
+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\Filter component provides a set of commonly needed data filters.
+The %{namespace}\Filter component provides a set of commonly needed data filters.
It also provides a simple filter chaining mechanism by which multiple
filters may be applied to a single datum in a user-defined order.
-Documentation: https://zendframework.github.io/%{gh_project}/
+Documentation: https://docs.laminas.dev/%{gh_project}/
%prep
@@ -144,22 +141,36 @@ 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/Stdlib/autoload.php',
+ '%{php_home}/%{namespace}/Stdlib/autoload.php',
]);
\Fedora\Autoloader\Dependencies::optional([
'%{php_home}/Psr/Http/Message/http-factory-autoload.php',
- '%{php_home}/Zend/Crypt/autoload.php',
- '%{php_home}/Zend/I18n/autoload.php',
- '%{php_home}/Zend/ServiceManager/autoload.php',
- '%{php_home}/Zend/Uri/autoload.php',
+ '%{php_home}/%{namespace}/Crypt/autoload.php',
+ '%{php_home}/%{namespace}/I18n/autoload.php',
+ '%{php_home}/%{namespace}/ServiceManager/autoload.php',
+ '%{php_home}/%{namespace}/Uri/autoload.php',
'%{_datadir}/pear/Archive/Tar/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
@@ -167,15 +178,22 @@ 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
# Need investigation
rm test/Compress/SnappyTest.php
+: check compat autoloader
+php -r '
+require "%{buildroot}%{php_home}/Zend/%{library}/autoload.php";
+return (class_exists("\\Zend\\%{library}\\ToInt") ? 0 : 1);
+'
+
+: upstream test suite
ret=0
-for cmd in "php %{phpunit}" php71 php72 php73 php74; do
+for cmd in "php %{phpunit}" php72 php73 php74; do
if which $cmd; then
set $cmd
$1 ${2:-%{_bindir}/phpunit6} || ret=1
@@ -188,14 +206,20 @@ 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
+* Thu Jan 9 2020 Remi Collet <remi@remirepo.net> - 2.9.3-1
+- switch to Laminas
+- update to 2.9.3
+
* Tue Aug 20 2019 Remi Collet <remi@remirepo.net> - 2.9.2-1
- update to 2.9.2