1 | <?php |
||
24 | class CacheManager extends CacheInvalidator |
||
25 | { |
||
26 | /** |
||
27 | * @var UrlGeneratorInterface |
||
28 | */ |
||
29 | private $urlGenerator; |
||
30 | |||
31 | /** |
||
32 | * What type of urls to generate. |
||
33 | * |
||
34 | * @var bool|string |
||
35 | */ |
||
36 | private $generateUrlType = UrlGeneratorInterface::ABSOLUTE_PATH; |
||
37 | |||
38 | /** |
||
39 | * Constructor. |
||
40 | * |
||
41 | * @param ProxyClient $cache HTTP cache proxy client |
||
42 | * @param UrlGeneratorInterface $urlGenerator Symfony route generator |
||
43 | */ |
||
44 | 13 | public function __construct(ProxyClient $cache, UrlGeneratorInterface $urlGenerator) |
|
49 | |||
50 | /** |
||
51 | * Set what type of URLs to generate. |
||
52 | * |
||
53 | * @param bool|string $generateUrlType One of the constants in UrlGeneratorInterface |
||
54 | */ |
||
55 | 11 | public function setGenerateUrlType($generateUrlType) |
|
59 | |||
60 | /** |
||
61 | * Invalidate a route. |
||
62 | * |
||
63 | * @param string $name Route name |
||
64 | * @param array $parameters Route parameters (optional) |
||
65 | * @param array $headers Extra HTTP headers to send to the caching proxy (optional) |
||
66 | * |
||
67 | * @return $this |
||
68 | */ |
||
69 | 1 | public function invalidateRoute($name, array $parameters = [], array $headers = []) |
|
75 | |||
76 | /** |
||
77 | * Refresh a route. |
||
78 | * |
||
79 | * @param string $route Route name |
||
80 | * @param array $parameters Route parameters (optional) |
||
81 | * @param array $headers Extra HTTP headers to send to the caching proxy (optional) |
||
82 | * |
||
83 | * @return $this |
||
84 | */ |
||
85 | 1 | public function refreshRoute($route, array $parameters = [], array $headers = []) |
|
91 | } |
||
92 |
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: