Skip to content

Commit 9df2c19

Browse files
committed
Add cron to run tests workflow once per week on monday
1 parent 6f07289 commit 9df2c19

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
- trying
99
- staging
1010
- main
11+
schedule:
12+
- cron: '0 3 * * 1'
1113

1214
env:
1315
fail-fast: true

src/EventListener/DoctrineEventSubscriber.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,16 @@ public function __construct(SearchService $searchService)
1818

1919
public function postUpdate(LifecycleEventArgs $args): void
2020
{
21-
if (!$this->searchService->isSearchable($args->getObject())) {
22-
return;
23-
}
2421
$this->searchService->index($args->getObjectManager(), $args->getObject());
2522
}
2623

2724
public function postPersist(LifecycleEventArgs $args): void
2825
{
29-
if (!$this->searchService->isSearchable($args->getObject())) {
30-
return;
31-
}
3226
$this->searchService->index($args->getObjectManager(), $args->getObject());
3327
}
3428

3529
public function preRemove(LifecycleEventArgs $args): void
3630
{
37-
if (!$this->searchService->isSearchable($args->getObject())) {
38-
return;
39-
}
4031
$this->searchService->remove($args->getObjectManager(), $args->getObject());
4132
}
4233
}

src/Services/MeilisearchService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,8 @@ private static function resolveClass(object $object): string
376376

377377
$resolver ??= (function () {
378378
// Native lazy objects compatibility
379-
if (class_exists(LegacyReflectionFields::class)) {
380-
return fn ($object) => $object::class;
379+
if (PHP_VERSION_ID >= 80400 && class_exists(LegacyReflectionFields::class)) {
380+
return fn ($object) => get_class($object);
381381
}
382382

383383
// Doctrine ORM v3+ compatibility

0 commit comments

Comments
 (0)