1 | <?php |
||
25 | class CacheManager extends CacheInvalidator |
||
26 | { |
||
27 | /** |
||
28 | * @var UrlGeneratorInterface |
||
29 | */ |
||
30 | private $urlGenerator; |
||
31 | |||
32 | /** |
||
33 | * What type of urls to generate. |
||
34 | * |
||
35 | * @var bool|string |
||
36 | */ |
||
37 | private $generateUrlType = UrlGeneratorInterface::ABSOLUTE_PATH; |
||
38 | |||
39 | /** |
||
40 | * Constructor. |
||
41 | * |
||
42 | * @param ProxyClient $cache HTTP cache proxy client |
||
43 | * @param UrlGeneratorInterface $urlGenerator Symfony route generator |
||
44 | */ |
||
45 | 7 | public function __construct(ProxyClient $cache, UrlGeneratorInterface $urlGenerator) |
|
50 | |||
51 | /** |
||
52 | * Set what type of URLs to generate. |
||
53 | * |
||
54 | * @param bool|string $generateUrlType One of the constants in UrlGeneratorInterface |
||
55 | */ |
||
56 | 7 | public function setGenerateUrlType($generateUrlType) |
|
60 | |||
61 | /** |
||
62 | * Invalidate a route. |
||
63 | * |
||
64 | * @param string $name Route name |
||
65 | * @param array $parameters Route parameters (optional) |
||
66 | * @param array $headers Extra HTTP headers to send to the caching proxy (optional) |
||
67 | * |
||
68 | * @return $this |
||
69 | */ |
||
70 | public function invalidateRoute($name, array $parameters = [], array $headers = []) |
||
76 | |||
77 | /** |
||
78 | * Refresh a route. |
||
79 | * |
||
80 | * @param string $route Route name |
||
81 | * @param array $parameters Route parameters (optional) |
||
82 | * @param array $headers Extra HTTP headers to send to the caching proxy (optional) |
||
83 | * |
||
84 | * @return $this |
||
85 | */ |
||
86 | public function refreshRoute($route, array $parameters = [], array $headers = []) |
||
92 | } |
||
93 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: