File tree Expand file tree Collapse file tree
Apps/DefaultApp/translations Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ method. You can customize this display using either a 1) callback (for simple
6262text) or a 2) Twig template (for complex HTML).
6363
6464.. tip ::
65+
6566 If you customize the autocomplete for a given class (for example, ``User ``)
6667 in the same way across different CRUD controllers, you can
6768 :ref: `configure this globally <crud-autocomplete >` per CRUD and/or Dashboard.
Original file line number Diff line number Diff line change @@ -24,9 +24,9 @@ abstract class AbstractCrudTestCase extends WebTestCase
2424 use CrudTestIndexAsserts;
2525 use CrudTestUrlGeneration;
2626
27- protected KernelBrowser $ client ;
28- protected AdminUrlGeneratorInterface $ adminUrlGenerator ;
29- protected EntityManagerInterface $ entityManager ;
27+ protected ? KernelBrowser $ client = null ;
28+ protected ? AdminUrlGeneratorInterface $ adminUrlGenerator = null ;
29+ protected ? EntityManagerInterface $ entityManager = null ;
3030
3131 protected function setUp (): void
3232 {
@@ -44,12 +44,14 @@ protected function setUp(): void
4444
4545 protected function tearDown (): void
4646 {
47- if (isset ( $ this ->entityManager ) && $ this ->entityManager ->isOpen ()) {
47+ if (null !== $ this ->entityManager && $ this ->entityManager ->isOpen ()) {
4848 $ this ->entityManager ->clear ();
4949 $ this ->entityManager ->getConnection ()->close ();
5050 }
5151
52- unset($ this ->client , $ this ->entityManager , $ this ->adminUrlGenerator );
52+ $ this ->client = null ;
53+ $ this ->entityManager = null ;
54+ $ this ->adminUrlGenerator = null ;
5355
5456 parent ::tearDown ();
5557
Original file line number Diff line number Diff line change 22
33return [
44 'entities ' => [
5- \ EasyCorp \Bundle \EasyAdminBundle \Tests \Functional \Apps \DefaultApp \Entity \Category::class => [
5+ EasyCorp \Bundle \EasyAdminBundle \Tests \Functional \Apps \DefaultApp \Entity \Category::class => [
66 'singular ' => 'Category (singular from file) ' ,
77 'plural ' => 'Categories (plural from file) ' ,
88 'properties ' => [
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public function testTranslatedLabelsAppearedInTableHeaders(): void
5252 $ tableHeaders = $ crawler ->filter ('table.datagrid thead th ' );
5353
5454 $ headerTexts = [];
55- $ tableHeaders ->each (function ($ node ) use (&$ headerTexts ) {
55+ $ tableHeaders ->each (static function ($ node ) use (&$ headerTexts ) {
5656 $ headerTexts [] = trim ($ node ->text ());
5757 });
5858
@@ -70,7 +70,7 @@ public function testMenuItemUsesEntityPluralTranslation(): void
7070 // when menu item label is null, it should use the entity's plural translation
7171 $ menuItems = $ crawler ->filter ('.menu-item a ' );
7272 $ menuTexts = [];
73- $ menuItems ->each (function ($ node ) use (&$ menuTexts ) {
73+ $ menuItems ->each (static function ($ node ) use (&$ menuTexts ) {
7474 $ menuTexts [] = trim ($ node ->text ());
7575 });
7676
You can’t perform that action at this time.
0 commit comments