summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore8
-rw-r--r--composer.json71
-rw-r--r--php-zendframework-zend-di3.spec98
3 files changed, 126 insertions, 51 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fc9aa8c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+clog
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/composer.json b/composer.json
index 9f15661..4cafd69 100644
--- a/composer.json
+++ b/composer.json
@@ -1,38 +1,71 @@
{
"name": "zendframework/zend-di",
- "description": " ",
+ "description": "Automated dependency injection for PSR-11 containers",
"license": "BSD-3-Clause",
"keywords": [
- "zf2",
- "di"
+ "zf",
+ "zendframework",
+ "di",
+ "psr-11"
],
- "homepage": "https://github.com/zendframework/zend-di",
- "autoload": {
- "psr-4": {
- "Zend\\Di\\": "src/"
- }
+ "support": {
+ "docs": "https://docs.zendframework.com/zend-di/",
+ "issues": "https://github.com/zendframework/zend-di/issues",
+ "source": "https://github.com/zendframework/zend-di",
+ "rss": "https://github.com/zendframework/zend-di/releases.atom",
+ "slack": "https://zendframework-slack.herokuapp.com",
+ "forum": "https://discourse.zendframework.com/c/questions/components"
},
"require": {
- "php": "^5.5 || ^7.0",
- "container-interop/container-interop": "^1.1",
- "zendframework/zend-code": "^2.6 || ^3.0",
+ "php": "^7.1",
+ "psr/container": "^1.0",
+ "psr/log": "^1.0",
"zendframework/zend-stdlib": "^2.7 || ^3.0"
},
"require-dev": {
- "fabpot/php-cs-fixer": "1.7.*",
- "phpunit/PHPUnit": "~4.0"
+ "container-interop/container-interop": "^1.2.0",
+ "mikey179/vfsStream": "^1.6",
+ "phpunit/phpunit": "^7.3",
+ "zendframework/zend-coding-standard": "~1.0.0",
+ "zendframework/zend-servicemanager": "^3.0"
},
- "minimum-stability": "dev",
- "prefer-stable": true,
- "extra": {
- "branch-alias": {
- "dev-master": "2.6-dev",
- "dev-develop": "2.7-dev"
+ "conflict": {
+ "zendframework/zend-servicemanager-di": "*"
+ },
+ "suggest": {
+ "zendframework/zend-servicemanager": "An IoC container without auto wiring capabilities"
+ },
+ "autoload": {
+ "psr-4": {
+ "Zend\\Di\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"ZendTest\\Di\\": "test/"
}
+ },
+ "config": {
+ "sort-packages": true
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.1-dev",
+ "dev-develop": "3.2-dev"
+ },
+ "zf": {
+ "component": "Zend\\Di",
+ "config-provider": "Zend\\Di\\ConfigProvider"
+ }
+ },
+ "scripts": {
+ "check": [
+ "@cs-check",
+ "@test"
+ ],
+ "cs-check": "phpcs",
+ "cs-fix": "phpcbf",
+ "test": "phpunit --colors=always",
+ "test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
}
}
diff --git a/php-zendframework-zend-di3.spec b/php-zendframework-zend-di3.spec
index 0262dd2..68f9147 100644
--- a/php-zendframework-zend-di3.spec
+++ b/php-zendframework-zend-di3.spec
@@ -1,4 +1,4 @@
-# remirepo/Fedora spec file for php-zendframework-zend-di
+# remirepo/Fedora spec file for php-zendframework-zend-di3
#
# Copyright (c) 2015-2019 Remi Collet
# License: CC-BY-SA
@@ -7,10 +7,11 @@
# Please, preserve the changelog entries
#
%global bootstrap 0
-%global gh_commit 1fd1ba85660b5a2718741b38639dc7c4c3194b37
+%global gh_commit 177e850e1bbd251f8d572ac2952d598741e73be7
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner zendframework
%global gh_project zend-di
+%global major 3
%global php_home %{_datadir}/php
%global library Di
%if %{bootstrap}
@@ -19,10 +20,10 @@
%global with_tests 0%{!?_without_tests:1}
%endif
-Name: php-%{gh_owner}-%{gh_project}
-Version: 2.6.1
-Release: 8%{?dist}
-Summary: Zend Framework %{library} component
+Name: php-%{gh_owner}-%{gh_project}%{major}
+Version: 3.1.1
+Release: 1%{?dist}
+Summary: Zend Framework %{library} component version %{major}
License: BSD
URL: https://zendframework.github.io/%{gh_project}/
@@ -38,42 +39,56 @@ BuildRequires: php-pcre
BuildRequires: php-spl
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-composer(container-interop/container-interop) >= 1.1 with php-composer(container-interop/container-interop) < 2)
-BuildRequires: (php-autoloader(%{gh_owner}/zend-code) >= 2.6 with php-autoloader(%{gh_owner}/zend-code) < 4)
+BuildRequires: (php-composer(psr/container) >= 1.0 with php-composer(psr/container) < 2)
+BuildRequires: (php-composer(psr/log) >= 1.0 with php-composer(psr/log) < 2)
BuildRequires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7 with php-autoloader(%{gh_owner}/zend-stdlib) < 4)
-# remirepo:6
+# From composer, "require-dev": {
+# "container-interop/container-interop": "^1.2.0",
+# "mikey179/vfsStream": "^1.6",
+# "phpunit/phpunit": "^7.3",
+# "zendframework/zend-coding-standard": "~1.0.0",
+# "zendframework/zend-servicemanager": "^3.0"
+BuildRequires: (php-composer(container-interop/container-interop) >= 1.1 with php-composer(container-interop/container-interop) < 2)
+BuildRequires: (php-composer(mikey179/vfsStream) >= 1.6 with php-composer(mikey179/vfsStream) < 2)
+BuildRequires: (php-autoloader(%{gh_owner}/zend-servicemanager) >= 3.0 with php-autoloader(%{gh_owner}/zend-servicemanager) < 4)
+# remirepo:8
%else
+BuildRequires: php-composer(psr/container) < 2
+BuildRequires: php-composer(psr/container) >= 1.0
+BuildRequires: php-composer(psr/log) < 2
+BuildRequires: php-composer(psr/log) >= 1.0
+BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) < 4
+BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
BuildRequires: php-composer(container-interop/container-interop) < 2
BuildRequires: php-composer(container-interop/container-interop) >= 1.1
-BuildRequires: php-autoloader(%{gh_owner}/zend-code) >= 2.6
-BuildRequires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
+BuildRequires: php-composer(mikey179/vfsStream) < 2
+BuildRequires: php-composer(mikey179/vfsStream) >= 1.6
+BuildRequires: php-autoloader(%{gh_owner}/zend-servicemanager) < 4
+BuildRequires: php-autoloader(%{gh_owner}/zend-servicemanager) >= 3.0
%endif
-# From composer, "require-dev": {
-# "fabpot/php-cs-fixer": "1.7.*",
-# "phpunit/PHPUnit": "~4.0"
-BuildRequires: php-composer(phpunit/phpunit) >= 4.0
+BuildRequires: phpunit7 => 7.3
%endif
# Autoloader
BuildRequires: php-fedora-autoloader-devel
# From composer, "require": {
-# "php": "^5.5 || ^7.0",
-# "container-interop/container-interop": "^1.1",
-# "zendframework/zend-code": "^2.6 || ^3.0",
+# "php": "^7.1",
+# "psr/container": "^1.0",
+# "psr/log": "^1.0",
# "zendframework/zend-stdlib": "^2.7 || ^3.0"
-Requires: php(language) >= 5.3.23
+Requires: php(language) >= 7.1
%if ! %{bootstrap}
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (php-composer(container-interop/container-interop) >= 1.1 with php-composer(container-interop/container-interop) < 2)
-Requires: (php-autoloader(%{gh_owner}/zend-code) >= 2.6 with php-autoloader(%{gh_owner}/zend-code) < 4)
+Requires: (php-composer(psr/container) >= 1.0 with php-composer(psr/container) < 2)
+Requires: (php-composer(psr/log) >= 1.0 with php-composer(psr/log) < 2)
Requires: (php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7 with php-autoloader(%{gh_owner}/zend-stdlib) < 4)
# remirepo:8
%else
-Requires: php-composer(container-interop/container-interop) >= 1.1
-Requires: php-composer(container-interop/container-interop) < 2
-Requires: php-autoloader(%{gh_owner}/zend-code) >= 2.6
-Requires: php-autoloader(%{gh_owner}/zend-code) < 4
+Requires: php-composer(psr/container) < 2
+Requires: php-composer(psr/container) >= 1.0
+Requires: php-composer(psr/log) < 2
+Requires: php-composer(psr/log) >= 1.0
Requires: php-autoloader(%{gh_owner}/zend-stdlib) >= 2.7
Requires: php-autoloader(%{gh_owner}/zend-stdlib) < 4
%endif
@@ -85,7 +100,7 @@ Suggests: php-autoloader(%{gh_owner}/zend-servicemanager)
%endif
# Autoloader
Requires: php-composer(fedora/autoloader)
-# From phpcompatinfo report for version 2.5.2
+# From phpcompatinfo report for version 3.3.1
Requires: php-reflection
Requires: php-pcre
Requires: php-spl
@@ -110,14 +125,18 @@ Documentation: https://zendframework.github.io/%{gh_project}/
mv LICENSE.md LICENSE
+: Fix templates location
+sed -e 's:../../templates:templates:' -i src/CodeGenerator/*php
+mv templates src/CodeGenerator/templates
+
%build
: 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}/Zend/Code/autoload.php',
+ '%{php_home}/Psr/Container/autoload.php',
+ '%{php_home}/Psr/Log/autoload.php',
'%{php_home}/Zend/Stdlib/autoload.php',
]);
\Fedora\Autoloader\Dependencies::optional([
@@ -128,7 +147,7 @@ EOF
%install
mkdir -p %{buildroot}%{php_home}/Zend/
-cp -pr src %{buildroot}%{php_home}/Zend/%{library}
+cp -pr src %{buildroot}%{php_home}/Zend/%{library}%{major}
%check
@@ -136,14 +155,19 @@ 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';
+require_once '%{buildroot}%{php_home}/Zend/%{library}%{major}/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('ZendTest\\%{library}\\', dirname(__DIR__) . '/test');
+\Fedora\Autoloader\Dependencies::required([
+ '%{php_home}/Interop/Container/autoload.php',
+ '%{php_home}/org/bovigo/vfs/autoload.php',
+ '%{php_home}/Zend/ServiceManager/autoload.php',
+]);
EOF
ret=0
for cmd in php php71 php72 php73; do
if which $cmd; then
- $cmd %{_bindir}/phpunit --verbose || ret=1
+ $cmd %{_bindir}/phpunit7 --verbose || ret=1
fi
done
exit $ret
@@ -158,10 +182,20 @@ exit $ret
%license LICENSE
%doc *.md
%doc composer.json
-%{php_home}/Zend/%{library}
+%{php_home}/Zend/%{library}%{major}
%changelog
+* Thu Feb 28 2019 Remi Collet <remi@remirepo.net> - 3.1.1-1
+- update to 3.1.1
+- rename to php-zendframework-zend-di3
+- move to /usr/share/php/Zend/Di3
+- raise dependency on PHP 7.1
+- add dependency on psr/container
+- add dependency on psr/log
+- drop dependency on zend-code
+- drop dependency container-interop
+
* Thu Feb 28 2019 Remi Collet <remi@remirepo.net> - 2.6.1-8
- use range dependencies