summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json72
-rw-r--r--php-laminas-db.spec150
2 files changed, 132 insertions, 90 deletions
diff --git a/composer.json b/composer.json
index 2a35647..0a6cdd3 100644
--- a/composer.json
+++ b/composer.json
@@ -1,39 +1,53 @@
{
- "name": "zendframework/zend-db",
+ "name": "laminas/laminas-db",
"description": "Database abstraction layer, SQL abstraction, result set abstraction, and RowDataGateway and TableDataGateway implementations",
"license": "BSD-3-Clause",
"keywords": [
- "zf",
- "zendframework",
+ "laminas",
"db"
],
+ "homepage": "https://laminas.dev",
"support": {
- "docs": "https://docs.zendframework.com/zend-db/",
- "issues": "https://github.com/zendframework/zend-db/issues",
- "source": "https://github.com/zendframework/zend-db",
- "rss": "https://github.com/zendframework/zend-db/releases.atom",
- "chat": "https://zendframework-slack.herokuapp.com",
- "forum": "https://discourse.zendframework.com/c/questions/components"
+ "docs": "https://docs.laminas.dev/laminas-db/",
+ "issues": "https://github.com/laminas/laminas-db/issues",
+ "source": "https://github.com/laminas/laminas-db",
+ "rss": "https://github.com/laminas/laminas-db/releases.atom",
+ "chat": "https://laminas.dev/chat",
+ "forum": "https://discourse.laminas.dev"
+ },
+ "config": {
+ "sort-packages": true
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.11.x-dev",
+ "dev-develop": "2.12.x-dev"
+ },
+ "laminas": {
+ "component": "Laminas\\Db",
+ "config-provider": "Laminas\\Db\\ConfigProvider"
+ }
},
"require": {
"php": "^5.6 || ^7.0",
- "zendframework/zend-stdlib": "^2.7 || ^3.0"
+ "laminas/laminas-stdlib": "^2.7 || ^3.0",
+ "laminas/laminas-zendframework-bridge": "^1.0"
},
"require-dev": {
- "phpunit/phpunit": "^5.7.27 || ^6.5.14",
- "zendframework/zend-coding-standard": "~1.0.0",
- "zendframework/zend-eventmanager": "^2.6.2 || ^3.0",
- "zendframework/zend-hydrator": "^1.1 || ^2.1 || ^3.0",
- "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3"
+ "laminas/laminas-coding-standard": "~1.0.0",
+ "laminas/laminas-eventmanager": "^2.6.2 || ^3.0",
+ "laminas/laminas-hydrator": "^1.1 || ^2.1 || ^3.0",
+ "laminas/laminas-servicemanager": "^2.7.5 || ^3.0.3",
+ "phpunit/phpunit": "^5.7.27 || ^6.5.14"
},
"suggest": {
- "zendframework/zend-eventmanager": "Zend\\EventManager component",
- "zendframework/zend-hydrator": "Zend\\Hydrator component for using HydratingResultSets",
- "zendframework/zend-servicemanager": "Zend\\ServiceManager component"
+ "laminas/laminas-eventmanager": "Laminas\\EventManager component",
+ "laminas/laminas-hydrator": "Laminas\\Hydrator component for using HydratingResultSets",
+ "laminas/laminas-servicemanager": "Laminas\\ServiceManager component"
},
"autoload": {
"psr-4": {
- "Zend\\Db\\": "src/"
+ "Laminas\\Db\\": "src/"
}
},
"autoload-dev": {
@@ -41,21 +55,8 @@
"test/autoload.php"
],
"psr-4": {
- "ZendTest\\Db\\": "test/unit",
- "ZendIntegrationTest\\Db\\": "test/integration"
- }
- },
- "config": {
- "sort-packages": true
- },
- "extra": {
- "branch-alias": {
- "dev-master": "2.11.x-dev",
- "dev-develop": "2.12.x-dev"
- },
- "zf": {
- "component": "Zend\\Db",
- "config-provider": "Zend\\Db\\ConfigProvider"
+ "LaminasTest\\Db\\": "test/unit/",
+ "LaminasIntegrationTest\\Db\\": "test/integration/"
}
},
"scripts": {
@@ -69,5 +70,8 @@
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml",
"test-integration": "phpunit --colors=always --testsuite \"integration test\"",
"upload-coverage": "coveralls -v"
+ },
+ "replace": {
+ "zendframework/zend-db": "self.version"
}
}
diff --git a/php-laminas-db.spec b/php-laminas-db.spec
index e73b54e..9483ef1 100644
--- a/php-laminas-db.spec
+++ b/php-laminas-db.spec
@@ -1,4 +1,4 @@
-# remirepo/Fedora spec file for php-zendframework-zend-db
+# remirepo/Fedora spec file for php-laminas-db
#
# 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 71626f95f6f9ee326e4be3c34228c1c466300a2c
+%global gh_commit 76f9527da996c2fef32ef1f3a939e18ca5e9d962
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
-%global gh_owner zendframework
-%global gh_project zend-db
+%global gh_owner laminas
+%global gh_project laminas-db
+%global zf_name zend-db
%global php_home %{_datadir}/php
+%global namespace Laminas
%global library Db
%if %{bootstrap}
%global with_tests 0%{?_with_tests:1}
@@ -19,18 +21,16 @@
%global with_tests 0%{!?_without_tests:1}
%endif
-Name: php-%{gh_owner}-%{gh_project}
-Version: 2.11.0
-Release: 2%{?dist}
-Summary: Zend Framework %{library} component
+Name: php-%{gh_project}
+Version: 2.11.2
+Release: 1%{?dist}
+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
-Patch0: https://patch-diff.githubusercontent.com/raw/laminas/laminas-db/pull/32.patch
-
BuildArch: noarch
# Tests
%if %{with_tests}
@@ -41,22 +41,24 @@ BuildRequires: php-pdo
BuildRequires: php-spl
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7 with php-autoloader(%{gh_owner}/zend-stdlib) < 4)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.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": {
-# "phpunit/phpunit": "^5.7.27 || ^6.5.14",
-# "zendframework/zend-coding-standard": "~1.0.0",
-# "zendframework/zend-eventmanager": "^2.6.2 || ^3.0",
-# "zendframework/zend-hydrator": ""^1.1 || ^2.1 || ^3.0",
-# "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3"
-BuildRequires: (php-autoloader(%{gh_owner}/zend-eventmanager) >= 2.6.2 with php-autoloader(%{gh_owner}/zend-eventmanager) < 4)
-BuildRequires: (php-autoloader(%{gh_owner}/zend-hydrator) >= 1.1 with php-autoloader(%{gh_owner}/zend-hydrator) < 4)
-BuildRequires: (php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.5 with php-autoloader(%{gh_owner}/zend-servicemanager) < 4)
-# remirepo:6
+# "laminas/laminas-coding-standard": "~1.0.0",
+# "laminas/laminas-eventmanager": "^2.6.2 || ^3.0",
+# "laminas/laminas-hydrator": "^1.1 || ^2.1 || ^3.0",
+# "laminas/laminas-servicemanager": "^2.7.5 || ^3.0.3",
+# "phpunit/phpunit": "^5.7.27 || ^6.5.14"
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-eventmanager) >= 3.0 with php-autoloader(%{gh_owner}/laminas-eventmanager) < 4)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-hydrator) >= 2.1 with php-autoloader(%{gh_owner}/laminas-hydrator) < 4)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-servicemanager) >= 3.0 with php-autoloader(%{gh_owner}/laminas-servicemanager) < 4)
+# remirepo:7
%else
-BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
-BuildRequires: php-autoloader(%{gh_owner}/zend-eventmanager) >= 2.6.2
-BuildRequires: php-autoloader(%{gh_owner}/zend-hydrator) >= 1.1
-BuildRequires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 2.7.5
+BuildRequires: php-laminas-stdlib
+BuildRequires: php-laminas-zendframework-bridge
+BuildRequires: php-laminas-eventmanager
+BuildRequires: php-laminas-hydrator
+BuildRequires: php-laminas-servicemanager
%endif
%global phpunit %{_bindir}/phpunit6
BuildRequires: phpunit6 >= 6.5.14
@@ -66,50 +68,57 @@ BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
# "php": "^5.6 || ^7.0",
-# "zendframework/zend-stdlib": "^2.7 || ^3.0"
+# "laminas/laminas-stdlib": "^2.7 || ^3.0",
+# "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-stdlib) >= 2.7 with php-autoloader(%{gh_owner}/zend-stdlib) < 4)
+Requires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.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": {
+# "laminas/laminas-eventmanager": "Laminas\\EventManager component",
+# "laminas/laminas-hydrator": "Laminas\\Hydrator component for using HydratingResultSets",
+# "laminas/laminas-servicemanager": "Laminas\\ServiceManager component"
+Suggests: php-autoloader(%{gh_owner}/laminas-eventmanager)
+Suggests: php-autoloader(%{gh_owner}/laminas-hydrator)
+Suggests: php-autoloader(%{gh_owner}/laminas-servicemanager)
+%endif
# remirepo:4
%else
-Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
-Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4
-%endif
-# From composer, "suggest": {
-# "zendframework/zend-eventmanager": "Zend\\EventManager component",
-# "zendframework/zend-servicemanager": "Zend\\ServiceManager component"
-Suggests: php-autoloader(%{gh_owner}/zend-eventmanager)
-Suggests: php-autoloader(%{gh_owner}/zend-hydrator)
-Suggests: php-autoloader(%{gh_owner}/zend-servicemanager)
+Requires: php-laminas-stdlib
+Requires: php-laminas-zendframework-bridge
%endif
# Autoloader
Requires: php-composer(fedora/autoloader)
-# From phpcompatinfo report for version 2.6.2
+# From phpcompatinfo report for version 2.11.2
Requires: php-date
Requires: php-pcre
Requires: php-pdo
Requires: php-spl
-Obsoletes: php-ZendFramework2-%{library} < 2.5
-Provides: php-ZendFramework2-%{library} = %{version}
-Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version}
+Obsoletes: php-ZendFramework2-%{library} < 2.5
+Provides: php-ZendFramework2-%{library} = %{version}
+# Compatibily ensure by the bridge
+Obsoletes: php-zendframework-%{zf_name} < 2.11.1
+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
-Zend\Db is a component that abstract the access to a Database using an object
-oriented API to build the queries. Zend\Db consumes different storage adapters
-to access different database vendors such as MySQL, PostgreSQL, Oracle,
-IBM DB2, Microsoft Sql Server, PDO, etc.
+%{namespace}\Db is a component that abstract the access to a Database using an
+object oriented API to build the queries. %{namespace}\Db consumes different
+storage adapters to access different database vendors such as MySQL,
+PostgreSQL, Oracle, IBM DB2, Microsoft Sql Server, PDO, etc.
-Documentation: https://zendframework.github.io/%{gh_project}/
+Documentation: https://docs.laminas.dev/%{gh_project}/
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-%patch0 -p1 -b .pr32
mv LICENSE.md LICENSE
@@ -119,19 +128,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}/Zend/EventManager/autoload.php',
- '%{php_home}/Zend/Hydrator/autoload.php',
- '%{php_home}/Zend/ServiceManager/autoload.php',
+ '%{php_home}/%{namespace}/EventManager/autoload.php',
+ [
+ '%{php_home}/%{namespace}/Hydrator3/autoload.php',
+ '%{php_home}/%{namespace}/Hydrator/autoload.php',
+ ],
+ '%{php_home}/%{namespace}/ServiceManager/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
@@ -141,13 +167,20 @@ cat << 'EOF' | tee vendor/autoload.php
<?php
# comptibility layer before PSR-0 autoloader
require_once dirname(__DIR__) . '/test/autoload.php';
-require_once '%{buildroot}%{php_home}/Zend/%{library}/autoload.php';
-\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\%{library}\\', dirname(__DIR__) . '/test/unit');
-\Fedora\Autoloader\Autoload::addPsr4('ZendIntegrationTest\\%{library}\\', dirname(__DIR__) . '/test/integration');
+require_once '%{buildroot}%{php_home}/%{namespace}/%{library}/autoload.php';
+\Fedora\Autoloader\Autoload::addPsr4('%{namespace}Test\\%{library}\\', dirname(__DIR__) . '/test/unit');
+\Fedora\Autoloader\Autoload::addPsr4('%{namespace}IntegrationTest\\%{library}\\', dirname(__DIR__) . '/test/integration');
EOF
+: check compat autoloader
+php -r '
+require "%{buildroot}%{php_home}/Zend/%{library}/autoload.php";
+exit (class_exists("\\Zend\\%{library}\\ConfigProvider") ? 0 : 1);
+'
+
+: upstream test suite
ret=0
-for cmdarg in "php %{phpunit}" php71 php72 php73 php74; do
+for cmdarg in "php %{phpunit}" php72 php73 php74; do
if which $cmdarg; then
set $cmdarg
$1 ${2:-%{_bindir}/phpunit6} --verbose || ret=1
@@ -166,9 +199,14 @@ exit $ret
%doc *.md
%doc composer.json
%{php_home}/Zend/%{library}
+%{php_home}/%{namespace}/%{library}
%changelog
+* Tue Jan 14 2020 Remi Collet <remi@remirepo.net> - 2.11.2-1
+- switch to Laminas
+- update to 2.11.2
+
* Thu Jan 2 2020 Remi Collet <remi@remirepo.net> - 2.11.0-2
- update to 2.11.0
- drop patch merged upstream