From c5ae622c72219a4c3fad3fffc7651f8e4f2982df Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 2 Nov 2015 09:19:00 +0100 Subject: php-symfony: upstream patch for twig 1.23 --- getautoloader.sh | 32 -------------------------------- php-symfony-upstream.patch | 25 +++++++++++++++++++++++++ php-symfony.spec | 24 +++++++++++++----------- 3 files changed, 38 insertions(+), 43 deletions(-) delete mode 100644 getautoloader.sh create mode 100644 php-symfony-upstream.patch diff --git a/getautoloader.sh b/getautoloader.sh deleted file mode 100644 index 0e9af18..0000000 --- a/getautoloader.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ] -then - echo usage $0 version - exit 1 -fi - -tmp=$(mktemp --dir) -pushd $tmp - -echo -e "\n+ channel" -pear channel-discover pear.symfony.com - -echo -e "\n+ packages" -pear list-all -c symfony2 | while read name version descr -do - if [ "$name" = "ALL" -o "$name" = "PACKAGE" -o "$version" = "" ] - then - continue - fi - pear download $name-$1 - tar xf $(basename $name)-$1.tgz --strip-components=1 -done -lst=$(find Symfony -name autoloader.php) - -popd -echo -e "\n+ archive: autoloader-$1.tgz" -tar cvzf autoloader-$1.tgz -C $tmp $lst - -echo -e "\n+ cleanups" -rm -rf $tmp diff --git a/php-symfony-upstream.patch b/php-symfony-upstream.patch new file mode 100644 index 0000000..29adb9a --- /dev/null +++ b/php-symfony-upstream.patch @@ -0,0 +1,25 @@ +From 1bdd127938058a1f34fd0bc883ebb9e4d6ccf67d Mon Sep 17 00:00:00 2001 +From: Fabien Potencier +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 + * @author Bernhard Schussek + */ +-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 3edf3b0..c998041 100644 --- a/php-symfony.spec +++ b/php-symfony.spec @@ -70,8 +70,8 @@ # src/Symfony/Bridge/Swiftmailer/composer.json # NOTE: Max version ignored on purpose %global swiftmailer_min_ver 4.2.0 -# "twig/twig": "~1.20|~2.0" -%global twig_min_ver 1.20 +# "twig/twig": "~1.23|~2.0" +%global twig_min_ver 1.23 %global twig_max_ver 3 %if 0%{?fedora} < 21 && 0%{?rhel} < 7 @@ -90,7 +90,7 @@ Name: php-%{composer_project} Version: %{github_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: PHP framework for web projects Group: Development/Libraries @@ -98,7 +98,10 @@ License: MIT URL: http://symfony.com Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_short}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +# https://github.com/symfony/symfony/commit/1bdd127938058a1f34fd0bc883ebb9e4d6ccf67d +Patch0: %{name}-upstream.patch + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch # Tests %if %{with_tests} @@ -1638,6 +1641,8 @@ 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 @@ -1791,17 +1796,11 @@ BOOTSTRAP RET=0 for PKG in %{buildroot}%{phpdir}/Symfony/*/*; do echo -e "\n>>>>>>>>>>>>>>>>>>>>>>> ${PKG}\n" - case $PKG in - */Bridge/Twig) RETIFFAIL=0 - ;; - *) RETIFFAIL=1 - ;; - esac %{_bindir}/php -d include_path=.:%{buildroot}%{phpdir}:%{phpdir} \ %{_bindir}/phpunit \ --exclude-group benchmark,intl-data,tty \ --bootstrap bootstrap.php \ - $PKG || RET=$RETIFFAIL + $PKG || RET=1 done exit $RET %else @@ -2501,6 +2500,9 @@ exit $RET # ############################################################################## %changelog +* Mon Nov 2 2015 Remi Collet - 2.7.6-2 +- add upstream patch for twig 1.23 + * Fri Oct 30 2015 Shawn Iwinski - 2.7.6-1 - Updated to 2.7.6 (RHBZ #1275826) -- cgit