@@ -101,17 +101,19 @@ public function get($name, $strict = null)
101101 /** @var ParamInterface $param */
102102 $ param = $ params [$ name ];
103103 $ default = $ param ->getDefault ();
104+ $ default = $ this ->resolveValue ($ this ->container , $ default );
104105 $ strict = (null !== $ strict ? $ strict : $ param ->isStrict ());
105106
106107 $ paramValue = $ param ->getValue ($ this ->getRequest (), $ default );
107108
108- return $ this ->cleanParamWithRequirements ($ param , $ paramValue , $ strict );
109+ return $ this ->cleanParamWithRequirements ($ param , $ paramValue , $ strict, $ default );
109110 }
110111
111112 /**
112113 * @param ParamInterface $param
113114 * @param mixed $paramValue
114115 * @param bool $strict
116+ * @param mixed $default
115117 *
116118 * @throws BadRequestHttpException
117119 * @throws \RuntimeException
@@ -120,11 +122,8 @@ public function get($name, $strict = null)
120122 *
121123 * @internal
122124 */
123- protected function cleanParamWithRequirements (ParamInterface $ param , $ paramValue , $ strict )
125+ protected function cleanParamWithRequirements (ParamInterface $ param , $ paramValue , $ strict, $ default )
124126 {
125- $ default = $ param ->getDefault ();
126- $ default = $ this ->resolveValue ($ this ->container , $ default );
127-
128127 $ this ->checkNotIncompatibleParams ($ param );
129128 if ($ default !== null && $ default === $ paramValue ) {
130129 return $ paramValue ;
0 commit comments