File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 5
5
/var /
6
6
.php-cs-fixer.cache
7
7
/tests /cache /blog.sqlite
8
+ /tests /coverage
Original file line number Diff line number Diff line change 30
30
"doctrine/orm" : " ^2.9" ,
31
31
"friendsofphp/php-cs-fixer" : " ^3.0" ,
32
32
"nyholm/psr7" : " ^1.3" ,
33
+ "phpunit/php-code-coverage" : " ^9.2" ,
33
34
"phpunit/phpunit" : " ^9.5" ,
34
35
"symfony/doctrine-bridge" : " ^4.0 || ^5.0" ,
35
36
"symfony/http-client" : " ^4.0 || ^5.0" ,
51
52
},
52
53
"scripts" : {
53
54
"test:unit" : " phpunit --colors=always --verbose" ,
55
+ "test:unit:coverage" : " XDEBUG_MODE=coverage phpunit --colors=always --coverage-html=tests/coverage" ,
54
56
"lint:check" : " php-cs-fixer fix -v --using-cache=no --dry-run" ,
55
57
"lint:fix" : " php-cs-fixer fix -v --using-cache=no"
56
58
}
Original file line number Diff line number Diff line change 8
8
use Doctrine \Persistence \Event \LifecycleEventArgs ;
9
9
use MeiliSearch \Bundle \SearchService ;
10
10
11
- /**
12
- * Class MeiliSearchIndexerSubscriber.
13
- */
14
11
final class MeiliSearchIndexerSubscriber implements EventSubscriber
15
12
{
16
13
private SearchService $ searchService ;
@@ -41,4 +38,9 @@ public function preRemove(LifecycleEventArgs $args): void
41
38
{
42
39
$ this ->searchService ->remove ($ args ->getObjectManager (), $ args ->getObject ());
43
40
}
41
+
42
+ public function postRemove (LifecycleEventArgs $ args ): void
43
+ {
44
+ $ this ->searchService ->remove ($ args ->getObjectManager (), $ args ->getObject ());
45
+ }
44
46
}
You can’t perform that action at this time.
0 commit comments