Skip to content

Commit

Permalink
Fix deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
jordisala1991 committed Jul 20, 2021
1 parent 609f00e commit 2d844fa
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/basic-page-bundle/src/Twig/BasicPageRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ public function getBasicPages(?string $location = null): array
$criteria['location'] = $location;
}

return $this->repository->findBy($criteria) ?? [];
return $this->repository->findBy($criteria);
}
}
9 changes: 9 additions & 0 deletions packages/basic-page-bundle/tests/App/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
use Runroom\BasicPageBundle\Tests\App\Entity\Media;
use Runroom\SeoBundle\RunroomSeoBundle;
use Sonata\AdminBundle\SonataAdminBundle;
use Sonata\AdminBundle\Twig\Extension\DeprecatedTextExtension;
use Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
Expand Down Expand Up @@ -117,6 +118,14 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa
'locales' => ['es', 'en', 'ca'],
]);

if (class_exists(DeprecatedTextExtension::class)) {
$container->loadFromExtension('sonata_admin', [
'options' => [
'legacy_twig_text_extension' => false,
],
]);
}

$container->loadFromExtension('runroom_seo', [
'locales' => ['es', 'en', 'ca'],
'xdefault_locale' => 'es',
Expand Down
9 changes: 9 additions & 0 deletions packages/ckeditor-sonata-media-bundle/tests/App/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use Runroom\CkeditorSonataMediaBundle\Tests\App\Entity\GalleryItem;
use Runroom\CkeditorSonataMediaBundle\Tests\App\Entity\Media;
use Sonata\AdminBundle\SonataAdminBundle;
use Sonata\AdminBundle\Twig\Extension\DeprecatedTextExtension;
use Sonata\Doctrine\Bridge\Symfony\SonataDoctrineBundle;
use Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle;
use Sonata\MediaBundle\Model\GalleryItemInterface;
Expand Down Expand Up @@ -105,6 +106,14 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa
'strict_variables' => '%kernel.debug%',
]);

if (class_exists(DeprecatedTextExtension::class)) {
$container->loadFromExtension('sonata_admin', [
'options' => [
'legacy_twig_text_extension' => false,
],
]);
}

$galleryItemKey = interface_exists(GalleryItemInterface::class) ? 'gallery_item' : 'gallery_has_media';

$container->loadFromExtension('sonata_media', [
Expand Down
9 changes: 9 additions & 0 deletions packages/cookies-bundle/tests/App/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use Runroom\CookiesBundle\RunroomCookiesBundle;
use Runroom\FormHandlerBundle\RunroomFormHandlerBundle;
use Sonata\AdminBundle\SonataAdminBundle;
use Sonata\AdminBundle\Twig\Extension\DeprecatedTextExtension;
use Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
Expand Down Expand Up @@ -125,6 +126,14 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa
'locales' => ['es', 'en', 'ca'],
]);

if (class_exists(DeprecatedTextExtension::class)) {
$container->loadFromExtension('sonata_admin', [
'options' => [
'legacy_twig_text_extension' => false,
],
]);
}

$container->loadFromExtension('runroom_cookies', [
'cookies' => [
'mandatory_cookies' => [[
Expand Down
9 changes: 9 additions & 0 deletions packages/redirection-bundle/tests/App/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Knp\Bundle\MenuBundle\KnpMenuBundle;
use Runroom\RedirectionBundle\RunroomRedirectionBundle;
use Sonata\AdminBundle\SonataAdminBundle;
use Sonata\AdminBundle\Twig\Extension\DeprecatedTextExtension;
use Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
Expand Down Expand Up @@ -106,6 +107,14 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa
'strict_variables' => '%kernel.debug%',
]);

if (class_exists(DeprecatedTextExtension::class)) {
$container->loadFromExtension('sonata_admin', [
'options' => [
'legacy_twig_text_extension' => false,
],
]);
}

$container->loadFromExtension('runroom_redirection', [
'enable_automatic_redirections' => true,
'automatic_redirections' => [
Expand Down
9 changes: 9 additions & 0 deletions packages/seo-bundle/tests/App/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
use Runroom\SeoBundle\Tests\App\Entity\GalleryItem;
use Runroom\SeoBundle\Tests\App\Entity\Media;
use Sonata\AdminBundle\SonataAdminBundle;
use Sonata\AdminBundle\Twig\Extension\DeprecatedTextExtension;
use Sonata\Doctrine\Bridge\Symfony\SonataDoctrineBundle;
use Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle;
use Sonata\MediaBundle\Model\GalleryItemInterface;
Expand Down Expand Up @@ -138,6 +139,14 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa
'locales' => ['es', 'en', 'ca'],
]);

if (class_exists(DeprecatedTextExtension::class)) {
$container->loadFromExtension('sonata_admin', [
'options' => [
'legacy_twig_text_extension' => false,
],
]);
}

$galleryItemKey = interface_exists(GalleryItemInterface::class) ? 'gallery_item' : 'gallery_has_media';

$container->loadFromExtension('sonata_media', [
Expand Down
9 changes: 9 additions & 0 deletions packages/sortable-behavior-bundle/tests/App/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Knp\Bundle\MenuBundle\KnpMenuBundle;
use Runroom\SortableBehaviorBundle\RunroomSortableBehaviorBundle;
use Sonata\AdminBundle\SonataAdminBundle;
use Sonata\AdminBundle\Twig\Extension\DeprecatedTextExtension;
use Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
Expand Down Expand Up @@ -107,6 +108,14 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa
'exception_controller' => null,
'strict_variables' => '%kernel.debug%',
]);

if (class_exists(DeprecatedTextExtension::class)) {
$container->loadFromExtension('sonata_admin', [
'options' => [
'legacy_twig_text_extension' => false,
],
]);
}
}

/**
Expand Down
9 changes: 9 additions & 0 deletions packages/translation-bundle/tests/App/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use Knp\DoctrineBehaviors\DoctrineBehaviorsBundle;
use Runroom\TranslationBundle\RunroomTranslationBundle;
use Sonata\AdminBundle\SonataAdminBundle;
use Sonata\AdminBundle\Twig\Extension\DeprecatedTextExtension;
use Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
Expand Down Expand Up @@ -118,6 +119,14 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa
$container->loadFromExtension('a2lix_translation_form', [
'locales' => ['es', 'en', 'ca'],
]);

if (class_exists(DeprecatedTextExtension::class)) {
$container->loadFromExtension('sonata_admin', [
'options' => [
'legacy_twig_text_extension' => false,
],
]);
}
}

/**
Expand Down
9 changes: 9 additions & 0 deletions tests/App/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
use Runroom\SortableBehaviorBundle\RunroomSortableBehaviorBundle;
use Runroom\TranslationBundle\RunroomTranslationBundle;
use Sonata\AdminBundle\SonataAdminBundle;
use Sonata\AdminBundle\Twig\Extension\DeprecatedTextExtension;
use Sonata\Doctrine\Bridge\Symfony\SonataDoctrineBundle;
use Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle;
use Sonata\MediaBundle\Model\GalleryItemInterface;
Expand Down Expand Up @@ -176,6 +177,14 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa
'locales' => ['es', 'en', 'ca'],
]);

if (class_exists(DeprecatedTextExtension::class)) {
$container->loadFromExtension('sonata_admin', [
'options' => [
'legacy_twig_text_extension' => false,
],
]);
}

$galleryItemKey = interface_exists(GalleryItemInterface::class) ? 'gallery_item' : 'gallery_has_media';

$container->loadFromExtension('sonata_media', [
Expand Down

0 comments on commit 2d844fa

Please sign in to comment.