Skip to content

Commit a51437f

Browse files
authored
Merge pull request #61 from programmatordev/OPA-60-symfony-7-support
Update libraries compatibility with latest PHP versions
2 parents 94f2353 + f6035b6 commit a51437f

File tree

3 files changed

+57
-38
lines changed

3 files changed

+57
-38
lines changed

.ddev/config.yaml

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,31 @@ disable_upload_dirs_warning: true
2020

2121
# name: <projectname> # Name of the project, automatically provides
2222
# http://projectname.ddev.site and https://projectname.ddev.site
23+
# If the name is omitted, the project will take the name of the enclosing directory,
24+
# which is useful if you want to have a copy of the project side by side with this one.
2325

24-
# type: <projecttype> # backdrop, craftcms, django4, drupal, drupal6, drupal7, laravel, magento, magento2, php, python, shopware6, silverstripe, typo3, wordpress
25-
# See https://ddev.readthedocs.io/en/stable/users/quickstart/ for more
26+
# type: <projecttype> # backdrop, cakephp, craftcms, drupal, drupal6, drupal7, drupal8, drupal9, drupal10, drupal11, generic, laravel, magento, magento2, php, shopware6, silverstripe, symfony, typo3, wordpress
27+
# See https://docs.ddev.com/en/stable/users/quickstart/ for more
2628
# information on the different project types
27-
# "drupal" covers recent Drupal 8+
2829

2930
# docroot: <relative_path> # Relative path to the directory containing index.php.
3031

31-
# php_version: "8.2" # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"
32+
# php_version: "8.3" # PHP version to use, "5.6" through "8.4"
3233

3334
# You can explicitly specify the webimage but this
3435
# is not recommended, as the images are often closely tied to DDEV's' behavior,
3536
# so this can break upgrades.
3637

37-
# webimage: <docker_image> # nginx/php docker image.
38+
# webimage: <docker_image>
39+
# It’s unusual to change this option, and we don’t recommend it without Docker experience and a good reason.
40+
# Typically, this means additions to the existing web image using a .ddev/web-build/Dockerfile.*
3841

3942
# database:
4043
# type: <dbtype> # mysql, mariadb, postgres
4144
# version: <version> # database version, like "10.11" or "8.0"
42-
# MariaDB versions can be 5.5-10.8 and 10.11, MySQL versions can be 5.5-8.0
43-
# PostgreSQL versions can be 9-16.
45+
# MariaDB versions can be 5.5-10.8, 10.11, 11.4, 11.8
46+
# MySQL versions can be 5.5-8.0, 8.4
47+
# PostgreSQL versions can be 9-17
4448

4549
# router_http_port: <port> # Port to be used for http (defaults to global configuration, usually 80)
4650
# router_https_port: <port> # Port for https (defaults to global configuration, usually 443)
@@ -50,14 +54,25 @@ disable_upload_dirs_warning: true
5054
# "ddev xdebug" to enable Xdebug and "ddev xdebug off" to disable it work better,
5155
# as leaving Xdebug enabled all the time is a big performance hit.
5256

53-
# xhprof_enabled: false # Set to true to enable Xhprof and "ddev start" or "ddev restart"
54-
# Note that for most people the commands
55-
# "ddev xhprof" to enable Xhprof and "ddev xhprof off" to disable it work better,
56-
# as leaving Xhprof enabled all the time is a big performance hit.
57+
# xhgui_http_port: "8143"
58+
# xhgui_https_port: "8142"
59+
# The XHGui ports can be changed from the default 8143 and 8142
60+
# Very rarely used
61+
62+
# host_xhgui_port: "8142"
63+
# Can be used to change the host binding port of the XHGui
64+
# application. Rarely used; only when port conflict and
65+
# bind_all_ports is used (normally with router disabled)
66+
67+
# xhprof_mode: [prepend|xhgui|global]
68+
# Set to "xhgui" to enable XHGui features
69+
# "xhgui" will become default in a future major release
5770

58-
# webserver_type: nginx-fpm, apache-fpm, or nginx-gunicorn
71+
# webserver_type: nginx-fpm, apache-fpm, generic
5972

6073
# timezone: Europe/Berlin
74+
# If timezone is unset, DDEV will attempt to derive it from the host system timezone
75+
# using the $TZ environment variable or the /etc/localtime symlink.
6176
# This is the timezone used in the containers and by PHP;
6277
# it can be set to any valid timezone,
6378
# see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
@@ -77,16 +92,14 @@ disable_upload_dirs_warning: true
7792
# - preview
7893
# - snapshot
7994
# Alternatively, an explicit Composer version may be specified, for example "2.2.18".
80-
# To reinstall Composer after the image was built, run "ddev debug refresh".
95+
# To reinstall Composer after the image was built, run "ddev debug rebuild".
8196

82-
# nodejs_version: "20"
97+
# nodejs_version: "22"
8398
# change from the default system Node.js version to any other version.
84-
# Numeric version numbers can be complete (i.e. 18.15.0) or
85-
# incomplete (18, 17.2, 16). 'lts' and 'latest' can be used as well along with
86-
# other named releases.
87-
# see https://www.npmjs.com/package/n#specifying-nodejs-versions
88-
# Note that you can continue using 'ddev nvm' or nvm inside the web container
89-
# to change the project's installed node version if you need to.
99+
# 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'.
90103

