File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed
Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 66
77- Support discovering PSR-17 factories of ` guzzlehttp/psr7 ` package
88- Support discovering PSR-17 factories of ` laminas/laminas-diactoros ` pakcage
9+ - ` ClassDiscovery::getStrategies() ` to retrieve the list of current strategies.
910
1011## 1.7.4 - 2020-01-03
1112
Original file line number Diff line number Diff line change @@ -68,6 +68,11 @@ function it_prepends_strategies() {
6868 $ this ->find ('Foobar ' )->shouldReturn ('Added ' );
6969 }
7070
71+ function it_retrieves_configured_strategies () {
72+ $ expect = [DiscoveryHelper::class];
73+ $ this ->getStrategies ()->shouldReturn ($ expect );
74+ }
75+
7176 function it_appends_strategies () {
7277 $ candidate = ['class ' => 'Added ' ];
7378 DiscoveryHelper::setClasses ('Foobar ' , [$ candidate ]);
Original file line number Diff line number Diff line change @@ -124,6 +124,16 @@ public static function setStrategies(array $strategies)
124124 self ::clearCache ();
125125 }
126126
127+ /**
128+ * Returns the currently configured discovery strategies as fully qualified class names.
129+ *
130+ * @return string[]
131+ */
132+ public static function getStrategies (): iterable
133+ {
134+ return self ::$ strategies ;
135+ }
136+
127137 /**
128138 * Append a strategy at the end of the strategy queue.
129139 *
You can’t perform that action at this time.
0 commit comments