From 464c9e730e4991a52fb74d3f77ab457ed8b5a200 Mon Sep 17 00:00:00 2001 From: Maxime Steinhausser Date: Thu, 19 May 2022 10:49:01 +0200 Subject: [PATCH] [BC] Remove conflicting expression language custom functions with new 6.1 operators: https://symfony.com/blog/new-in-symfony-6-1-improved-expressionlanguage-syntax --- doc/loading-content.md | 3 --- src/ExpressionLanguage/ExpressionLanguageProvider.php | 3 --- tests/Integration/Command/DebugCommandTest.php | 9 +-------- tests/fixtures/app/content/authors/tom32i.md | 2 +- 4 files changed, 2 insertions(+), 15 deletions(-) diff --git a/doc/loading-content.md b/doc/loading-content.md index 58f2b40c..a616333e 100644 --- a/doc/loading-content.md +++ b/doc/loading-content.md @@ -231,9 +231,6 @@ Built-in functions are: - datetime - upper - lower -- contains -- starts_with -- ends_with - keys ## Debug diff --git a/src/ExpressionLanguage/ExpressionLanguageProvider.php b/src/ExpressionLanguage/ExpressionLanguageProvider.php index 690446f8..5e69746b 100644 --- a/src/ExpressionLanguage/ExpressionLanguageProvider.php +++ b/src/ExpressionLanguage/ExpressionLanguageProvider.php @@ -40,9 +40,6 @@ public function getFunctions(): iterable }), ExpressionFunction::fromPhp('strtoupper', 'upper'), ExpressionFunction::fromPhp('strtolower', 'lower'), - ExpressionFunction::fromPhp('str_contains', 'contains'), - ExpressionFunction::fromPhp('str_starts_with', 'starts_with'), - ExpressionFunction::fromPhp('str_ends_with', 'ends_with'), ExpressionFunction::fromPhp('array_keys', 'keys'), ]; diff --git a/tests/Integration/Command/DebugCommandTest.php b/tests/Integration/Command/DebugCommandTest.php index 85f5c56d..efd4193c 100644 --- a/tests/Integration/Command/DebugCommandTest.php +++ b/tests/Integration/Command/DebugCommandTest.php @@ -120,13 +120,6 @@ public function provide testList data(): iterable TXT , ['!_.core'], ]; - yield 'filter contains' => [Author::class, - << [Recipe::class, <<