From b4e590c568d2eee28c3aa44efa648527a95a80e4 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 3 May 2016 21:56:04 +0200 Subject: [PATCH 1/4] PHP 5.3 compatibility Makes the bundle compatible with older PHP versions again that do not support the `class` constant. --- Form/Type/DatetimeType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Form/Type/DatetimeType.php b/Form/Type/DatetimeType.php index be802aa..9f23fa1 100644 --- a/Form/Type/DatetimeType.php +++ b/Form/Type/DatetimeType.php @@ -159,7 +159,7 @@ public static function convertMalotToIntlFormater($formatter) */ public function getParent() { - return \Symfony\Component\Form\Extension\Core\Type\DateTimeType::class; + return '\Symfony\Component\Form\Extension\Core\Type\DateTimeType'; } public function getName() From 78ca599749541912da0830638b456ef9cacabcf4 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 3 May 2016 21:59:18 +0200 Subject: [PATCH 2/4] compatibility with Symfony < 2.8 Before Symfony 2.8, the Form component expects the `getParent()` method to return the name of the parent form type instead of the parent type's FQCN. --- Form/Type/DatetimeType.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Form/Type/DatetimeType.php b/Form/Type/DatetimeType.php index 9f23fa1..eb58415 100644 --- a/Form/Type/DatetimeType.php +++ b/Form/Type/DatetimeType.php @@ -159,7 +159,11 @@ public static function convertMalotToIntlFormater($formatter) */ public function getParent() { - return '\Symfony\Component\Form\Extension\Core\Type\DateTimeType'; + if (method_exists('Symfony\Component\Form\AbstractType', 'getBlockPrefix')) { + return '\Symfony\Component\Form\Extension\Core\Type\DateTimeType'; + } + + return 'datetime'; } public function getName() From 7204c34a8873fdc66eec47f9cb5fec2f85c7089f Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 9 Jun 2016 23:51:39 +0200 Subject: [PATCH 3/4] turn off PHP memory limit --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2588c77..9631c2d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,6 @@ env: before_script: - curl -s http://getcomposer.org/installer | php - - php composer.phar install + - php -d memory_limit=1 composer.phar install script: phpunit From 7db1f961899bb0b119889bdea738cadb7be73170 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 10 Jun 2016 00:00:11 +0200 Subject: [PATCH 4/4] fix memory limit value --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9631c2d..1ae07fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,6 @@ env: before_script: - curl -s http://getcomposer.org/installer | php - - php -d memory_limit=1 composer.phar install + - php -d memory_limit=-1 composer.phar install script: phpunit