Add recursion check to createService()
authorAryeh Gregor <ayg@aryeh.name>
Wed, 14 Aug 2019 11:46:47 +0000 (14:46 +0300)
committerAryeh Gregor <ayg@aryeh.name>
Sun, 18 Aug 2019 07:51:24 +0000 (10:51 +0300)
commita995d9be1dfc5741713ccb265b2178bc2a760386
treed618e12fcb1e17480e7f3ce812adbfec8d09edd0
parentdbdbeb7af2a7f0ee00bdc4dfc1297edf0405a8fd
Add recursion check to createService()

This will throw when trying to create a service while already in the
process of creating that same service, i.e., if there's a circular
service dependency. This would have saved me a whole bunch of debugging
time. :)

Change-Id: Id148d4f221f35f4069f3e0ab0069d13ca271df3d
includes/libs/services/ServiceContainer.php
tests/phpunit/includes/libs/services/ServiceContainerTest.php [deleted file]
tests/phpunit/includes/libs/services/TestWiring1.php [deleted file]
tests/phpunit/includes/libs/services/TestWiring2.php [deleted file]
tests/phpunit/unit/includes/libs/services/ServiceContainerTest.php [new file with mode: 0644]
tests/phpunit/unit/includes/libs/services/TestWiring1.php [new file with mode: 0644]
tests/phpunit/unit/includes/libs/services/TestWiring2.php [new file with mode: 0644]