Skip to content

Commit

Permalink
Add deprecation if serializer still defined
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Jun 7, 2024
1 parent cf03833 commit dab3a10
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Controller/TaskController.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ public function __construct(
$this->taskManager = $taskManager;
$this->entityManager = $entityManager;
$this->serializer = $serializer;

if (null !== $serializer) {
@trigger_deprecation('sulu/automation-bundle', '2.1.2', 'The "%s" class not longer should be constructed with a serializer.', self::class);
}

$this->fieldDescriptorFactory = $fieldDescriptorFactory;
$this->automationTaskRepository = $automationTaskRepository;
}
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"sulu/sulu": "^2.2.0 || ^2.5.0@dev",
"symfony/config": "^4.3 || ^5.4 || ^6.3",
"symfony/dependency-injection": "^4.3 || ^5.4 || ^6.3",
"symfony/deprecation-contracts": "^1.0 || ^2.0 || ^3.0",
"symfony/http-foundation": "^4.3 || ^5.4 || ^6.3",
"symfony/http-kernel": "^4.3 || ^5.4 || ^6.3"
},
Expand Down

0 comments on commit dab3a10

Please sign in to comment.