From 7b37d91c4a689fb1753c108a6c9c283e22419591 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 2 Mar 2018 11:53:15 +0100 Subject: Update to 3.4.5 raise dependency on twig 1.35 raise dependency on polyfill 1.6 add php-symfony3-lock subpackage improve autoloader generation to catch exception --- composer.json | 11 ++-- php-symfony3-generate-autoloaders.php | 5 ++ php-symfony3.spec | 94 +++++++++++++++++++++++++++-------- 3 files changed, 84 insertions(+), 26 deletions(-) diff --git a/composer.json b/composer.json index 1ef01f1..e1c3fa6 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "ext-xml": "*", "doctrine/common": "~2.4", "fig/link-util": "^1.0", - "twig/twig": "~1.34|~2.4", + "twig/twig": "^1.35|^2.4.4", "psr/cache": "~1.0", "psr/container": "^1.0", "psr/link": "^1.0", @@ -30,7 +30,7 @@ "symfony/polyfill-intl-icu": "~1.0", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php56": "~1.0", - "symfony/polyfill-php70": "~1.0" + "symfony/polyfill-php70": "~1.6" }, "replace": { "symfony/asset": "self.version", @@ -57,6 +57,7 @@ "symfony/inflector": "self.version", "symfony/intl": "self.version", "symfony/ldap": "self.version", + "symfony/lock": "self.version", "symfony/monolog-bridge": "self.version", "symfony/options-resolver": "self.version", "symfony/process": "self.version", @@ -98,8 +99,7 @@ "egulias/email-validator": "~1.2,>=1.2.8|~2.0", "symfony/phpunit-bridge": "~3.4|~4.0", "symfony/security-acl": "~2.8|~3.0", - "phpdocumentor/reflection-docblock": "^3.0|^4.0", - "sensio/framework-extra-bundle": "^3.0.2" + "phpdocumentor/reflection-docblock": "^3.0|^4.0" }, "conflict": { "phpdocumentor/reflection-docblock": "<3.0||>=3.2.0,<3.2.2", @@ -109,6 +109,7 @@ "provide": { "psr/cache-implementation": "1.0", "psr/container-implementation": "1.0", + "psr/log-implementation": "1.0", "psr/simple-cache-implementation": "1.0" }, "autoload": { @@ -133,7 +134,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } } } diff --git a/php-symfony3-generate-autoloaders.php b/php-symfony3-generate-autoloaders.php index 3f0fcc3..4af24cb 100755 --- a/php-symfony3-generate-autoloaders.php +++ b/php-symfony3-generate-autoloaders.php @@ -15,6 +15,7 @@ $finder = new Finder(); $finder->in(SYMFONY_SOURCE_DIR)->name('composer.json')->sortByName(); foreach ($finder as $composerFile) { + fprintf(STDERR, "\tgenerate %s\n", $composerFile); $autoloadGenerator = new AutoloadGenerator($composerFile); echo $autoloadGenerator->getFilename().PHP_EOL; echo $autoloadGenerator->getDevFilename().PHP_EOL; @@ -197,6 +198,10 @@ final class AutoloadGenerator { 'prefix' => 'FEDORA_SYMFONY3_DIR', 'path' => 'Component/Ldap/autoload.php', ], + 'symfony/lock' => [ + 'prefix' => 'FEDORA_SYMFONY3_DIR', + 'path' => 'Component/Lock/autoload.php', + ], 'symfony/monolog-bridge' => [ 'prefix' => 'FEDORA_SYMFONY3_DIR', 'path' => 'Component/Monolog/autoload.php', diff --git a/php-symfony3.spec b/php-symfony3.spec index 3707633..14fc339 100644 --- a/php-symfony3.spec +++ b/php-symfony3.spec @@ -13,8 +13,8 @@ %global github_owner symfony %global github_name symfony -%global github_version 3.3.16 -%global github_commit 98e128ccee7afff6313dc3e9cce619f6e1caedbc +%global github_version 3.4.5 +%global github_commit 8a023e125a68c0bce08d2a8c72d67e07f0d74cab %global composer_vendor symfony %global composer_project symfony @@ -85,29 +85,24 @@ # "psr/simple-cache": "^1.0" %global psr_simple_cache_min_ver 1.0 %global psr_simple_cache_max_ver 2.0 -# "sensio/framework-extra-bundle": "^3.0.2" -%global sensio_framework_extra_bundle_min_ver 1.0 -%global sensio_framework_extra_bundle_max_ver 2.0 # "symfony/polyfill-intl-icu": "~1.0" # "symfony/polyfill-mbstring": "~1.0" # "symfony/polyfill-php56": "~1.0" -# "symfony/polyfill-php70": "~1.0" -%global symfony_polyfill_min_ver 1.0 +# "symfony/polyfill-php70": "~1.6" +%global symfony_polyfill_min_ver 1.6 %global symfony_polyfill_max_ver 2.0 # "symfony/security-acl": "~2.8|~3.0" # NOTE: Min version not 4.0 to restrict to single major version %global symfony_security_acl_min_ver 2.8 %global symfony_security_acl_max_ver 3.0 -# "twig/twig": "~1.34|~2.4" +# "twig/twig": "~1.35|~2.4" # NOTE: Multiple major versions handled in autoloaders -%global twig_min_ver 1.34 +%global twig_min_ver 1.35 %global twig_max_ver 3.0 # Build using "--with tests" to enable tests %global with_tests 0%{?_with_tests:1} -%global with_sensio_framework_extra_bundle 0 - %global php_version_id %(%{_bindir}/php -r "echo PHP_VERSION_ID;") %{!?phpdir: %global phpdir %{_datadir}/php} @@ -117,7 +112,7 @@ Name: php-%{composer_project}3 Version: %{github_version} -Release: 5%{?dist} +Release: 1%{?dist} Summary: Symfony PHP framework (version 3) Group: Development/Libraries @@ -179,9 +174,6 @@ BuildRequires: php-composer(symfony/security-acl) < %{symfony_security_acl_max_ BuildRequires: php-composer(symfony/security-acl) >= %{symfony_security_acl_min_ver} BuildRequires: php-composer(twig/twig) < %{twig_max_ver} BuildRequires: php-composer(twig/twig) >= %{twig_min_ver} -%if %{with_sensio_framework_extra_bundle} -BuildRequires: php-composer(sensio/framework-extra-bundle) < %{sensio_framework_extra_bundle_max_ver} -BuildRequires: php-composer(sensio/framework-extra-bundle) >= %{sensio_framework_extra_bundle_min_ver} ## phpcompatinfo (computed from version 3.3.6) BuildRequires: php-ctype BuildRequires: php-curl @@ -212,7 +204,6 @@ BuildRequires: php-xml BuildRequires: php-xmlreader ## Autoloader BuildRequires: php-composer(fedora/autoloader) -%endif # Bridges Requires: php-composer(%{composer_vendor}/doctrine-bridge) = %{version} @@ -252,6 +243,7 @@ Requires: php-composer(%{composer_vendor}/http-kernel) = %{version} Requires: php-composer(%{composer_vendor}/inflector) = %{version} Requires: php-composer(%{composer_vendor}/intl) = %{version} Requires: php-composer(%{composer_vendor}/ldap) = %{version} +Requires: php-composer(%{composer_vendor}/lock) = %{version} Requires: php-composer(%{composer_vendor}/options-resolver) = %{version} Requires: php-composer(%{composer_vendor}/process) = %{version} Requires: php-composer(%{composer_vendor}/property-access) = %{version} @@ -348,6 +340,7 @@ Requires: php-composer(%{composer_vendor}/http-kernel) = %{version} %if 0%{?fedora} Suggests: php-composer(%{composer_vendor}/console) Suggests: php-composer(%{composer_vendor}/event-dispatcher) +Suggests: php-composer(%{composer_vendor}/symfony/security-core) Suggests: php-composer(%{composer_vendor}/var-dumper) %endif @@ -507,9 +500,6 @@ Requires: php-composer(%{composer_vendor}/finder) = %{version} Requires: php-composer(%{composer_vendor}/http-foundation) = %{version} Requires: php-composer(%{composer_vendor}/http-kernel) = %{version} Requires: php-composer(%{composer_vendor}/routing) = %{version} -Requires: php-composer(%{composer_vendor}/stopwatch) = %{version} -Requires: php-composer(doctrine/cache) >= %{doctrine_cache_min_ver} -Requires: php-composer(doctrine/cache) < %{doctrine_cache_max_ver} Requires: php-xml # composer.json: optional %if 0%{?fedora} @@ -649,7 +639,9 @@ Summary: Symfony WebServer Bundle (version 3) License: MIT # composer.json +Requires: php-composer(%{composer_vendor}/config) = %{version} Requires: php-composer(%{composer_vendor}/console) = %{version} +Requires: php-composer(%{composer_vendor}/dependency-injection) = %{version} Requires: php-composer(%{composer_vendor}/http-kernel) = %{version} Requires: php-composer(%{composer_vendor}/process) = %{version} # phpcompatinfo (computed from version 3.3.6) @@ -859,7 +851,7 @@ Requires: php-composer(%{composer_vendor}/debug) = %{version} # composer.json: optional %if 0%{?fedora} Suggests: php-composer(%{composer_vendor}/event-dispatcher) -Suggests: php-composer(%{composer_vendor}/filesystem) +Suggests: php-composer(%{composer_vendor}/lock) Suggests: php-composer(%{composer_vendor}/process) Suggests: php-composer(psr/log) %endif @@ -1161,6 +1153,8 @@ Summary: Symfony HttpFoundation Component (version 3) URL: http://symfony.com/doc/%{symfony3_doc_ver}/components/http_foundation.html Requires: %{name}-common = %{version}-%{release} +Requires: php-composer(%{composer_vendor}/polyfill-php70) < %{symfony_polyfill_max_ver} +Requires: php-composer(%{composer_vendor}/polyfill-php70) >= %{symfony_polyfill_min_ver} # phpcompatinfo (computed from version 3.3.6) Requires: php-date Requires: php-fileinfo @@ -1234,6 +1228,8 @@ Suggests: php-pecl(Xdebug) # Composer Provides: php-composer(%{composer_vendor}/http-kernel) = %{version} +Provides: php-composer(psr/log-implementation) = 1.0 + %description http-kernel The HttpKernel Component provides a structured process for converting a Request @@ -1321,6 +1317,35 @@ Autoloader: %{symfony3_dir}/Component/Ldap/autoload.php # ------------------------------------------------------------------------------ +%package lock + +Summary: Symfony Lock Component (version 3) +License: MIT + +Requires: %{name}-common = %{version}-%{release} +# composer.json +Requires: php-composer(psr/log) < %{psr_log_max_ver} +Requires: php-composer(psr/log) >= %{psr_log_min_ver} +# phpcompatinfo for version 3.4.5 +Requires: php-hash +Requires: php-pcre +Requires: php-posix +Requires: php-spl +%if 0%{?fedora} +Suggests: php-pecl(memcached) +Suggests: php-sysvsem +%endif + +# Composer +Provides: php-composer(%{composer_vendor}/lock) = %{version} + +%description lock +%{summary}. + +Autoloader: %{symfony3_dir}/Component/Lock/autoload.php + +# ------------------------------------------------------------------------------ + %package options-resolver Summary: Symfony OptionsResolver Component (version 3) @@ -1701,6 +1726,7 @@ Requires: php-reflection Requires: php-spl Requires: php-xml %if 0%{?fedora} +Suggests: php-intl Suggests: php-mysql Suggests: php-pecl(amqp) Suggests: php-pgsql @@ -1841,7 +1867,8 @@ if (!defined('FEDORA_SYMFONY3_DIR')) { AUTOLOAD : Create individual sub-package autoloaders -for AUTOLOADER in $(./%{name}-generate-autoloaders.php) +./%{name}-generate-autoloaders.php >/tmp/autoloader.lst +for AUTOLOADER in $(cat /tmp/autoloader.lst) do sed \ -e 's#__VERSION__#%{version}#' \ @@ -1993,7 +2020,9 @@ exit $RET %{symfony3_dir}/Bundle/autoload.php %dir %{symfony3_dir}/Component %{symfony3_dir}/Component/autoload.php +%if %{with_tests} %exclude %{symfony3_dir}/vendor +%endif # ------------------------------------------------------------------------------ @@ -2511,6 +2540,22 @@ exit $RET # ------------------------------------------------------------------------------ +%files lock + +%license src/Symfony/Component/Lock/LICENSE +%doc src/Symfony/Component/Lock/*.md +%doc src/Symfony/Component/Lock/composer.json + +%{symfony3_dir}/Component/Lock +%exclude %{symfony3_dir}/Component/Lock/LICENSE +%exclude %{symfony3_dir}/Component/Lock/*.md +%exclude %{symfony3_dir}/Component/Lock/autoload-dev.php +%exclude %{symfony3_dir}/Component/Lock/composer.json +%exclude %{symfony3_dir}/Component/Lock/phpunit.* +%exclude %{symfony3_dir}/Component/Lock/Tests + +# ------------------------------------------------------------------------------ + %files options-resolver %license src/Symfony/Component/OptionsResolver/LICENSE @@ -2757,6 +2802,13 @@ exit $RET # ############################################################################## %changelog +* Fri Mar 2 2018 Remi Collet - 3.4.5-1 +- Update to 3.4.5 +- raise dependency on twig 1.35 +- raise dependency on polyfill 1.6 +- add php-symfony3-lock subpackage +- improve autoloader generation to catch exception + * Thu Feb 22 2018 Remi Collet - 3.3.16-5 - add all BuildRequires when test suite is disabled -- cgit