Skip to content

Commit b6ac5a6

Browse files
authored
Merge pull request #70 from programmatordev/3.x
v3.0.2
2 parents e73688e + f5da673 commit b6ac5a6

6 files changed

Lines changed: 28 additions & 34 deletions

File tree

.ddev/config.yaml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ disable_upload_dirs_warning: true
2323
# If the name is omitted, the project will take the name of the enclosing directory,
2424
# which is useful if you want to have a copy of the project side by side with this one.
2525

26-
# type: <projecttype> # backdrop, cakephp, craftcms, drupal, drupal6, drupal7, drupal8, drupal9, drupal10, drupal11, generic, laravel, magento, magento2, php, shopware6, silverstripe, symfony, typo3, wordpress
26+
# type: <projecttype> # backdrop, cakephp, codeigniter, craftcms, drupal, drupal6, drupal7, drupal8, drupal9, drupal10, drupal11, drupal12, generic, laravel, magento, magento2, php, shopware6, silverstripe, symfony, typo3, wordpress
2727
# See https://docs.ddev.com/en/stable/users/quickstart/ for more
2828
# information on the different project types
2929

3030
# docroot: <relative_path> # Relative path to the directory containing index.php.
3131

32-
# php_version: "8.3" # PHP version to use, "5.6" through "8.5"
32+
# php_version: "8.4" # PHP version to use, "5.6" through "8.5"
3333

3434
# You can explicitly specify the webimage but this
3535
# is not recommended, as the images are often closely tied to DDEV's' behavior,
@@ -65,8 +65,7 @@ disable_upload_dirs_warning: true
6565
# bind_all_ports is used (normally with router disabled)
6666

6767
# xhprof_mode: [prepend|xhgui|global]
68-
# Set to "xhgui" to enable XHGui features
69-
# "xhgui" will become default in a future major release
68+
# Default is "xhgui"
7069

7170
# webserver_type: nginx-fpm, apache-fpm, generic
7271

@@ -92,14 +91,12 @@ disable_upload_dirs_warning: true
9291
# - preview
9392
# - snapshot
9493
# Alternatively, an explicit Composer version may be specified, for example "2.2.18".
95-
# To reinstall Composer after the image was built, run "ddev debug rebuild".
94+
# To reinstall Composer after the image was built, run "ddev utility rebuild".
9695

97-
# nodejs_version: "22"
96+
# nodejs_version: "24"
9897
# change from the default system Node.js version to any other version.
9998
# See https://docs.ddev.com/en/stable/users/configuration/config/#nodejs_version for more information
100-
# and https://www.npmjs.com/package/n#specifying-nodejs-versions for the full documentation,
101-
# Note that using of 'ddev nvm' is discouraged because "nodejs_version" is much easier to use,
102-
# can specify any version, and is more robust than using 'nvm'.
99+
# and https://www.npmjs.com/package/n#specifying-nodejs-versions for the full documentation.
103100

104101
# corepack_enable: false
105102
# Change to 'true' to 'corepack enable' and gain access to latest versions of yarn/pnpm
@@ -159,9 +156,7 @@ disable_upload_dirs_warning: true
159156
# - "global": uses the value from the global config.
160157
# - "none": disables performance optimization for this project.
161158
# - "mutagen": enables Mutagen for this project.
162-
# - "nfs": enables NFS for this project.
163159
#
164-
# See https://docs.ddev.com/en/stable/users/install/performance/#nfs
165160
# See https://docs.ddev.com/en/stable/users/install/performance/#mutagen
166161

167162
# fail_on_hook_fail: False
@@ -206,12 +201,15 @@ disable_upload_dirs_warning: true
206201
# project_tld: ddev.site
207202
# The top-level domain used for project URLs
208203
# The default "ddev.site" allows DNS lookup via a wildcard
209-
# If you prefer you can change this to "ddev.local" to preserve
210-
# pre-v1.9 behavior.
211204

212-
# ngrok_args: --basic-auth username:pass1234
213-
# Provide extra flags to the "ngrok http" command, see
214-
# https://ngrok.com/docs/agent/config/v3/#agent-configuration or run "ngrok http -h"
205+
# share_default_provider: ngrok
206+
# The default share provider to use for "ddev share"
207+
# Defaults to global configuration, usually "ngrok"
208+
# Can be "ngrok" or "cloudflared" or the name of a custom provider from .ddev/share-providers/
209+
210+
# share_provider_args: --basic-auth username:pass1234
211+
# Provide extra flags to the share provider script
212+
# See https://docs.ddev.com/en/stable/users/configuration/config/#share_provider_args
215213

