Skip to content
Merged
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
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"php": ">= 8.4",
"21torr/bundle-helpers": "^2.3",
"21torr/cli": "^1.2.3",
"21torr/snail": "^1.0.0",
"doctrine/doctrine-bundle": "^2.14",
"doctrine/orm": "^3.3",
"dragonmantank/cron-expression": "^3.4",
Expand Down
3 changes: 2 additions & 1 deletion src/Task/TaskMetaData.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Torr\TaskManager\Task;

use Symfony\Component\String\Slugger\AsciiSlugger;
use Torr\Snail\Snail\Snailer;
use Torr\TaskManager\Exception\Task\InvalidTaskDefinitionException;

use function Symfony\Component\String\u;
Expand All @@ -20,7 +21,7 @@ public function __construct (
public ?string $uniqueTaskId = null,
)
{
if (null !== $this->uniqueTaskId && !preg_match('~^[a-z0-9]+([.\\-_][a-z0-9]+)*$~', $this->uniqueTaskId))
if (null !== $this->uniqueTaskId && !Snailer::isValidSnail($this->uniqueTaskId))
{
throw new InvalidTaskDefinitionException(\sprintf(
"Invalid unique task id: '%s'",
Expand Down