From 43abed521002d1717ed87ba6bbdd2f5b5cf6ef07 Mon Sep 17 00:00:00 2001 From: fabien Date: Fri, 20 Jan 2012 13:06:21 +0000 Subject: [PATCH 1/7] [1.4] fixed rror in Debug mode from sfDebug.class.php when myUser implements sfSecurityUser (closes #9996) git-svn-id: http://svn.symfony-project.com/branches/1.4@33309 ee427ae8-e902-0410-961c-c3ed070cd9f9 --- lib/debug/sfDebug.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/debug/sfDebug.class.php b/lib/debug/sfDebug.class.php index 8d83d6714..f4adbf81f 100644 --- a/lib/debug/sfDebug.class.php +++ b/lib/debug/sfDebug.class.php @@ -167,7 +167,7 @@ public static function userAsArray(sfUser $user = null) 'culture' => $user->getCulture(), ); - if ($user instanceof sfSecurityUser) + if ($user instanceof sfBasicSecurityUser) { $data = array_merge($data, array( 'authenticated' => $user->isAuthenticated(), From ac023d85852a9691c481e170d5972b1db2a82b06 Mon Sep 17 00:00:00 2001 From: fabien Date: Wed, 15 Feb 2012 16:02:28 +0000 Subject: [PATCH 2/7] [1.4] added a way to understand why a Doctrine migration fails (closes #8728, patch from rande) git-svn-id: http://svn.symfony-project.com/branches/1.4@33338 ee427ae8-e902-0410-961c-c3ed070cd9f9 --- .../lib/task/sfDoctrineMigrateTask.class.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineMigrateTask.class.php b/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineMigrateTask.class.php index b4078c078..03c65a8bf 100644 --- a/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineMigrateTask.class.php +++ b/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineMigrateTask.class.php @@ -100,7 +100,23 @@ protected function execute($arguments = array(), $options = array()) $this->logSection('doctrine', sprintf('Migrating from version %s to %s%s', $from, $version, $options['dry-run'] ? ' (dry run)' : '')); try { - $migration->migrate($version, $options['dry-run']); + $migration_classes = $migration->getMigrationClasses(); + if($version < $from) + { + for($i = (int)$from - 1; $i >= (int)$version; $i--) + { + $this->logSection('doctrine', 'executing migration : '.$i .', class: '.$migration_classes[$i]); + $migration->migrate($i, $options['dry-run']); + } + } + else + { + for($i = (int)$from + 1; $i <= (int)$version; $i++) + { + $this->logSection('doctrine', 'executing migration : '.$i.', class: '.$migration_classes[$i]); + $migration->migrate($i, $options['dry-run']); + } + } } catch (Exception $e) { From c1ce6618eea9ed46ffd437234df2ae6bb5a996a2 Mon Sep 17 00:00:00 2001 From: fabien Date: Thu, 8 Mar 2012 07:52:59 +0000 Subject: [PATCH 3/7] [1.4] fixed Notice with PHP 5.4 (closes #10003) git-svn-id: http://svn.symfony-project.com/branches/1.4@33358 ee427ae8-e902-0410-961c-c3ed070cd9f9 --- lib/i18n/sfCultureInfo.class.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/i18n/sfCultureInfo.class.php b/lib/i18n/sfCultureInfo.class.php index f635c8d36..7466ed142 100644 --- a/lib/i18n/sfCultureInfo.class.php +++ b/lib/i18n/sfCultureInfo.class.php @@ -772,16 +772,21 @@ public function getCurrencies($currencies = null, $full = false) $allCurrencies = array_intersect_key($allCurrencies, array_flip($currencies)); } - if (!$full) + foreach ($allCurrencies as $key => $value) { - foreach ($allCurrencies as $key => $value) - { - $allCurrencies[$key] = $value[1]; - } + $allCurrencies[$key] = $value[1]; } $this->sortArray($allCurrencies); + if ($full) + { + foreach ($allCurrencies as $key => $value) + { + $allCurrencies[$key] = array($key, $value); + } + } + return $allCurrencies; } @@ -846,7 +851,7 @@ public function getTimeZones() /** * sorts the passed array according to the locale of this sfCultureInfo class * - * @param array the array to pe sorted wiht "asort" and this locale + * @param array the array to be sorted with "asort" and this locale */ public function sortArray(&$array) { From 4c371c85af003539a1ec3757d01bcf9da0aba89a Mon Sep 17 00:00:00 2001 From: fabien Date: Thu, 8 Mar 2012 13:48:42 +0000 Subject: [PATCH 4/7] [1.4] fixed previous commit git-svn-id: http://svn.symfony-project.com/branches/1.4@33361 ee427ae8-e902-0410-961c-c3ed070cd9f9 --- lib/i18n/sfCultureInfo.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/i18n/sfCultureInfo.class.php b/lib/i18n/sfCultureInfo.class.php index 7466ed142..3afc0ccf2 100644 --- a/lib/i18n/sfCultureInfo.class.php +++ b/lib/i18n/sfCultureInfo.class.php @@ -772,9 +772,11 @@ public function getCurrencies($currencies = null, $full = false) $allCurrencies = array_intersect_key($allCurrencies, array_flip($currencies)); } + $tmp = array(); foreach ($allCurrencies as $key => $value) { $allCurrencies[$key] = $value[1]; + $tmp[$key] = $value[0]; } $this->sortArray($allCurrencies); @@ -783,7 +785,7 @@ public function getCurrencies($currencies = null, $full = false) { foreach ($allCurrencies as $key => $value) { - $allCurrencies[$key] = array($key, $value); + $allCurrencies[$key] = array($tmp[$key], $value); } } From 27b51252a5d4ace7b84fde8951370cbb6fec2172 Mon Sep 17 00:00:00 2001 From: fabien Date: Thu, 8 Mar 2012 13:53:08 +0000 Subject: [PATCH 5/7] [1.4] fixed a notice on PHP 5.4 (closes #9985, patch from bshaffer) git-svn-id: http://svn.symfony-project.com/branches/1.4@33362 ee427ae8-e902-0410-961c-c3ed070cd9f9 --- lib/widget/sfWidgetFormSelectCheckbox.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/widget/sfWidgetFormSelectCheckbox.class.php b/lib/widget/sfWidgetFormSelectCheckbox.class.php index 4f1366aaa..864781b54 100644 --- a/lib/widget/sfWidgetFormSelectCheckbox.class.php +++ b/lib/widget/sfWidgetFormSelectCheckbox.class.php @@ -102,7 +102,7 @@ protected function formatChoices($name, $value, $choices, $attributes) 'id' => $id = $this->generateId($name, self::escapeOnce($key)), ); - if ((is_array($value) && in_array(strval($key), $value)) || strval($key) == strval($value)) + if ((is_array($value) && in_array(strval($key), $value)) || (is_string($value) && strval($key) == strval($value))) { $baseAttributes['checked'] = 'checked'; } From 28a7351ae1c95edf34bd94728b0b1559c865bfe9 Mon Sep 17 00:00:00 2001 From: fabien Date: Thu, 8 Mar 2012 13:55:43 +0000 Subject: [PATCH 6/7] [1.4] added some tests (closes #3237, patch from Stephen.Ostrow) git-svn-id: http://svn.symfony-project.com/branches/1.4@33363 ee427ae8-e902-0410-961c-c3ed070cd9f9 --- test/functional/fixtures/apps/frontend/config/view.yml | 3 +++ test/functional/genericTest.php | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/test/functional/fixtures/apps/frontend/config/view.yml b/test/functional/fixtures/apps/frontend/config/view.yml index 64f550313..d690255fe 100644 --- a/test/functional/fixtures/apps/frontend/config/view.yml +++ b/test/functional/fixtures/apps/frontend/config/view.yml @@ -14,6 +14,9 @@ default: - ie6: condition: lte IE 6 + - + multiple_media: + media: 'print,handheld' javascripts: [ ] diff --git a/test/functional/genericTest.php b/test/functional/genericTest.php index 43ef9945b..f70672271 100644 --- a/test/functional/genericTest.php +++ b/test/functional/genericTest.php @@ -3,7 +3,7 @@ /* * This file is part of the symfony package. * (c) 2004-2006 Fabien Potencier - * + * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ @@ -23,6 +23,7 @@ checkElement('body', '/congratulations/i')-> checkElement('link[href="/sf/sf_default/css/screen.css"]')-> checkElement('link[href="/css/main.css"]')-> + checkElement('link[href="/css/multiple_media.css"][media="print,handheld"]')-> matches('#'.preg_quote('').'#')-> end() ; From bc3e78210d2b1f179cf51387185b4379109e1840 Mon Sep 17 00:00:00 2001 From: fabien Date: Thu, 8 Mar 2012 14:02:40 +0000 Subject: [PATCH 7/7] [1.4] updated CHANGELOG for version 1.4.x git-svn-id: http://svn.symfony-project.com/branches/1.4@33365 ee427ae8-e902-0410-961c-c3ed070cd9f9 --- CHANGELOG.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b7fdf1427..b1369b486 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,7 +34,17 @@ CHANGELOG * reverted [33226] because of side effects (see http://trac.symfony-project.org/ticket/8348) -12/13/11: Version 1.4.16 +08/03/12: Versions 1.4.17 +------------------------- + + * [33363] added some tests (closes #3237, patch from Stephen.Ostrow) + * [33362] fixed a notice on PHP 5.4 (closes #9985, patch from bshaffer) + * [33358] fixed Notice with PHP 5.4 (closes #10003) + * [33309] fixed error in Debug mode from sfDebug.class.php when myUser implements sfSecurityUser (closes #9996) + * [33299] reverted [33226] because of side effects (refs #8348) + * [33292] fixed test for PHP 5.3 (patch from pylebecq) + +12/13/12: Version 1.4.16 ------------------------ * [33251] fixed sfChoiceFormat when a string to translate contains a valid range (closes #9973)