From da2317730bdc1884769feba34577243b02e3b52e Mon Sep 17 00:00:00 2001 From: Piotr Szymaszek Date: Fri, 25 Nov 2016 16:27:25 +0100 Subject: [PATCH 1/3] Fixed wrong template option being returned in list element context --- Doctrine/Admin/Context/ListElementContext.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Doctrine/Admin/Context/ListElementContext.php b/Doctrine/Admin/Context/ListElementContext.php index b8f1210..15e4e6e 100644 --- a/Doctrine/Admin/Context/ListElementContext.php +++ b/Doctrine/Admin/Context/ListElementContext.php @@ -24,13 +24,13 @@ class ListElementContext extends BaseListElementContext /** * @var string */ - private $formTemplate; + private $listTemplate; - public function __construct($requestHandlers, LocaleManager $localeManager, $formTemplate) + public function __construct($requestHandlers, LocaleManager $localeManager, $listTemplate) { parent::__construct($requestHandlers); $this->localeManager = $localeManager; - $this->formTemplate = $formTemplate; + $this->listTemplate = $listTemplate; } /** @@ -57,8 +57,8 @@ public function hasTemplateName() */ public function getTemplateName() { - return $this->element->hasOption('template_form') ? - $this->element->getOption('template_form') : $this->formTemplate; + return $this->element->hasOption('template_list') ? + $this->element->getOption('template_list') : $this->listTemplate; } /** From 798094fabf48912c803bbce8ab924afed2b61f31 Mon Sep 17 00:00:00 2001 From: Piotr Szymaszek Date: Wed, 30 Nov 2016 11:04:33 +0100 Subject: [PATCH 2/3] Remove duplicated resource repository service definition --- FSiAdminTranslatableBundle.php | 1 - Resources/config/context/resource.xml | 1 + Resources/config/services.xml | 8 -------- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/FSiAdminTranslatableBundle.php b/FSiAdminTranslatableBundle.php index 7581ec1..210fbf6 100644 --- a/FSiAdminTranslatableBundle.php +++ b/FSiAdminTranslatableBundle.php @@ -12,7 +12,6 @@ use FSi\Bundle\AdminTranslatableBundle\DependencyInjection\Compiler\MapBuilderPass; use FSi\Bundle\AdminTranslatableBundle\DependencyInjection\Compiler\ResourceRepositoryPass; use FSi\Bundle\AdminTranslatableBundle\DependencyInjection\Compiler\TranslatableWorkerPass; -use FSi\Bundle\AdminTranslatableBundle\DependencyInjection\Compiler\TwigGlobals; use FSi\Bundle\AdminTranslatableBundle\DependencyInjection\FSIAdminTranslatableExtension; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\Bundle\Bundle; diff --git a/Resources/config/context/resource.xml b/Resources/config/context/resource.xml index 8b2283e..b7eddaf 100644 --- a/Resources/config/context/resource.xml +++ b/Resources/config/context/resource.xml @@ -6,6 +6,7 @@ FSi\Bundle\AdminTranslatableBundle\Doctrine\Admin\Context\ResourceRepositoryContext + FSi\Bundle\AdminTranslatableBundle\Repository\TranslatableMapBuilder diff --git a/Resources/config/services.xml b/Resources/config/services.xml index 1a79fa4..5f66741 100644 --- a/Resources/config/services.xml +++ b/Resources/config/services.xml @@ -5,20 +5,12 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> - FSi\Bundle\AdminTranslatableBundle\Repository\TranslatableMapBuilder FSi\Bundle\AdminTranslatableBundle\Controller\LocaleController FSi\Bundle\AdminTranslatableBundle\Manager\LocaleManager FSi\Bundle\AdminTranslatableBundle\Factory\Worker\TranslatableWorker - - - %fsi_resource_repository.resource.map_path% - %fsi_resource_repository.resource.types% - - - From 7b0dd26cac8b98a1acbe34696059eb081cb04587 Mon Sep 17 00:00:00 2001 From: Piotr Szymaszek Date: Wed, 30 Nov 2016 11:36:10 +0100 Subject: [PATCH 3/3] Prevent Travis running out of memory during composer install --- .travis.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4dcbcb3..e3470ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,12 +5,13 @@ sudo: false cache: directories: - $HOME/.composer/cache + - vendor matrix: include: - php: 5.4 env: - - DEPENDENCIES='low' + - COMPOSER_FLAGS='--prefer-lowest' - php: 5.5 - php: 5.6 env: @@ -26,9 +27,10 @@ matrix: before_install: - phpenv config-rm xdebug.ini - composer self-update - - if [[ "$DEPENDENCIES" != "low" && ! $SYMFONY_VERSION ]]; then composer update -n --prefer-source; fi; - - if [[ "$DEPENDENCIES" != "low" && $SYMFONY_VERSION ]]; then composer require symfony/symfony:${SYMFONY_VERSION} -n --prefer-source; fi; - - if [[ "$DEPENDENCIES" == "low" ]]; then composer update --prefer-lowest -n --prefer-source; fi; + - if [[ $SYMFONY_VERSION ]]; then composer require symfony/symfony:${SYMFONY_VERSION} -n --no-update; fi; + # Avoid issues on composer update + - echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini + - composer update $COMPOSER_FLAGS install: - wget http://selenium-release.storage.googleapis.com/2.46/selenium-server-standalone-2.46.0.jar