From 039a5726712234dd607be785b9a9fcc1e618a0aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Pimpa=CC=83o?= Date: Tue, 17 Feb 2026 10:05:56 +0000 Subject: [PATCH 1/3] chore: update ddev config --- .ddev/config.yaml | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/.ddev/config.yaml b/.ddev/config.yaml index 4d8e072..b56ae5c 100644 --- a/.ddev/config.yaml +++ b/.ddev/config.yaml @@ -23,13 +23,13 @@ disable_upload_dirs_warning: true # If the name is omitted, the project will take the name of the enclosing directory, # which is useful if you want to have a copy of the project side by side with this one. -# type: # backdrop, cakephp, craftcms, drupal, drupal6, drupal7, drupal8, drupal9, drupal10, drupal11, generic, laravel, magento, magento2, php, shopware6, silverstripe, symfony, typo3, wordpress +# type: # backdrop, cakephp, codeigniter, craftcms, drupal, drupal6, drupal7, drupal8, drupal9, drupal10, drupal11, drupal12, generic, laravel, magento, magento2, php, shopware6, silverstripe, symfony, typo3, wordpress # See https://docs.ddev.com/en/stable/users/quickstart/ for more # information on the different project types # docroot: # Relative path to the directory containing index.php. -# php_version: "8.3" # PHP version to use, "5.6" through "8.5" +# php_version: "8.4" # PHP version to use, "5.6" through "8.5" # You can explicitly specify the webimage but this # is not recommended, as the images are often closely tied to DDEV's' behavior, @@ -65,8 +65,7 @@ disable_upload_dirs_warning: true # bind_all_ports is used (normally with router disabled) # xhprof_mode: [prepend|xhgui|global] -# Set to "xhgui" to enable XHGui features -# "xhgui" will become default in a future major release +# Default is "xhgui" # webserver_type: nginx-fpm, apache-fpm, generic @@ -92,14 +91,12 @@ disable_upload_dirs_warning: true # - preview # - snapshot # Alternatively, an explicit Composer version may be specified, for example "2.2.18". -# To reinstall Composer after the image was built, run "ddev debug rebuild". +# To reinstall Composer after the image was built, run "ddev utility rebuild". -# nodejs_version: "22" +# nodejs_version: "24" # change from the default system Node.js version to any other version. # See https://docs.ddev.com/en/stable/users/configuration/config/#nodejs_version for more information -# and https://www.npmjs.com/package/n#specifying-nodejs-versions for the full documentation, -# Note that using of 'ddev nvm' is discouraged because "nodejs_version" is much easier to use, -# can specify any version, and is more robust than using 'nvm'. +# and https://www.npmjs.com/package/n#specifying-nodejs-versions for the full documentation. # corepack_enable: false # Change to 'true' to 'corepack enable' and gain access to latest versions of yarn/pnpm @@ -159,9 +156,7 @@ disable_upload_dirs_warning: true # - "global": uses the value from the global config. # - "none": disables performance optimization for this project. # - "mutagen": enables Mutagen for this project. -# - "nfs": enables NFS for this project. # -# See https://docs.ddev.com/en/stable/users/install/performance/#nfs # See https://docs.ddev.com/en/stable/users/install/performance/#mutagen # fail_on_hook_fail: False @@ -206,12 +201,15 @@ disable_upload_dirs_warning: true # project_tld: ddev.site # The top-level domain used for project URLs # The default "ddev.site" allows DNS lookup via a wildcard -# If you prefer you can change this to "ddev.local" to preserve -# pre-v1.9 behavior. -# ngrok_args: --basic-auth username:pass1234 -# Provide extra flags to the "ngrok http" command, see -# https://ngrok.com/docs/agent/config/v3/#agent-configuration or run "ngrok http -h" +# share_default_provider: ngrok +# The default share provider to use for "ddev share" +# Defaults to global configuration, usually "ngrok" +# Can be "ngrok" or "cloudflared" or the name of a custom provider from .ddev/share-providers/ + +# share_provider_args: --basic-auth username:pass1234 +# Provide extra flags to the share provider script +# See https://docs.ddev.com/en/stable/users/configuration/config/#share_provider_args # disable_settings_management: false # If true, DDEV will not create CMS-specific settings files like From d88332eab5170dd0b4a0de61cc6ba506135ae582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Pimpa=CC=83o?= Date: Tue, 17 Feb 2026 10:07:24 +0000 Subject: [PATCH 2/3] chore: bump lib versions --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 58ddd34..1a8fe88 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "symfony/options-resolver": "^6.4|^7.4|^8.0" }, "require-dev": { - "monolog/monolog": "^3.9", + "monolog/monolog": "^3.10", "nyholm/psr7": "^1.8", "php-http/mock-client": "^1.6", "phpunit/phpunit": "^10.5", From 61b35755899e03bc90899f8bb835339c4618c392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Pimpa=CC=83o?= Date: Tue, 17 Feb 2026 10:10:37 +0000 Subject: [PATCH 3/3] fix: visibility null --- docs/05-entities.md | 6 +++--- src/Entity/Assistant/WeatherData.php | 6 +++--- src/Entity/OneCall/HourData.php | 6 +++--- src/Entity/Weather/WeatherData.php | 12 ++++-------- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/docs/05-entities.md b/docs/05-entities.md index 20267d4..e8a691f 100644 --- a/docs/05-entities.md +++ b/docs/05-entities.md @@ -117,7 +117,7 @@ - `getDateTime()`: `\DateTimeImmutable` - `getTemperature()`: `float` - `getTemperatureFeelsLike()`: `float` -- `getVisibility()`: `int` +- `getVisibility()`: `?int` - `getPrecipitationProbability()`: `int` - `getAtmosphericPressure()`: `int` - `getHumidity()`: `int` @@ -214,7 +214,7 @@ - `getMaxTemperature()`: `float` - `getHumidity()`: `int` - `getCloudiness()`: `int` -- `getVisibility()`: `int` +- `getVisibility()`: `?int` - `getAtmosphericPressure()`: `int` - `getConditions()`: [`Condition[]`](#condition) - `getWind()`: [`Wind`](#wind) @@ -237,7 +237,7 @@ - `getMaxTemperature()`: `float` - `getHumidity()`: `int` - `getCloudiness()`: `int` -- `getVisibility()`: `int` +- `getVisibility()`: `?int` - `getAtmosphericPressure()`: `int` - `getConditions()`: [`Condition[]`](#condition) - `getWind()`: [`Wind`](#wind) diff --git a/src/Entity/Assistant/WeatherData.php b/src/Entity/Assistant/WeatherData.php index cd07e37..97020ea 100644 --- a/src/Entity/Assistant/WeatherData.php +++ b/src/Entity/Assistant/WeatherData.php @@ -12,7 +12,7 @@ class WeatherData extends BaseWeather private float $temperatureFeelsLike; - private int $visibility; + private ?int $visibility; private \DateTimeImmutable $sunriseAt; @@ -25,7 +25,7 @@ public function __construct(string $locationName, array $data) $this->locationName = $locationName; $this->temperature = $data['temp']; $this->temperatureFeelsLike = $data['feels_like']; - $this->visibility = $data['visibility']; + $this->visibility = $data['visibility'] ?? null; $this->sunriseAt = \DateTimeImmutable::createFromFormat('U', $data['sunrise']); $this->sunsetAt = \DateTimeImmutable::createFromFormat('U', $data['sunset']); } @@ -45,7 +45,7 @@ public function getTemperatureFeelsLike(): float return $this->temperatureFeelsLike; } - public function getVisibility(): int + public function getVisibility(): ?int { return $this->visibility; } diff --git a/src/Entity/OneCall/HourData.php b/src/Entity/OneCall/HourData.php index 5eaf765..03b21ec 100644 --- a/src/Entity/OneCall/HourData.php +++ b/src/Entity/OneCall/HourData.php @@ -10,7 +10,7 @@ class HourData extends BaseWeather private float $temperatureFeelsLike; - private int $visibility; + private ?int $visibility; private int $precipitationProbability; @@ -20,7 +20,7 @@ public function __construct(array $data) $this->temperature = $data['temp']; $this->temperatureFeelsLike = $data['feels_like']; - $this->visibility = $data['visibility']; + $this->visibility = $data['visibility'] ?? null; $this->precipitationProbability = round($data['pop'] * 100); } @@ -34,7 +34,7 @@ public function getTemperatureFeelsLike(): float return $this->temperatureFeelsLike; } - public function getVisibility(): int + public function getVisibility(): ?int { return $this->visibility; } diff --git a/src/Entity/Weather/WeatherData.php b/src/Entity/Weather/WeatherData.php index b44f7ed..4b61522 100644 --- a/src/Entity/Weather/WeatherData.php +++ b/src/Entity/Weather/WeatherData.php @@ -22,7 +22,7 @@ class WeatherData private int $cloudiness; - private int $visibility; + private ?int $visibility; private int $atmosphericPressure; @@ -46,15 +46,11 @@ public function __construct(array $data) $this->maxTemperature = $data['main']['temp_max']; $this->humidity = $data['main']['humidity']; $this->cloudiness = $data['clouds']['all']; - $this->visibility = $data['visibility']; + $this->visibility = $data['visibility'] ?? null; $this->atmosphericPressure = $data['main']['pressure']; $this->conditions = EntityHelper::createEntityList(Condition::class, $data['weather']); $this->wind = new Wind($data['wind']); - - $this->precipitationProbability = isset($data['pop']) - ? round($data['pop'] * 100) - : null; - + $this->precipitationProbability = isset($data['pop']) ? round($data['pop'] * 100) : null; $this->rainVolume = $data['rain']['1h'] ?? $data['rain']['3h'] ?? null; $this->snowVolume = $data['snow']['1h'] ?? $data['snow']['3h'] ?? null; } @@ -101,7 +97,7 @@ public function getCloudiness(): int * Visibility, meters * Maximum value is 10000 */ - public function getVisibility(): int + public function getVisibility(): ?int { return $this->visibility; }