* Fix the batch connect logic for hooks
Closes#2729 by fixing the logic for hook connections and added a solution to remove anything that was registered when it wasn't really a hook
* Slight optimization. Also probably fixed the tests
* We can continue early here as a tiny optimization
* Update ServiceTest.php
* Update ServiceTest.php