diff options
Diffstat (limited to 'php-di.spec')
-rw-r--r-- | php-di.spec | 108 |
1 files changed, 49 insertions, 59 deletions
diff --git a/php-di.spec b/php-di.spec index 198e4b9..df94a3d 100644 --- a/php-di.spec +++ b/php-di.spec @@ -12,36 +12,36 @@ %global github_owner PHP-DI %global github_name PHP-DI -%global github_version 5.4.6 -%global github_commit 3f9255659595f3e289f473778bb6c51aa72abbbd +%global github_version 6.0.8 +%global github_commit a634876c69b643b779a89e4b7bec1ed1df803afc %global composer_vendor php-di %global composer_project php-di -# "php": ">=5.5.0" -%global php_min_ver 5.5.0 -# "container-interop/container-interop": "~1.2" -%global container_interop_min_ver 1.2 -%global container_interop_max_ver 2.0 +# "php": ">=7.0.0" +%global php_min_ver 7.0.0 # "doctrine/annotations": "~1.2" %global doctrine_annotations_min_ver 1.2 %global doctrine_annotations_max_ver 2.0 -# "doctrine/cache": "~1.4" -%global doctrine_cache_min_ver 1.4 -%global doctrine_cache_max_ver 2.0 -# "mnapoli/phpunit-easymock": "~0.2.0" -%global phpunit_easymock_min_ver 0.2.0 -%global phpunit_easymock_max_ver 1.0 -# "ocramius/proxy-manager": "~1.0|~2.0" -%global proxy_manager_min_ver 1.0 +# "jeremeamia/superclosure": "^2.0" +%global jeremeamia_superclosure_min_ver 2.0 +%global jeremeamia_superclosure_max_ver 3.0 +# "mnapoli/phpunit-easymock": "~1.0" +%global phpunit_easymock_min_ver 1.0 +%global phpunit_easymock_max_ver 2.0 +# "nikic/php-parser": "^2.0|^3.0|^4.0" +%global nikic_php_parser_min_ver 2.0 +%global nikic_php_parser_max_ver 5.0 +# "ocramius/proxy-manager": "~2.0.2" +%global proxy_manager_min_ver 2.0.2 %global proxy_manager_max_ver 3.0 -# "php-di/invoker": "^1.3.2" -%global di_invoker_min_ver 1.3.2 -%global di_invoker_max_ver 2.0 +# "php-di/invoker": "^2.0" +%global di_invoker_min_ver 2.0 +%global di_invoker_max_ver 3.0 # "php-di/phpdoc-reader": "^2.0.1" %global di_phpdoc_reader_min_ver 2.0.1 %global di_phpdoc_reader_max_ver 3.0 -# "psr/container": "~1.0" +# "psr/container": "^1.0" %global psr_container_min_ver 1.0 %global psr_container_max_ver 2.0 @@ -52,7 +52,7 @@ Name: %{composer_project} Version: %{github_version} -Release: 7%{?github_release}%{?dist} +Release: 1%{?github_release}%{?dist} Summary: The dependency injection container for humans License: MIT @@ -63,8 +63,6 @@ URL: http://php-di.org/ Source0: %{name}-%{github_version}-%{github_commit}.tar.gz Source1: %{name}-get-source.sh -Patch0: https://github.com/PHP-DI/PHP-DI/commit/ecab701e7de49f160d83be6a42d6c5aa9a8df76b.patch - BuildArch: noarch # Tests %if %{with_tests} @@ -72,23 +70,23 @@ BuildArch: noarch BuildRequires: php(language) >= %{php_min_ver} BuildRequires: php-composer(phpunit/phpunit) %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: (php-composer(container-interop/container-interop) >= %{container_interop_min_ver} with php-composer(container-interop/container-interop) < %{container_interop_max_ver}) BuildRequires: (php-composer(doctrine/annotations) >= %{doctrine_annotations_min_ver} with php-composer(doctrine/annotations) < %{doctrine_annotations_max_ver}) -BuildRequires: (php-composer(doctrine/cache) >= %{doctrine_cache_min_ver} with php-composer(doctrine/cache) < %{doctrine_cache_max_ver}) +BuildRequires: (php-composer(jeremeamia/superclosure) >= %{jeremeamia_superclosure_min_ver} with php-composer(jeremeamia/superclosure) < %{jeremeamia_superclosure_max_ver}) BuildRequires: (php-composer(mnapoli/phpunit-easymock) >= %{phpunit_easymock_min_ver} with php-composer(mnapoli/phpunit-easymock) < %{phpunit_easymock_max_ver}) +BuildRequires: (php-composer(nikic/php-parser) >= %{nikic_php_parser_min_ver} with php-composer(nikic/php-parser) < %{nikic_php_parser_max_ver}) BuildRequires: (php-composer(ocramius/proxy-manager) >= %{proxy_manager_min_ver} with php-composer(ocramius/proxy-manager) < %{proxy_manager_max_ver}) BuildRequires: (php-composer(php-di/invoker) >= %{di_invoker_min_ver} with php-composer(php-di/invoker) < %{di_invoker_max_ver}) BuildRequires: (php-composer(php-di/phpdoc-reader) >= %{di_phpdoc_reader_min_ver} with php-composer(php-di/phpdoc-reader) < %{di_phpdoc_reader_max_ver}) BuildRequires: (php-composer(psr/container) >= %{psr_container_min_ver} with php-composer(psr/container) < %{psr_container_max_ver}) %else -BuildRequires: php-composer(container-interop/container-interop) < %{container_interop_max_ver} -BuildRequires: php-composer(container-interop/container-interop) >= %{container_interop_min_ver} BuildRequires: php-composer(doctrine/annotations) < %{doctrine_annotations_max_ver} BuildRequires: php-composer(doctrine/annotations) >= %{doctrine_annotations_min_ver} -BuildRequires: php-composer(doctrine/cache) < %{doctrine_cache_max_ver} -BuildRequires: php-composer(doctrine/cache) >= %{doctrine_cache_min_ver} +BuildRequires: php-composer(jeremeamia/superclosure) < %{jeremeamia_superclosure_max_ver} +BuildRequires: php-composer(jeremeamia/superclosure) >= %{jeremeamia_superclosure_min_ver} BuildRequires: php-composer(mnapoli/phpunit-easymock) < %{phpunit_easymock_max_ver} BuildRequires: php-composer(mnapoli/phpunit-easymock) >= %{phpunit_easymock_min_ver} +BuildRequires: php-composer(nikic/php-parser) < %{nikic_php_parser_max_ver} +BuildRequires: php-composer(nikic/php-parser) >= %{nikic_php_parser_min_ver} BuildRequires: php-composer(ocramius/proxy-manager) < %{proxy_manager_max_ver} BuildRequires: php-composer(ocramius/proxy-manager) >= %{proxy_manager_min_ver} BuildRequires: php-composer(php-di/invoker) < %{di_invoker_max_ver} @@ -98,7 +96,8 @@ BuildRequires: php-composer(php-di/phpdoc-reader) >= %{di_phpdoc_reader_min_ver} BuildRequires: php-composer(psr/container) < %{psr_container_max_ver} BuildRequires: php-composer(psr/container) >= %{psr_container_min_ver} %endif -## phpcompatinfo (computed from version 5.4.6) +## phpcompatinfo (computed from version 6.0.8) +BuildRequires: php-date BuildRequires: php-json BuildRequires: php-pcre BuildRequires: php-reflection @@ -110,13 +109,16 @@ BuildRequires: php-composer(fedora/autoloader) # composer.json Requires: php(language) >= %{php_min_ver} %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -Requires: (php-composer(container-interop/container-interop) >= %{container_interop_min_ver} with php-composer(container-interop/container-interop) < %{container_interop_max_ver}) +Requires: (php-composer(jeremeamia/superclosure) >= %{jeremeamia_superclosure_min_ver} with php-composer(jeremeamia/superclosure) < %{jeremeamia_superclosure_max_ver}) +Requires: (php-composer(nikic/php-parser) >= %{nikic_php_parser_min_ver} with php-composer(nikic/php-parser) < %{nikic_php_parser_max_ver}) Requires: (php-composer(php-di/invoker) >= %{di_invoker_min_ver} with php-composer(php-di/invoker) < %{di_invoker_max_ver}) Requires: (php-composer(php-di/phpdoc-reader) >= %{di_phpdoc_reader_min_ver} with php-composer(php-di/phpdoc-reader) < %{di_phpdoc_reader_max_ver}) Requires: (php-composer(psr/container) >= %{psr_container_min_ver} with php-composer(psr/container) < %{psr_container_max_ver}) %else -Requires: php-composer(container-interop/container-interop) < %{container_interop_max_ver} -Requires: php-composer(container-interop/container-interop) >= %{container_interop_min_ver} +Requires: php-composer(jeremeamia/superclosure) < %{jeremeamia_superclosure_max_ver} +Requires: php-composer(jeremeamia/superclosure) >= %{jeremeamia_superclosure_min_ver} +Requires: php-composer(nikic/php-parser) < %{nikic_php_parser_max_ver} +Requires: php-composer(nikic/php-parser) >= %{nikic_php_parser_min_ver} Requires: php-composer(php-di/invoker) < %{di_invoker_max_ver} Requires: php-composer(php-di/invoker) >= %{di_invoker_min_ver} Requires: php-composer(php-di/phpdoc-reader) < %{di_phpdoc_reader_max_ver} @@ -133,17 +135,16 @@ Requires: php-spl Requires: php-composer(fedora/autoloader) # Weak dependencies -%if 0%{?fedora} >= 21 +%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8 Suggests: php-composer(doctrine/annotations) -Suggests: php-composer(doctrine/cache) Suggests: php-composer(ocramius/proxy-manager) +Suggests: php-pecl(apcu) %endif # php-{COMPOSER_VENDOR}-{COMPOSER_PROJECT} Provides: php-%{composer_vendor}-%{composer_project} = %{version}-%{release} # Composer Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version} -Provides: php-composer(container-interop/container-interop-implementation) = 1.0 Provides: php-composer(psr/container-implementation) = 1.0 %description @@ -154,16 +155,11 @@ Autoloader: %{phpdir}/DI/autoload.php %prep %setup -qn %{github_name}-%{github_commit} -%patch0 -p1 - -: Remove executable bit -: https://github.com/PHP-DI/PHP-DI/pull/392 -chmod a-x src/DI/Definition/Source/DefinitionArray.php %build : Create autoloader -cat <<'AUTOLOAD' | tee src/DI/autoload.php +cat <<'AUTOLOAD' | tee src/autoload.php <?php /** * Autoloader for %{name} and its' dependencies @@ -175,15 +171,19 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php'; require_once __DIR__.'/functions.php'; \Fedora\Autoloader\Dependencies::required([ - '%{phpdir}/Interop/Container/autoload.php', + [ + '%{phpdir}/PhpParser4/autoload.php', + '%{phpdir}/PhpParser3/autoload.php', + '%{phpdir}/PhpParser2/autoload.php', + ], '%{phpdir}/Invoker/autoload.php', '%{phpdir}/PhpDocReader/autoload.php', '%{phpdir}/Psr/Container/autoload.php', + '%{phpdir}/SuperClosure/autoload.php', ]); \Fedora\Autoloader\Dependencies::optional([ '%{phpdir}/Doctrine/Common/Annotations/autoload.php', - '%{phpdir}/Doctrine/Common/Cache/autoload.php', '%{phpdir}/ProxyManager/autoload.php', ]); AUTOLOAD @@ -191,7 +191,7 @@ AUTOLOAD %install mkdir -p %{buildroot}%{phpdir} -cp -rp src/* %{buildroot}%{phpdir}/ +cp -rp src %{buildroot}%{phpdir}/DI %check @@ -207,24 +207,11 @@ require '%{buildroot}%{phpdir}/DI/autoload.php'; require_once '%{phpdir}/EasyMock/autoload.php'; BOOTSTRAP -: Skip tests known to fail with "php-composer(php-di/invoker)" >= 1.3.2 -: See https://github.com/PHP-DI/Invoker/issues/13 -sed 's/function test_not_callable/function SKIP_test_not_callable/' \ - -i tests/IntegrationTest/CallFunctionTest.php -sed 's/function test_not_callable_factory_definition/function SKIP_test_not_callable_factory_definition/' \ - -i tests/IntegrationTest/Definitions/FactoryDefinitionTest.php -sed 's/function test_factory_not_callable/function SKIP_test_factory_not_callable/' \ - -i tests/IntegrationTest/ErrorMessages/ErrorMessagesTest.php -sed -e '/@test/d' \ - -e 's/public function should_/public function test_should_/g' \ - -e 's/function test_should_throw_if_the_factory_is_not_callable/function SKIP_test_should_throw_if_the_factory_is_not_callable/' \ - -i tests/UnitTest/Definition/Resolver/FactoryResolverTest.php - : Upstream tests RETURN_CODE=0 -for PHP_EXEC in php php71 php72 php73; do +for PHP_EXEC in php php70 php71 php72 php73 php74; do if [ "php" == "$PHP_EXEC" ] || which $PHP_EXEC; then - for PHPUNIT in phpunit; do + for PHPUNIT in phpunit6; do PHPUNIT=$(which $PHPUNIT) || : if [ -n "$PHPUNIT" ]; then $PHP_EXEC $PHPUNIT --bootstrap bootstrap.php --verbose || RETURN_CODE=1 @@ -248,6 +235,9 @@ exit $RETURN_CODE %changelog +* Sun May 26 2019 Shawn Iwinski <shawn@iwin.ski> - 6.0.8-1 +- Update to 6.0.8 (RHBZ #1442587) + * Tue May 14 2019 Shawn Iwinski <shawn@iwin.ski> - 5.4.6-7 - Add range version dependencies for Fedora >= 27 || RHEL >= 8 |