Skip to content

Commit 5532c3b

Browse files
Fix second doctrine deprecatin
1 parent adc118d commit 5532c3b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Command/RegenerateSignatureWordsCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
3838

3939
$output->writeln('Clearing existing signature words...');
4040
$sql = "TRUNCATE men_post_signature_word;";
41-
$connection->prepare($sql)->execute();
41+
$connection->prepare($sql)->executeStatement();
4242

4343
$output->writeln('Getting posts...');
4444
$results = $this->managerRegistry->getRepository(Post::class)->createQueryBuilder('p')
@@ -68,13 +68,13 @@ protected function execute(InputInterface $input, OutputInterface $output): int
6868
}
6969

7070
$sql = "UPDATE men_post SET signature = '{$signature}' WHERE id = '{$postId}';";
71-
$connection->prepare($sql)->execute();
71+
$connection->prepare($sql)->executeStatement();
7272

7373
foreach ($post->getSignatureWords() as $word) {
7474
$id = Uuid::v7()->toRfc4122();
7575
$word = $word->getWord();
7676
$sql = "INSERT INTO men_post_signature_word (id, post_id, word) VALUES ('{$id}', '{$postId}', '{$word}')";
77-
$connection->prepare($sql)->execute();
77+
$connection->prepare($sql)->executeStatement();
7878
}
7979
}
8080

0 commit comments

Comments
 (0)