summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-01-20 13:38:41 +0100
committerRemi Collet <remi@remirepo.net>2020-01-20 13:38:41 +0100
commit9a272cd568fb8f718e50df54285ce5cc46ddeba6 (patch)
tree8f89e811692a5d10abcbf6a1f79c583240e49efa
parent405a2efd7b0816a9448a5e7b7a62540a349f57c9 (diff)
rename to php-laminas-config3
install in /usr/share/php/Laminas/Config3 update to 3.3.0 raise dependency on PHP 5.6 raise dependency on laminas-stdlib 3.1 add dependency on psr/container add dependency on json extention drop dependency on laminas-json
-rw-r--r--composer.json46
-rw-r--r--php-laminas-config3.spec92
2 files changed, 81 insertions, 57 deletions
diff --git a/composer.json b/composer.json
index 63987bc..de6012f 100644
--- a/composer.json
+++ b/composer.json
@@ -20,28 +20,32 @@
},
"extra": {
"branch-alias": {
- "dev-master": "2.6-dev",
- "dev-develop": "2.7-dev"
+ "dev-master": "3.3.x-dev",
+ "dev-develop": "3.4.x-dev"
}
},
"require": {
- "php": "^5.5 || ^7.0",
- "laminas/laminas-stdlib": "^2.7 || ^3.0",
- "laminas/laminas-zendframework-bridge": "^1.0"
+ "php": "^5.6 || ^7.0",
+ "ext-json": "*",
+ "laminas/laminas-stdlib": "^2.7.7 || ^3.1",
+ "laminas/laminas-zendframework-bridge": "^1.0",
+ "psr/container": "^1.0"
},
"require-dev": {
- "fabpot/php-cs-fixer": "1.7.*",
- "laminas/laminas-filter": "^2.6",
- "laminas/laminas-i18n": "^2.5",
- "laminas/laminas-json": "^2.6.1",
- "laminas/laminas-servicemanager": "^2.7.5 || ^3.0.3",
- "phpunit/phpunit": "~4.0"
+ "laminas/laminas-coding-standard": "~1.0.0",
+ "laminas/laminas-filter": "^2.7.2",
+ "laminas/laminas-i18n": "^2.7.4",
+ "laminas/laminas-servicemanager": "^2.7.8 || ^3.3",
+ "malukenho/docheader": "^0.1.6",
+ "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2"
+ },
+ "conflict": {
+ "container-interop/container-interop": "<1.2.0"
},
"suggest": {
- "laminas/laminas-filter": "Laminas\\Filter component",
- "laminas/laminas-i18n": "Laminas\\I18n component",
- "laminas/laminas-json": "Laminas\\Json to use the Json reader or writer classes",
- "laminas/laminas-servicemanager": "Laminas\\ServiceManager for use with the Config Factory to retrieve reader and writer instances"
+ "laminas/laminas-filter": "^2.7.2; install if you want to use the Filter processor",
+ "laminas/laminas-i18n": "^2.7.4; install if you want to use the Translator processor",
+ "laminas/laminas-servicemanager": "^2.7.8 || ^3.3; if you need an extensible plugin manager for use with the Config Factory"
},
"autoload": {
"psr-4": {
@@ -53,6 +57,18 @@
"LaminasTest\\Config\\": "test/"
}
},
+ "scripts": {
+ "check": [
+ "@license-check",
+ "@cs-check",
+ "@test"
+ ],
+ "cs-check": "phpcs",
+ "cs-fix": "phpcbf",
+ "test": "phpunit --colors=always",
+ "test-coverage": "phpunit --colors=always --coverage-clover clover.xml",
+ "license-check": "docheader check src/"
+ },
"replace": {
"zendframework/zend-config": "self.version"
}
diff --git a/php-laminas-config3.spec b/php-laminas-config3.spec
index 121eae7..bfdb8b4 100644
--- a/php-laminas-config3.spec
+++ b/php-laminas-config3.spec
@@ -1,4 +1,4 @@
-# remirepo/Fedora spec file for php-laminas-config
+# remirepo/Fedora spec file for php-laminas-config3
#
# Copyright (c) 2015-2020 Remi Collet
# License: CC-BY-SA
@@ -7,7 +7,7 @@
# Please, preserve the changelog entries
#
%global bootstrap 0
-%global gh_commit 71ba6d5dd703196ce66b25abc4d772edb094dae1
+%global gh_commit b8fe057f55e69a0e7a2e4ced79218a43f58606a8
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner laminas
%global gh_project laminas-config
@@ -15,28 +15,30 @@
%global php_home %{_datadir}/php
%global namespace Laminas
%global library Config
+%global major 3
%if %{bootstrap}
%global with_tests 0%{?_with_tests:1}
%else
%global with_tests 0%{!?_without_tests:1}
%endif
-Name: php-%{gh_project}
-Version: 2.6.0
-Release: 2%{?dist}
-Summary: %{namespace} Framework %{library} component
+Name: php-%{gh_project}%{major}
+Version: 3.3.0
+Release: 1%{?dist}
+Summary: %{namespace} Framework %{library} component v%{major}
License: BSD
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
-Patch0: https://github.com/zendframework/zend-config/commit/27d5ba5c13cb4a576400f534057b69231190ac9d.patch
+#Patch0: https://github.com/zendframework/zend-config/commit/27d5ba5c13cb4a576400f534057b69231190ac9d.patch
BuildArch: noarch
# Tests
%if %{with_tests}
-BuildRequires: php(language) >= 5.5
+BuildRequires: php(language) >= 5.6
+BuildRequires: php-json
BuildRequires: php-libxml
BuildRequires: php-pcre
BuildRequires: php-spl
@@ -46,25 +48,23 @@ BuildRequires: php-xmlwriter
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
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)
+BuildRequires: (php-composer(psr/container) >= 1.0 with php-composer(psr/container) < 2)
# From composer, "require-dev": {
-# "fabpot/php-cs-fixer": "1.7.*",
-# "laminas/laminas-filter": "^2.6",
-# "laminas/laminas-i18n": "^2.5",
-# "laminas/laminas-json": "^2.6.1",
-# "laminas/laminas-servicemanager": "^2.7.5 || ^3.0.3",
-# "phpunit/phpunit": "~4.0"
-BuildRequires: (php-autoloader(%{gh_owner}/laminas-filter) >= 2.6 with php-autoloader(%{gh_owner}/laminas-filter) < 3)
-BuildRequires: (php-autoloader(%{gh_owner}/laminas-i18n) >= 2.5 with php-autoloader(%{gh_owner}/laminas-i18n) < 3)
-# ignore max version, as test suite passes with v3
-BuildRequires: (php-autoloader(%{gh_owner}/laminas-json) >= 2.6.1 with php-autoloader(%{gh_owner}/laminas-json) < 4)
-BuildRequires: (php-autoloader(%{gh_owner}/laminas-servicemanager) >= 3.0 with php-autoloader(%{gh_owner}/laminas-servicemanager) < 4)
+# "laminas/laminas-filter": "^2.7.2",
+# "laminas/laminas-i18n": "^2.7.4",
+# "laminas/laminas-servicemanager": "^2.7.8 || ^3.3",
+# "malukenho/docheader": "^0.1.6",
+# "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2"
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-filter) >= 2.7.2 with php-autoloader(%{gh_owner}/laminas-filter) < 3)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-i18n) >= 2.7.4 with php-autoloader(%{gh_owner}/laminas-i18n) < 3)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-servicemanager) >= 3.3 with php-autoloader(%{gh_owner}/laminas-servicemanager) < 4)
# remirepo:8
%else
BuildRequires: php-laminas-stdlib
BuildRequires: php-laminas-zendframework-bridge
+BuildRequires: php-psr-container
BuildRequires: php-laminas-filter
BuildRequires: php-laminas-i18n
-BuildRequires: php-laminas-json
BuildRequires: php-laminas-servicemanager
%endif
BuildRequires: php-composer(phpunit/phpunit) >= 4.0
@@ -73,27 +73,32 @@ BuildRequires: php-composer(phpunit/phpunit) >= 4.0
BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
-# "php": "^5.5 || ^7.0",
+# "php": "^5.6 || ^7.0",
+# "ext-json": "*",
+# "laminas/laminas-stdlib": "^2.7.7 || ^3.1",
+# "laminas/laminas-zendframework-bridge": "^1.0",
+# "psr/container": "^1.0"
# "laminas/laminas-stdlib": "^2.7 || ^3.0",
# "laminas/laminas-zendframework-bridge": "^1.0"
-Requires: php(language) >= 5.5
+Requires: php(language) >= 5.6
+Requires: php-json
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.0 with php-autoloader(%{gh_owner}/laminas-stdlib) < 4)
+Requires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.1 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(psr/container) >= 1.0 with php-composer(psr/container) < 2)
# From composer, "suggest": {
# "laminas/laminas-filter": "Laminas\\Filter component",
# "laminas/laminas-i18n": "Laminas\\I18n component",
-# "laminas/laminas-json": "Laminas\\Json to use the Json reader or writer classes",
# "laminas/laminas-servicemanager": "Laminas\\ServiceManager for use with the Config Factory to retrieve reader and writer instances"
Suggests: php-autoloader(%{gh_owner}/laminas-filter)
Suggests: php-autoloader(%{gh_owner}/laminas-i18n)
-Suggests: php-autoloader(%{gh_owner}/laminas-json)
Suggests: php-autoloader(%{gh_owner}/laminas-servicemanager)
-# remirepo:4
+# remirepo:5
%else
Requires: php-laminas-stdlib
Requires: php-laminas-zendframework-bridge
+Requires: php-psr-container
%endif
# Autoloader
Requires: php-composer(fedora/autoloader)
@@ -104,12 +109,6 @@ Requires: php-spl
Requires: php-xmlreader
Requires: php-xmlwriter
-# remirepo:2
-Obsoletes: php-ZendFramework2-%{library} < 2.5
-Provides: php-ZendFramework2-%{library} = %{version}
-# Compatibily ensure by the bridge
-Obsoletes: php-zendframework-%{zf_name} < 2.6.0-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}
@@ -128,7 +127,6 @@ Documentation: https://docs.laminas.dev/%{gh_project}/
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-%patch0 -p1
mv LICENSE.md LICENSE
@@ -138,11 +136,11 @@ phpab --template fedora --output src/autoload.php src
cat << 'EOF' | tee -a src/autoload.php
\Fedora\Autoloader\Dependencies::required([
'%{php_home}/%{namespace}/Stdlib/autoload.php',
+ '%{php_home}/Psr/Container/autoload.php',
]);
\Fedora\Autoloader\Dependencies::optional([
'%{php_home}/%{namespace}/Filter/autoload.php',
'%{php_home}/%{namespace}/I18n/autoload.php',
- '%{php_home}/%{namespace}/Json/autoload.php',
'%{php_home}/%{namespace}/ServiceManager/autoload.php',
]);
EOF
@@ -152,7 +150,7 @@ cat << 'EOF' | tee zf.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',
+ dirname(dirname(__DIR__)) . '/%{namespace}/%{library}%{major}/autoload.php',
]);
EOF
@@ -160,11 +158,11 @@ EOF
%install
: Laminas library
mkdir -p %{buildroot}%{php_home}/%{namespace}/
-cp -pr src %{buildroot}%{php_home}/%{namespace}/%{library}
+cp -pr src %{buildroot}%{php_home}/%{namespace}/%{library}%{major}
: Zend equiv
-mkdir -p %{buildroot}%{php_home}/Zend/%{library}
-cp -pr zf.php %{buildroot}%{php_home}/Zend/%{library}/autoload.php
+mkdir -p %{buildroot}%{php_home}/Zend/%{library}%{major}
+cp -pr zf.php %{buildroot}%{php_home}/Zend/%{library}%{major}/autoload.php
%check
@@ -172,13 +170,13 @@ cp -pr zf.php %{buildroot}%{php_home}/Zend/%{library}/autoload.php
mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?php
-require_once '%{buildroot}%{php_home}/%{namespace}/%{library}/autoload.php';
+require_once '%{buildroot}%{php_home}/%{namespace}/%{library}%{major}/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";
+require "%{buildroot}%{php_home}/Zend/%{library}%{major}/autoload.php";
exit (class_exists("\\Zend\\%{library}\\Config") ? 0 : 1);
'
@@ -201,11 +199,21 @@ exit $ret
%license LICENSE
%doc *.md
%doc composer.json
-%{php_home}/Zend/%{library}
-%{php_home}/%{namespace}/%{library}
+%{php_home}/Zend/%{library}%{major}
+%{php_home}/%{namespace}/%{library}%{major}
%changelog
+* Mon Jan 20 2020 Remi Collet <remi@remirepo.net> - 3.3.0-1
+- rename to php-laminas-config3
+- install in /usr/share/php/Laminas/Config3
+- update to 3.3.0
+- raise dependency on PHP 5.6
+- raise dependency on laminas-stdlib 3.1
+- add dependency on psr/container
+- add dependency on json extention
+- drop dependency on laminas-json
+
* Fri Jan 17 2020 Remi Collet <remi@remirepo.net> - 2.6.0-2
- cleanup