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 6
6
7
7
- Support discovering PSR-17 factories of ` guzzlehttp/psr7 ` package
8
8
- Support discovering PSR-17 factories of ` laminas/laminas-diactoros ` pakcage
9
+ - ` ClassDiscovery::getStrategies() ` to retrieve the list of current strategies.
9
10
10
11
## 1.7.4 - 2020-01-03
11
12
Original file line number Diff line number Diff line change @@ -68,6 +68,11 @@ function it_prepends_strategies() {
68
68
$ this ->find ('Foobar ' )->shouldReturn ('Added ' );
69
69
}
70
70
71
+ function it_retrieves_configured_strategies () {
72
+ $ expect = [DiscoveryHelper::class];
73
+ $ this ->getStrategies ()->shouldReturn ($ expect );
74
+ }
75
+
71
76
function it_appends_strategies () {
72
77
$ candidate = ['class ' => 'Added ' ];
73
78
DiscoveryHelper::setClasses ('Foobar ' , [$ candidate ]);
Original file line number Diff line number Diff line change @@ -124,6 +124,16 @@ public static function setStrategies(array $strategies)
124
124
self ::clearCache ();
125
125
}
126
126
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
+
127
137
/**
128
138
* Append a strategy at the end of the strategy queue.
129
139
*
You can’t perform that action at this time.
0 commit comments