91104
# corepack_enable: false
92105
# Change to 'true' to 'corepack enable' and gain access to latest versions of yarn/pnpm
@@ -119,7 +132,7 @@ disable_upload_dirs_warning: true
119132

120133
# ddev_version_constraint: ""
121134
# Example:
122-
# ddev_version_constraint: ">= 1.22.4"
135+
# ddev_version_constraint: ">= 1.24.8"
123136
# This will enforce that the running ddev version is within this constraint.
124137
# See https://github.com/Masterminds/semver#checking-version-constraints for
125138
# supported constraint formats
@@ -148,8 +161,8 @@ disable_upload_dirs_warning: true
148161
# - "mutagen": enables Mutagen for this project.
149162
# - "nfs": enables NFS for this project.
150163
#
151-
# See https://ddev.readthedocs.io/en/stable/users/install/performance/#nfs
152-
# See https://ddev.readthedocs.io/en/stable/users/install/performance/#mutagen
164+
# See https://docs.ddev.com/en/stable/users/install/performance/#nfs
165+
# See https://docs.ddev.com/en/stable/users/install/performance/#mutagen
153166

154167
# fail_on_hook_fail: False
155168
# Decide whether 'ddev start' should be interrupted by a failing hook
@@ -198,17 +211,17 @@ disable_upload_dirs_warning: true
198211

199212
# ngrok_args: --basic-auth username:pass1234
200213
# Provide extra flags to the "ngrok http" command, see
201-
# https://ngrok.com/docs/ngrok-agent/config or run "ngrok http -h"
214+
# https://ngrok.com/docs/agent/config/v3/#agent-configuration or run "ngrok http -h"
202215

203216
# disable_settings_management: false
204217
# If true, DDEV will not create CMS-specific settings files like
205-
# Drupal's settings.php/settings.ddev.php or TYPO3's AdditionalConfiguration.php
218+
# Drupal's settings.php/settings.ddev.php or TYPO3's additional.php
206219
# In this case the user must provide all such settings.
207220

208221
# You can inject environment variables into the web container with:
209222
# web_environment:
210-
# - SOMEENV=somevalue
211-
# - SOMEOTHERENV=someothervalue
223+
# - SOMEENV=somevalue
224+
# - SOMEOTHERENV=someothervalue
212225

213226
# no_project_mount: false
214227
# (Experimental) If true, DDEV will not mount the project into the web container;
@@ -276,7 +289,7 @@ disable_upload_dirs_warning: true
276289
# Many DDEV commands can be extended to run tasks before or after the
277290
# DDEV command is executed, for example "post-start", "post-import-db",
278291
# "pre-composer", "post-composer"
279-
# See https://ddev.readthedocs.io/en/stable/users/extend/custom-commands/ for more
292+
# See https://docs.ddev.com/en/stable/users/extend/custom-commands/ for more
280293
# information on the commands that can be extended and the tasks you can define
281294
# for them. Example:
282295
#hooks:

composer.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,26 @@
66
"license": "MIT",
77
"authors": [
88
{
9-
"name": "André Pimpão",
10-
"email": "a.pimpao@programmator.dev",
9+
"name": "Programmator",
10+
"email": "hotline@programmator.dev",
1111
"homepage": "https://programmator.dev"
1212
}
1313
],
1414
"require": {
1515
"php": ">=8.1",
16-
"myclabs/deep-copy": "^1.11",
17-
"programmatordev/php-api-sdk": "^1.0",
18-
"programmatordev/yet-another-php-validator": "^1.1"
16+
"myclabs/deep-copy": "^1.13",
17+
"programmatordev/php-api-sdk": "^2.0",
18+
"programmatordev/yet-another-php-validator": "^1.3",
19+
"symfony/options-resolver": "^6.4|^7.3"
1920
},
2021
"require-dev": {
21-
"monolog/monolog": "^3.6",
22+
"monolog/monolog": "^3.9",
2223
"nyholm/psr7": "^1.8",
2324
"php-http/mock-client": "^1.6",
2425
"phpunit/phpunit": "^10.5",
25-
"symfony/cache": "^6.4",
26-
"symfony/http-client": "^6.4",
27-
"symfony/var-dumper": "^6.4"
26+
"symfony/cache": "^6.4|^7.3",
27+
"symfony/http-client": "^6.4|^7.3",
28+
"symfony/var-dumper": "^6.4|^7.3"
2829
},
2930
"provide": {
3031
"psr/http-client-implementation": "1.0",

src/OpenWeatherMap.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,23 @@
1717
use ProgrammatorDev\OpenWeatherMap\Resource\OneCallResource;
1818
use ProgrammatorDev\OpenWeatherMap\Resource\WeatherResource;
1919
use ProgrammatorDev\OpenWeatherMap\UnitSystem\UnitSystem;
20+
use Symfony\Component\OptionsResolver\OptionsResolver;
2021

2122
class OpenWeatherMap extends Api
2223
{
2324
private array $options;
2425

26+
private OptionsResolver $optionsResolver;
27+
2528
public function __construct(
26-
#[\SensitiveParameter] private string $apiKey,
29+
#[\SensitiveParameter] private readonly string $apiKey,
2730
array $options = []
2831
)
2932
{
3033
parent::__construct();
3134

35+
$this->optionsResolver = new OptionsResolver();
36+
3237
$this->options = $this->configureOptions($options);
3338
$this->configureApi();
3439
}

0 commit comments

Comments
 (0)