"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Symfony/Component/Routing/Route.php" between
symfony-4.4.14.tar.gz and symfony-4.4.15.tar.gz

About: Symfony is a web application framework for PHP projects. Source code (4.4 series).

Route.php  (symfony-4.4.14):Route.php  (symfony-4.4.15)
skipping to change at line 140 skipping to change at line 140
* *
* This method implements a fluent interface. * This method implements a fluent interface.
* *
* @param string $pattern The path pattern * @param string $pattern The path pattern
* *
* @return $this * @return $this
*/ */
public function setPath($pattern) public function setPath($pattern)
{ {
if (false !== strpbrk($pattern, '?<')) { if (false !== strpbrk($pattern, '?<')) {
$pattern = preg_replace_callback('#\{(\w++)(<.*?>)?(\?[^\}]*+)?\}#', function ($m) { $pattern = preg_replace_callback('#\{(!?\w++)(<.*?>)?(\?[^\}]*+)?\}# ', function ($m) {
if (isset($m[3][0])) { if (isset($m[3][0])) {
$this->setDefault($m[1], '?' !== $m[3] ? substr($m[3], 1) : null); $this->setDefault($m[1], '?' !== $m[3] ? substr($m[3], 1) : null);
} }
if (isset($m[2][0])) { if (isset($m[2][0])) {
$this->setRequirement($m[1], substr($m[2], 1, -1)); $this->setRequirement($m[1], substr($m[2], 1, -1));
} }
return '{'.$m[1].'}'; return '{'.$m[1].'}';
}, $pattern); }, $pattern);
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)