Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BC Break] Remove conflicting expression language custom functions #142

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions doc/loading-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,6 @@ Built-in functions are:
- datetime
- upper
- lower
- contains
- starts_with
- ends_with
- keys

## Debug
Expand Down
3 changes: 0 additions & 3 deletions src/ExpressionLanguage/ExpressionLanguageProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
];

Expand Down
9 changes: 1 addition & 8 deletions tests/Integration/Command/DebugCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,6 @@ public function provide testList data(): iterable
TXT
, ['!_.core'], ];

yield 'filter contains' => [Author::class,
<<<TXT
* ogi
* tom32i
TXT
, ['contains(_.slug, "i")'], ];

yield 'filter dates' => [Recipe::class,
<<<TXT
* ogito
Expand All @@ -145,7 +138,7 @@ public function provide testList data(): iterable
<<<TXT
* ogi
TXT
, ['_.core', 'contains(_.slug, "gi")'], ];
, ['_.core', '"cooking" in _.tags'], ];
}

public function testShow(): void
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/app/content/authors/tom32i.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ lastname: Jarrand
firstname: Thomas
nickname: tom32i
core: true
tags: ["symfony", "cooking"]
tags: ["symfony", "skateboarding"]
---

I'm coding on both ends of the HTTP request. ✨