diff options
author | Remi Collet <fedora@famillecollet.com> | 2015-11-25 17:56:53 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2015-11-25 17:56:53 +0100 |
commit | 0f457ab9e67916d6a1014e9134b163f289e60d63 (patch) | |
tree | f877117f84dd9dee487f17faa419fe84bc4dd287 | |
parent | c5ae622c72219a4c3fad3fffc7651f8e4f2982df (diff) |
php-symfony: 2.7.7
-rw-r--r-- | php-symfony-upstream.patch | 25 | ||||
-rw-r--r-- | php-symfony.spec | 70 |
2 files changed, 46 insertions, 49 deletions
diff --git a/php-symfony-upstream.patch b/php-symfony-upstream.patch deleted file mode 100644 index 29adb9a..0000000 --- a/php-symfony-upstream.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 1bdd127938058a1f34fd0bc883ebb9e4d6ccf67d Mon Sep 17 00:00:00 2001 -From: Fabien Potencier <fabien.potencier@gmail.com> -Date: Sat, 24 Oct 2015 22:25:19 +0200 -Subject: [PATCH] fixed Twig deprecation notices - ---- - composer.json | 2 +- - src/Symfony/Bridge/Twig/Extension/FormExtension.php | 2 +- - src/Symfony/Bridge/Twig/composer.json | 2 +- - src/Symfony/Bundle/SecurityBundle/composer.json | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/Symfony/Bridge/Twig/Extension/FormExtension.php b/src/Symfony/Bridge/Twig/Extension/FormExtension.php -index 9c7339f..e972ac4 100644 ---- a/src/Symfony/Bridge/Twig/Extension/FormExtension.php -+++ b/src/Symfony/Bridge/Twig/Extension/FormExtension.php -@@ -21,7 +21,7 @@ - * @author Fabien Potencier <fabien@symfony.com> - * @author Bernhard Schussek <bschussek@gmail.com> - */ --class FormExtension extends \Twig_Extension -+class FormExtension extends \Twig_Extension implements \Twig_Extension_InitRuntimeInterface - { - /** - * This property is public so that it can be accessed directly from compiled diff --git a/php-symfony.spec b/php-symfony.spec index c998041..9ab47af 100644 --- a/php-symfony.spec +++ b/php-symfony.spec @@ -14,8 +14,8 @@ %{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)} %global github_owner symfony %global github_name symfony -%global github_version 2.7.6 -%global github_commit 66b2e9662c44d478b69e48278aa54079a006eb42 +%global github_version 2.7.7 +%global github_commit cc69dbd24b4b2e6de60b2414ef95da2794f459a2 %global github_short %(c=%{github_commit}; echo ${c:0:7}) %global composer_vendor symfony @@ -98,9 +98,6 @@ License: MIT URL: http://symfony.com Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_short}.tar.gz -# https://github.com/symfony/symfony/commit/1bdd127938058a1f34fd0bc883ebb9e4d6ccf67d -Patch0: %{name}-upstream.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch # Tests @@ -1641,12 +1638,33 @@ The YAML Component loads and dumps YAML files. %prep %setup -qn %{github_name}-%{github_commit} -%patch0 -p1 - : Remove unnecessary files find src -name '.git*' -delete -: Create autoloader +: Create autoloaders +cat << 'AUTOLOAD' | tee src/Symfony/Component/autoload.php +<?php +/** + * Autoloader for all Symfony components and their dependencies. + * + * Created by %{name}-%{version}-%{release} + * + * @return \Symfony\Component\ClassLoader\ClassLoader + */ + +if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Component\ClassLoader\ClassLoader)) { + if (!class_exists('Symfony\\Component\\ClassLoader\\ClassLoader', false)) { + require_once __DIR__ . '/ClassLoader/ClassLoader.php'; + } + + $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader(); + $fedoraClassLoader->register(); +} +$fedoraClassLoader->addPrefix('Symfony\\Component\\', dirname(dirname(__DIR__))); + +return $fedoraClassLoader; +AUTOLOAD + cat << 'AUTOLOAD' | tee src/Symfony/autoload.php <?php /** @@ -1660,6 +1678,10 @@ cat << 'AUTOLOAD' | tee src/Symfony/autoload.php * @return \Symfony\Component\ClassLoader\ClassLoader */ +require_once __DIR__ . '/Component/autoload.php'; + +$fedoraClassLoader->addPrefix('Symfony\\', dirname(__DIR__)); + // Dependency autoloaders foreach (array( '%{phpdir}/Doctrine/Bundle/DoctrineBundle/autoload.php', @@ -1682,19 +1704,6 @@ foreach (array( } } -if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Component\ClassLoader\ClassLoader)) { - if (!class_exists('Symfony\\Component\\ClassLoader\\ClassLoader', false)) { - require_once __DIR__ . '/Component/ClassLoader/ClassLoader.php'; - } - - $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader(); - $fedoraClassLoader->register(); -} - -if (!array_key_exists('Symfony\\', $fedoraClassLoader->getPrefixes())) { - $fedoraClassLoader->addPrefix('Symfony\\', dirname(__DIR__)); -} - if (!interface_exists('SessionHandlerInterface', false) && file_exists(__DIR__ . '/Component/HttpFoundation/Resources/stubs/SessionHandlerInterface.php')) { require_once __DIR__ . '/Component/HttpFoundation/Resources/stubs/SessionHandlerInterface.php'; } @@ -1709,11 +1718,17 @@ return $fedoraClassLoader; AUTOLOAD : Create autoloader softlinks for each bridge/bundle/component -for PKG in src/Symfony/*/* +for PKG in src/Symfony/Component/* do - ln -s ../../autoload.php $PKG/autoload.php + if [ -d $PKG ]; then + ln -s ../autoload.php $PKG/autoload.php # PEAR compat - ln -s ../../autoload.php $PKG/autoloader.php + ln -s ../autoload.php $PKG/autoloader.php + fi +done +for PKG in src/Symfony/{Bridge,Bundle}/* +do + ln -s ../../autoload.php $PKG/autoload.php done %if %{with_tests} @@ -1795,12 +1810,14 @@ BOOTSTRAP : Run tests RET=0 for PKG in %{buildroot}%{phpdir}/Symfony/*/*; do + if [ -d $PKG ]; then echo -e "\n>>>>>>>>>>>>>>>>>>>>>>> ${PKG}\n" %{_bindir}/php -d include_path=.:%{buildroot}%{phpdir}:%{phpdir} \ %{_bindir}/phpunit \ --exclude-group benchmark,intl-data,tty \ --bootstrap bootstrap.php \ $PKG || RET=1 + fi done exit $RET %else @@ -1832,6 +1849,7 @@ exit $RET %dir %{symfony_dir}/Bridge %dir %{symfony_dir}/Bundle %dir %{symfony_dir}/Component + %{symfony_dir}/Component/autoload.php # ------------------------------------------------------------------------------ @@ -2500,6 +2518,10 @@ exit $RET # ############################################################################## %changelog +* Wed Nov 25 2015 Remi Collet <remi@fedoraproject.org> - 2.7.7-1 +- Update to 2.7.7 +- lighter autoloader for components + * Mon Nov 2 2015 Remi Collet <remi@fedoraproject.org> - 2.7.6-2 - add upstream patch for twig 1.23 |