From bd17b09a6b32d6fe3554de9c2a8bc0407f2a3b2a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 18 Oct 2018 06:51:46 +0200 Subject: update to 1.9.1 raise dependency on doctrine/dbal 2.5.12 raise dependency on jdorn/sql-formatter 1.2.16 --- composer.json | 23 ++++++---- php-doctrine-doctrine-bundle.spec | 93 ++++++++++++++++++++++++--------------- 2 files changed, 73 insertions(+), 43 deletions(-) diff --git a/composer.json b/composer.json index d1246b1..a317139 100644 --- a/composer.json +++ b/composer.json @@ -24,24 +24,28 @@ } ], "require": { - "php": ">=5.5.9", - "symfony/framework-bundle": "~2.7|~3.0|~4.0", + "php": "^5.5.9|^7.0", + "symfony/framework-bundle": "^2.7.22|~3.0|~4.0", "symfony/console": "~2.7|~3.0|~4.0", "symfony/dependency-injection": "~2.7|~3.0|~4.0", - "doctrine/dbal": "~2.3", - "jdorn/sql-formatter": "~1.1", + "doctrine/dbal": "^2.5.12", + "jdorn/sql-formatter": "^1.2.16", "symfony/doctrine-bridge": "~2.7|~3.0|~4.0", "doctrine/doctrine-cache-bundle": "~1.2" }, "require-dev": { - "doctrine/orm": "~2.3", + "doctrine/orm": "~2.4", "symfony/yaml": "~2.7|~3.0|~4.0", "symfony/validator": "~2.7|~3.0|~4.0", "symfony/property-info": "~2.8|~3.0|~4.0", "symfony/phpunit-bridge": "~2.7|~3.0|~4.0", - "twig/twig": "~1.12|~2.0", + "twig/twig": "~1.26|~2.0", "satooshi/php-coveralls": "^1.0", - "phpunit/phpunit": "~4" + "phpunit/phpunit": "^4.8.36|^5.7|^6.4", + "symfony/web-profiler-bundle": "~2.7|~3.0|~4.0" + }, + "conflict": { + "symfony/http-foundation": "<2.6" }, "suggest": { "symfony/web-profiler-bundle": "To use the data collector.", @@ -50,9 +54,12 @@ "autoload": { "psr-4": { "Doctrine\\Bundle\\DoctrineBundle\\": "" } }, + "autoload-dev": { + "psr-4": { "": "Tests/DependencyInjection" } + }, "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.8.x-dev" } } } diff --git a/php-doctrine-doctrine-bundle.spec b/php-doctrine-doctrine-bundle.spec index aaaafc7..c04e9df 100644 --- a/php-doctrine-doctrine-bundle.spec +++ b/php-doctrine-doctrine-bundle.spec @@ -12,38 +12,39 @@ %global github_owner doctrine %global github_name DoctrineBundle -%global github_version 1.6.13 -%global github_commit 8cd4c2921b6cef14a78d98cd3f0fb81ba6a976f9 +%global github_version 1.9.1 +%global github_commit 703fad32e4c8cbe609caf45a71a1d4266c830f0f %global composer_vendor doctrine %global composer_project doctrine-bundle -# "php": ">=5.5.9" +# "php": "^5.5.9|^7.0" %global php_min_ver 5.5.9 -# "doctrine/dbal": "~2.3" -%global dbal_min_ver 2.3 +# "doctrine/dbal": "^2.5.12" +%global dbal_min_ver 2.5.12 %global dbal_max_ver 3.0 # "doctrine/doctrine-cache-bundle": "~1.2" %global cache_bundle_min_ver 1.2 %global cache_bundle_max_ver 2.0 -# "doctrine/orm": "~2.3" -%global orm_min_ver 2.3 +# "doctrine/orm": "~2.4" +%global orm_min_ver 2.4 %global orm_max_ver 3.0 -# "jdorn/sql-formatter": "~1.1" -%global sql_formatter_min_ver 1.1 +# "jdorn/sql-formatter": "^1.2.16" +%global sql_formatter_min_ver 1.2.16 %global sql_formatter_max_ver 2.0 # "symfony/console": "~2.7|~3.0|~4.0" # "symfony/dependency-injection": "~2.7|~3.0|~4.0" # "symfony/doctrine-bridge": "~2.7|~3.0|~4.0" -# "symfony/framework-bundle": "~2.7|~3.0|~4.0" +# "symfony/framework-bundle": "~2.7.22|~3.0|~4.0" # "symfony/property-info": "~2.8|~3.0|~4.0" # "symfony/validator": "~2.7|~3.0|~4.0" # "symfony/yaml": "~2.7|~3.0|~4.0" +# "symfony/web-profiler-bundle": "~2.7|~3.0|~4.0" %global symfony_min_ver 2.8 %global symfony_max_ver 5 -# "twig/twig": "~1.12|~2.0" -%global twig_min_ver 1.12 -%if 0%{?fedora} >= 26 +# "twig/twig": "~1.26|~2.0" +%global twig_min_ver 1.26 +%if 0%{?fedora} >= 26 || 0%{?rhel} >= 8 %global twig_max_ver 3 %else %global twig_max_ver 2 @@ -62,19 +63,23 @@ Summary: Symfony Bundle for Doctrine Group: Development/Libraries License: MIT URL: https://github.com/%{github_owner}/%{github_name} -Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz +Source0: %{name}-%{github_version}-%{github_commit}.tar.gz +Source1: %{name}-get-source.sh + +Patch0: %{name}-vendor.patch BuildArch: noarch # Tests %if %{with_tests} ## composer.json BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: php-composer(doctrine/dbal) >= %{dbal_min_ver} -BuildRequires: php-composer(doctrine/doctrine-cache-bundle) >= %{cache_bundle_min_ver} -BuildRequires: php-composer(doctrine/orm) >= %{orm_min_ver} -BuildRequires: php-composer(jdorn/sql-formatter) >= %{sql_formatter_min_ver} -BuildRequires: php-composer(phpunit/phpunit) -%if 0%{?fedora} >= 27 +BuildRequires: php-theseer-autoload +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires:(php-composer(doctrine/dbal) >= %{dbal_min_ver} with php-composer(doctrine/dbal) < %{dbal_max_ver}) +BuildRequires:(php-composer(doctrine/doctrine-cache-bundle) >= %{cache_bundle_min_ver} with php-composer(doctrine/doctrine-cache-bundle) < %{cache_bundle_max_ver}) +BuildRequires:(php-composer(doctrine/orm) >= %{orm_min_ver} with php-composer(doctrine/orm) < %{orm_max_ver}) +BuildRequires:(php-composer(jdorn/sql-formatter) >= %{sql_formatter_min_ver} with php-composer(jdorn/sql-formatter) < %{sql_formatter_max_ver}) +BuildRequires:(php-composer(twig/twig) >= %{twig_min_ver} with php-composer(twig/twig) < %{twig_max_ver}) # ensure same version of all components is used BuildRequires: php-symfony3-console BuildRequires: php-symfony3-dependency-injection @@ -83,7 +88,17 @@ BuildRequires: php-symfony3-framework-bundle BuildRequires: php-symfony3-property-info BuildRequires: php-symfony3-validator BuildRequires: php-symfony3-yaml +BuildRequires: php-symfony3-web-profiler-bundle %else +BuildRequires: php-composer(doctrine/dbal) < %{dbal_min_ver} +BuildRequires: php-composer(doctrine/dbal) >= %{dbal_min_ver} +BuildRequires: php-composer(doctrine/doctrine-cache-bundle) < %{cache_bundle_min_ver} +BuildRequires: php-composer(doctrine/doctrine-cache-bundle) >= %{cache_bundle_min_ver} +BuildRequires: php-composer(doctrine/orm) < %{orm_min_ver} +BuildRequires: php-composer(doctrine/orm) >= %{orm_min_ver} +BuildRequires: php-composer(jdorn/sql-formatter) < %{sql_formatter_min_ver} +BuildRequires: php-composer(jdorn/sql-formatter) >= %{sql_formatter_min_ver} +BuildRequires: php-composer(phpunit/phpunit) BuildRequires: php-symfony-console BuildRequires: php-symfony-dependency-injection BuildRequires: php-symfony-doctrine-bridge @@ -91,9 +106,11 @@ BuildRequires: php-symfony-framework-bundle BuildRequires: php-symfony-property-info BuildRequires: php-symfony-validator BuildRequires: php-symfony-yaml -%endif +BuildRequires: php-symfony-web-profiler-bundle BuildRequires: php-composer(twig/twig) < %{twig_max_ver} BuildRequires: php-composer(twig/twig) >= %{twig_min_ver} +%endif +BuildRequires: php-composer(phpunit/phpunit) ## phpcompatinfo (computed from version 1.6.7) BuildRequires: php-dom BuildRequires: php-pcre @@ -130,7 +147,7 @@ Requires: php-composer(fedora/autoloader) Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version} # Weak dependencies -%if 0%{?fedora} >= 21 +%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8 Suggests: php-composer(doctrine/orm) Suggests: php-composer(symfony/web-profiler-bundle) Suggests: php-composer(twig/twig) @@ -144,6 +161,7 @@ Autoloader: %{phpdir}/Doctrine/Bundle/DoctrineBundle/autoload.php %prep %setup -qn %{github_name}-%{github_commit} +%patch0 -p0 : Licenses and docs mkdir -p .rpm/{docs,licenses} @@ -170,28 +188,28 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php'; '%{phpdir}/Doctrine/DBAL/autoload.php', '%{phpdir}/jdorn-sql-formatter/autoload.php', [ - '%{phpdir}/Symfony4/Bridge/Doctrine/autoload.php', '%{phpdir}/Symfony3/Bridge/Doctrine/autoload.php', + '%{phpdir}/Symfony4/Bridge/Doctrine/autoload.php', '%{phpdir}/Symfony/Bridge/Doctrine/autoload.php', ], [ - '%{phpdir}/Symfony4/Bundle/FrameworkBundle/autoload.php', '%{phpdir}/Symfony3/Bundle/FrameworkBundle/autoload.php', + '%{phpdir}/Symfony4/Bundle/FrameworkBundle/autoload.php', '%{phpdir}/Symfony/Bundle/FrameworkBundle/autoload.php', ], [ - '%{phpdir}/Symfony4/Component/Console/autoload.php', '%{phpdir}/Symfony3/Component/Console/autoload.php', + '%{phpdir}/Symfony4/Component/Console/autoload.php', '%{phpdir}/Symfony/Component/Console/autoload.php', ], [ - '%{phpdir}/Symfony4/Component/DependencyInjection/autoload.php', '%{phpdir}/Symfony3/Component/DependencyInjection/autoload.php', + '%{phpdir}/Symfony4/Component/DependencyInjection/autoload.php', '%{phpdir}/Symfony/Component/DependencyInjection/autoload.php', ]]); \Fedora\Autoloader\Dependencies::optional([ '%{phpdir}/Doctrine/ORM/autoload.php', [ - '%{phpdir}/Symfony4/Bundle/WebProfilerBundle/autoload.php', '%{phpdir}/Symfony3/Bundle/WebProfilerBundle/autoload.php', + '%{phpdir}/Symfony4/Bundle/WebProfilerBundle/autoload.php', '%{phpdir}/Symfony/Bundle/WebProfilerBundle/autoload.php', ], [ '%{phpdir}/Twig2/autoload.php', @@ -208,19 +226,19 @@ cp -pr * %{buildroot}%{phpdir}/Doctrine/Bundle/DoctrineBundle/ %check %if %{with_tests} -BOOTSTRAP=%{buildroot}%{phpdir}/Doctrine/Bundle/DoctrineBundle/autoload.php - -: Upstream tests -%{_bindir}/phpunit --verbose --bootstrap $BOOTSTRAP +phpab -o bs.php Tests/DependencyInjection +cat << 'EOF' | tee -a bs.php +require '%{buildroot}%{phpdir}/Doctrine/Bundle/DoctrineBundle/autoload.php'; +EOF : Upstream tests with SCLs if available -SCL_RETURN_CODE=0 -for SCL in php56 php70 php71 php72; do +RETURN_CODE=0 +for SCL in php php71 php72 php73; do if which $SCL; then - $SCL %{_bindir}/phpunit --verbose --bootstrap $BOOTSTRAP || SCL_RETURN_CODE=1 + $SCL %{_bindir}/phpunit --verbose --bootstrap bs.php || RETURN_CODE=1 fi done -exit $SCL_RETURN_CODE +exit $RETURN_CODE %else : Tests skipped %endif @@ -236,6 +254,11 @@ exit $SCL_RETURN_CODE %changelog +* Wed Oct 17 2018 Remi Collet - 1.9.1-1 +- update to 1.9.1 +- raise dependency on doctrine/dbal 2.5.12 +- raise dependency on jdorn/sql-formatter 1.2.16 + * Fri Nov 10 2017 Remi Collet - 1.6.13-1 - Update to 1.6.13 - fix autoloader to allow symfony 2, 3 and 4 -- cgit