summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json60
-rw-r--r--php-laminas-servicemanager.spec125
2 files changed, 106 insertions, 79 deletions
diff --git a/composer.json b/composer.json
index f49c7d7..505a126 100644
--- a/composer.json
+++ b/composer.json
@@ -1,64 +1,65 @@
{
- "name": "zendframework/zend-servicemanager",
+ "name": "laminas/laminas-servicemanager",
"description": "Factory-Driven Dependency Injection Container",
"license": "BSD-3-Clause",
"keywords": [
+ "laminas",
"di",
"dic",
"dependency-injection",
"psr-11",
- "zf",
- "zendframework",
"servicemanager",
"service-manager"
],
+ "homepage": "https://laminas.dev",
"support": {
- "docs": "https://docs.zendframework.com/zend-servicemanager/",
- "issues": "https://github.com/zendframework/zend-servicemanager/issues",
- "source": "https://github.com/zendframework/zend-servicemanager",
- "rss": "https://github.com/zendframework/zend-servicemanager/releases.atom",
- "slack": "https://zendframework-slack.herokuapp.com",
- "forum": "https://discourse.zendframework.com/c/questions/components"
+ "docs": "https://docs.laminas.dev/laminas-servicemanager/",
+ "issues": "https://github.com/laminas/laminas-servicemanager/issues",
+ "source": "https://github.com/laminas/laminas-servicemanager",
+ "rss": "https://github.com/laminas/laminas-servicemanager/releases.atom",
+ "chat": "https://laminas.dev/chat",
+ "forum": "https://discourse.laminas.dev"
+ },
+ "config": {
+ "sort-packages": true
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.3-dev",
+ "dev-develop": "4.0-dev"
+ }
},
"require": {
"php": "^5.6 || ^7.0",
"container-interop/container-interop": "^1.2",
- "psr/container": "^1.0",
- "zendframework/zend-stdlib": "^3.2.1"
+ "laminas/laminas-stdlib": "^3.2.1",
+ "laminas/laminas-zendframework-bridge": "^1.0",
+ "psr/container": "^1.0"
},
"require-dev": {
- "mikey179/vfsStream": "^1.6.5",
+ "laminas/laminas-coding-standard": "~1.0.0",
+ "mikey179/vfsstream": "^1.6.5",
"ocramius/proxy-manager": "^1.0 || ^2.0",
"phpbench/phpbench": "^0.13.0",
- "phpunit/phpunit": "^5.7.25 || ^6.4.4",
- "zendframework/zend-coding-standard": "~1.0.0"
+ "phpunit/phpunit": "^5.7.25 || ^6.4.4"
},
"provide": {
"container-interop/container-interop-implementation": "^1.2",
"psr/container-implementation": "^1.0"
},
"suggest": {
- "ocramius/proxy-manager": "ProxyManager 1.* to handle lazy initialization of services",
- "zendframework/zend-stdlib": "zend-stdlib ^2.5 if you wish to use the MergeReplaceKey or MergeRemoveKey features in Config instances"
+ "laminas/laminas-stdlib": "laminas-stdlib ^2.5 if you wish to use the MergeReplaceKey or MergeRemoveKey features in Config instances",
+ "ocramius/proxy-manager": "ProxyManager 1.* to handle lazy initialization of services"
},
"autoload": {
"psr-4": {
- "Zend\\ServiceManager\\": "src/"
+ "Laminas\\ServiceManager\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
- "ZendTest\\ServiceManager\\": "test/",
- "ZendBench\\ServiceManager\\": "benchmarks/"
- }
- },
- "config": {
- "sort-packages": true
- },
- "extra": {
- "branch-alias": {
- "dev-master": "3.3-dev",
- "dev-develop": "4.0-dev"
+ "LaminasTest\\ServiceManager\\": "test/",
+ "LaminasBench\\ServiceManager\\": "benchmarks/"
}
},
"bin": [
@@ -75,5 +76,8 @@
"test": "phpunit --colors=always",
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml",
"upload-coverage": "coveralls -v"
+ },
+ "replace": {
+ "zendframework/zend-servicemanager": "self.version"
}
}
diff --git a/php-laminas-servicemanager.spec b/php-laminas-servicemanager.spec
index 80042e7..ecfc3f5 100644
--- a/php-laminas-servicemanager.spec
+++ b/php-laminas-servicemanager.spec
@@ -1,4 +1,4 @@
-# remirepo/Fedora spec file for php-zendframework-zend-servicemanager
+# remirepo/Fedora spec file for php-laminas-servicemanager
#
# 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 a1ed6140d0d3ee803fec96582593ed024950067b
+%global gh_commit 044cb8e380682563fb277ed5f6de4f690e4e6239
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
-%global gh_owner zendframework
-%global gh_project zend-servicemanager
+%global gh_owner laminas
+%global gh_project laminas-servicemanager
+%global zf_name zend-servicemanager
%global php_home %{_datadir}/php
+%global namespace Laminas
%global library ServiceManager
%if %{bootstrap}
%global with_tests 0%{?_with_tests:1}
@@ -19,47 +21,50 @@
%global with_tests 0%{!?_without_tests:1}
%endif
-Name: php-%{gh_owner}-%{gh_project}
+Name: php-%{gh_project}
Version: 3.4.0
-Release: 4%{?dist}
-Summary: Zend Framework %{library} component
+Release: 1%{?dist}
+Summary: Laminas 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-servicemanager/pull/28.patch
+
BuildArch: noarch
# Tests
%if %{with_tests}
BuildRequires: php(language) >= 5.6
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-composer(container-interop/container-interop) >= 1.2 with php-composer(container-interop/container-interop) < 2)
-BuildRequires: (php-composer(psr/container) >= 1.0 with php-composer(psr/container) < 2)
-BuildRequires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1 with php-autoloader(%{gh_owner}/zend-stdlib) < 4)
+BuildRequires: (php-composer(%{gh_owner}/laminas-zendframework-bridge) >= 1.0 with php-composer(%{gh_owner}/laminas-zendframework-bridge) < 2)
+BuildRequires: (php-composer(container-interop/container-interop) >= 1.2 with php-composer(container-interop/container-interop) < 2)
+BuildRequires: (php-composer(psr/container) >= 1.0 with php-composer(psr/container) < 2)
+BuildRequires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.2.1 with php-autoloader(%{gh_owner}/laminas-stdlib) < 4)
# remirepo:8
%else
+BuildRequires: php-laminas-stdlib >= 3.2.1
+BuildRequires: php-laminas-zendframework-bridge
BuildRequires: php-composer(container-interop/container-interop) < 2
BuildRequires: php-composer(container-interop/container-interop) >= 1.2
BuildRequires: php-composer(psr/container) < 2
BuildRequires: php-composer(psr/container) >= 1.0
-BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) < 4
-BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1
%endif
BuildRequires: php-reflection
BuildRequires: php-date
BuildRequires: php-json
BuildRequires: php-spl
# From composer, "require-dev": {
-# "mikey179/vfsStream": "^1.6.5",
+# "laminas/laminas-coding-standard": "~1.0.0",
+# "mikey179/vfsstream": "^1.6.5",
# "ocramius/proxy-manager": "^1.0 || ^2.0",
# "phpbench/phpbench": "^0.13.0",
# "phpunit/phpunit": "^5.7.25 || ^6.4.4"
-# "zendframework/zend-coding-standard": "~1.0.0"
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-composer(mikey179/vfsStream) >= 1.6.5 with php-composer(mikey179/vfsStream) < 2)
+BuildRequires: (php-composer(mikey179/vfsstream) >= 1.6.5 with php-composer(mikey179/vfsstream) < 2)
BuildRequires: (php-composer(ocramius/proxy-manager) >= 1.0 with php-composer(ocramius/proxy-manager) < 3)
# remirepo:6
%else
@@ -76,32 +81,34 @@ BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
# "php": "^5.6 || ^7.0",
# "container-interop/container-interop": "^1.2",
-# "psr/container": "^1.0",
-# "zendframework/zend-stdlib": "^3.1"
+# "laminas/laminas-stdlib": "^3.2.1",
+# "laminas/laminas-zendframework-bridge": "^1.0",
+# "psr/container": "^1.0"
Requires: php(language) >= 5.6
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (php-composer(container-interop/container-interop) >= 1.2 with php-composer(container-interop/container-interop) < 2)
-Requires: (php-composer(psr/container) >= 1.0 with php-composer(psr/container) < 2)
-Requires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1 with php-autoloader(%{gh_owner}/zend-stdlib) < 4)
+Requires: (php-composer(container-interop/container-interop) >= 1.2 with php-composer(container-interop/container-interop) < 2)
+Requires: (php-autoloader(%{gh_owner}/laminas-stdlib) >= 3.2.1 with php-autoloader(%{gh_owner}/laminas-stdlib) < 4)
+Requires: (php-composer(%{gh_owner}/laminas-zendframework-bridge) >= 1.0 with php-composer(%{gh_owner}/laminas-zendframework-bridge) < 2)
+Requires: (php-composer(psr/container) >= 1.0 with php-composer(psr/container) < 2)
# remirepo:8
%else
Requires: php-composer(container-interop/container-interop) >= 1.2
Requires: php-composer(container-interop/container-interop) < 2
+Requires: php-laminas-stdlib >= 3.2.1
+Requires: php-laminas-zendframework-bridge
Requires: php-composer(psr/container) >= 1.0
Requires: php-composer(psr/container) < 2
-Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 3.2.1
-Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4
%endif
-# From phpcompatinfo report for version 3.2.0
+# From phpcompatinfo report for version 3.4.0
Requires: php-reflection
Requires: php-date
Requires: php-json
Requires: php-spl
%if ! %{bootstrap}
# From composer, "suggest": {
-# "ocramius/proxy-manager": "ProxyManager 1.* to handle lazy initialization of services",
-# "zendframework/zend-stdlib": "zend-stdlib ^2.5 if you wish to use the MergeReplaceKey or MergeRemoveKey features in Config instances"
+# "laminas/laminas-stdlib": "laminas-stdlib ^2.5 if you wish to use the MergeReplaceKey or MergeRemoveKey features in Config instances",
+# "ocramius/proxy-manager": "ProxyManager 1.* to handle lazy initialization of services"
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
Suggests: php-composer(ocramius/proxy-manager)
%endif
@@ -109,59 +116,63 @@ Suggests: php-composer(ocramius/proxy-manager)
Requires: php-composer(fedora/autoloader)
%endif
-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} < 3.4.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}
+Provides: php-autoloader(zendframework/%{zf_name}) = %{version}
Provides: php-composer(container-interop/container-interop-implementation) = 1.2
Provides: php-composer(psr/container-implementation) = 1.0
%description
-The Service Locator design pattern is implemented by the Zend\ServiceManager
+The Service Locator design pattern is implemented by the %{gh_project}
component. The Service Locator is a service/object locator, tasked with
retrieving other objects.
-Documentation: https://zendframework.github.io/%{gh_project}/
+Documentation: https://docs.laminas.dev/%{gh_project}/
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-
+%patch0 -p1
mv LICENSE.md LICENSE
%build
-: Create dependency autoloader - deprecated
-cat << 'EOF' | tee autoload.php
-<?php
-require_once '%{php_home}/Interop/Container/autoload.php';
-require_once '%{php_home}/Psr/Container/autoload.php';
-if (file_exists('%{php_home}/ProxyManager/autoload.php')) {
- require_once '%{php_home}/ProxyManager/autoload.php';
-}
-EOF
-
: Create autoloader
phpab --template fedora --output src/autoload.php src
cat << 'EOF' | tee -a src/autoload.php
\Fedora\Autoloader\Dependencies::required([
'%{php_home}/Interop/Container/autoload.php',
'%{php_home}/Psr/Container/autoload.php',
- '%{php_home}/Zend/Stdlib/autoload.php',
+ '%{php_home}/%{namespace}/Stdlib/autoload.php',
]);
\Fedora\Autoloader\Dependencies::optional([
'%{php_home}/ProxyManager/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}
-# For main autoloader (deprecated)
-install -m644 autoload.php %{buildroot}%{php_home}/Zend/%{library}-autoload.php
+: Zend equiv
+mkdir -p %{buildroot}%{php_home}/Zend/%{library}
+cp -pr zf.php %{buildroot}%{php_home}/Zend/%{library}/autoload.php
%check
@@ -169,19 +180,26 @@ install -m644 autoload.php %{buildroot}%{php_home}/Zend/%{library}-autoload.php
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');
\Fedora\Autoloader\Dependencies::required([
'%{php_home}/org/bovigo/vfs/autoload.php',
]);
EOF
ret=0
-for cmd in php php71 php72 php73 php74; do
+for cmd in php php72 php73 php74; do
if which $cmd; then
$cmd %{_bindir}/phpunit6 --verbose || ret=1
fi
done
+
+: check compat autoloader
+php -r '
+require "%{buildroot}%{php_home}/Zend/%{library}/autoload.php";
+return (class_exists("\\Zend\\%{library}\\%{library}") ? 0 : 1);
+'
+
exit $ret
%else
: Test suite disabled
@@ -195,10 +213,15 @@ exit $ret
%doc *.md
%doc composer.json
%{php_home}/Zend/%{library}
-%{php_home}/Zend/%{library}-autoload.php
+%{php_home}/%{namespace}/%{library}
%changelog
+* Tue Jan 7 2020 Remi Collet <remi@remirepo.net> - 3.4.0-1
+- switch to Laminas
+- add fix for PHP 7.4 from
+ https://github.com/laminas/laminas-servicemanager/pull/28
+
* Wed Oct 9 2019 Remi Collet <remi@remirepo.net> - 3.4.0-4
- fix test autoloader