Update WeatherPlacesAutocompleteController to use Symfony\Component\HttpFoundation\RequestStack

Created on 21 May 2025, 18 days ago

Problem/Motivation

Drupal has changed the library for the HttpFoundation RequestStack to use Symfony\Component\HttpFoundation\RequestStack.

As a result, the module will not autocomplete and find locations. The error is as follows:

TypeError: Drupal\weather\Controller\WeatherPlacesAutocompleteController::__construct(): Argument #1 ($request_stack) must be of type Drupal\Core\Http\RequestStack, Symfony\Component\HttpFoundation\RequestStack given, called in /web/modules/contrib/weather-weather/src/Controller/WeatherPlacesAutocompleteController.php on line 46 in Drupal\weather\Controller\WeatherPlacesAutocompleteController->__construct() (line 37 of /web/modules/contrib/weather-weather/src/Controller/WeatherPlacesAutocompleteController.php).

Steps to reproduce

Install fresh latest Drupal 10.
Install Weather.
Configure per Readme
Add Display and attempt to add a location.

Proposed resolution

Test/Apply attached patch.

Remaining tasks

Test patch

User interface changes

N/A

API changes

N/A

Data model changes

N/A

🐛 Bug report
Status

Needs review

Version

3.0

Component

Code

Created by

🇨🇦Canada awasson

Live updates comments and jobs are added and updated live.
  • API change

    Changes an existing API or subsystem. Not backportable to earlier major versions, unless absolutely required to fix a critical bug.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024