Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By pasan.gamage on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.4.x
Introduced in version:
8.4.0
Issue links:
Description:
The typehint for the request parameter of CurrentPathStack::getPath()
and CurrentPathStack::setPath()
is changed to Symfony\Component\HttpFoundation\Request
.
CurrentPath already relied on having a Request object and using a different parameter type could previously have led to fatal errors, so this change simply makes the requirement explicit. Most modules successfully using this API should not be impacted by this change.
Before
public function getPath($request = NULL) {
public function setPath($path, $request = NULL) {
After
public function getPath(Request $request = NULL) {
public function setPath($path, Request $request = NULL) {
Impacts:
Module developers