216214
# disable_settings_management: false
217215
# If true, DDEV will not create CMS-specific settings files like

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"symfony/options-resolver": "^6.4|^7.4|^8.0"
1919
},
2020
"require-dev": {
21-
"monolog/monolog": "^3.9",
21+
"monolog/monolog": "^3.10",
2222
"nyholm/psr7": "^1.8",
2323
"php-http/mock-client": "^1.6",
2424
"phpunit/phpunit": "^10.5",

docs/05-entities.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
- `getDateTime()`: `\DateTimeImmutable`
118118
- `getTemperature()`: `float`
119119
- `getTemperatureFeelsLike()`: `float`
120-
- `getVisibility()`: `int`
120+
- `getVisibility()`: `?int`
121121
- `getPrecipitationProbability()`: `int`
122122
- `getAtmosphericPressure()`: `int`
123123
- `getHumidity()`: `int`
@@ -214,7 +214,7 @@
214214
- `getMaxTemperature()`: `float`
215215
- `getHumidity()`: `int`
216216
- `getCloudiness()`: `int`
217-
- `getVisibility()`: `int`
217+
- `getVisibility()`: `?int`
218218
- `getAtmosphericPressure()`: `int`
219219
- `getConditions()`: [`Condition[]`](#condition)
220220
- `getWind()`: [`Wind`](#wind)
@@ -237,7 +237,7 @@
237237
- `getMaxTemperature()`: `float`
238238
- `getHumidity()`: `int`
239239
- `getCloudiness()`: `int`
240-
- `getVisibility()`: `int`
240+
- `getVisibility()`: `?int`
241241
- `getAtmosphericPressure()`: `int`
242242
- `getConditions()`: [`Condition[]`](#condition)
243243
- `getWind()`: [`Wind`](#wind)

src/Entity/Assistant/WeatherData.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class WeatherData extends BaseWeather
1212

1313
private float $temperatureFeelsLike;
1414

15-
private int $visibility;
15+
private ?int $visibility;
1616

1717
private \DateTimeImmutable $sunriseAt;
1818

@@ -25,7 +25,7 @@ public function __construct(string $locationName, array $data)
2525
$this->locationName = $locationName;
2626
$this->temperature = $data['temp'];
2727
$this->temperatureFeelsLike = $data['feels_like'];
28-
$this->visibility = $data['visibility'];
28+
$this->visibility = $data['visibility'] ?? null;
2929
$this->sunriseAt = \DateTimeImmutable::createFromFormat('U', $data['sunrise']);
3030
$this->sunsetAt = \DateTimeImmutable::createFromFormat('U', $data['sunset']);
3131
}
@@ -45,7 +45,7 @@ public function getTemperatureFeelsLike(): float
4545
return $this->temperatureFeelsLike;
4646
}
4747

48-
public function getVisibility(): int
48+
public function getVisibility(): ?int
4949
{
5050
return $this->visibility;
5151
}

src/Entity/OneCall/HourData.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class HourData extends BaseWeather
1010

1111
private float $temperatureFeelsLike;
1212

13-
private int $visibility;
13+
private ?int $visibility;
1414

1515
private int $precipitationProbability;
1616

@@ -20,7 +20,7 @@ public function __construct(array $data)
2020

2121
$this->temperature = $data['temp'];
2222
$this->temperatureFeelsLike = $data['feels_like'];
23-
$this->visibility = $data['visibility'];
23+
$this->visibility = $data['visibility'] ?? null;
2424
$this->precipitationProbability = round($data['pop'] * 100);
2525
}
2626

@@ -34,7 +34,7 @@ public function getTemperatureFeelsLike(): float
3434
return $this->temperatureFeelsLike;
3535
}
3636

37-
public function getVisibility(): int
37+
public function getVisibility(): ?int
3838
{
3939
return $this->visibility;
4040
}

src/Entity/Weather/WeatherData.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class WeatherData
2222

2323
private int $cloudiness;
2424

25-
private int $visibility;
25+
private ?int $visibility;
2626

2727
private int $atmosphericPressure;
2828

@@ -46,15 +46,11 @@ public function __construct(array $data)
4646
$this->maxTemperature = $data['main']['temp_max'];
4747
$this->humidity = $data['main']['humidity'];
4848
$this->cloudiness = $data['clouds']['all'];
49-
$this->visibility = $data['visibility'];
49+
$this->visibility = $data['visibility'] ?? null;
5050
$this->atmosphericPressure = $data['main']['pressure'];
5151
$this->conditions = EntityHelper::createEntityList(Condition::class, $data['weather']);
5252
$this->wind = new Wind($data['wind']);
53-
54-
$this->precipitationProbability = isset($data['pop'])
55-
? round($data['pop'] * 100)
56-
: null;
57-
53+
$this->precipitationProbability = isset($data['pop']) ? round($data['pop'] * 100) : null;
5854
$this->rainVolume = $data['rain']['1h'] ?? $data['rain']['3h'] ?? null;
5955
$this->snowVolume = $data['snow']['1h'] ?? $data['snow']['3h'] ?? null;
6056
}
@@ -101,7 +97,7 @@ public function getCloudiness(): int
10197
* Visibility, meters
10298
* Maximum value is 10000
10399
*/
104-
public function getVisibility(): int
100+
public function getVisibility(): ?int
105101
{
106102
return $this->visibility;
107103
}

0 commit comments

Comments
 (0)