diff --git a/CHANGELOG.md b/CHANGELOG.md
index 48478b9..bfaea94 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
# CHANGELOG
+## 2.25
+
+- Downgrade PHP requirement from 8.3 to 8.1
+
## 2.22
- Add support for configuring a default Map ID
@@ -10,7 +14,7 @@
### BC Breaks
-- Renamed importmap entry `@symfony/ux-google-map/map-controller` to `@symfony/ux-google-map`,
+- Renamed importmap entry `@symfony/ux-google-map/map-controller` to `@symfony/ux-google-map`,
you will need to update your importmap.
## 2.19
diff --git a/composer.json b/composer.json
index 00f7704..7889f36 100644
--- a/composer.json
+++ b/composer.json
@@ -16,14 +16,15 @@
}
],
"require": {
- "php": ">=8.3",
+ "php": ">=8.1",
"symfony/stimulus-bundle": "^2.18.1",
"symfony/ux-map": "^2.19"
},
"require-dev": {
- "symfony/phpunit-bridge": "^6.4|^7.0",
+ "symfony/phpunit-bridge": "^7.2",
"symfony/ux-icons": "^2.18",
- "spatie/phpunit-snapshot-assertions": "^5.1.8"
+ "spatie/phpunit-snapshot-assertions": "^4.2.17",
+ "phpunit/phpunit": "^9.6.22"
},
"autoload": {
"psr-4": { "Symfony\\UX\\Map\\Bridge\\Google\\": "src/" },
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 4049eb2..751314e 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -12,11 +12,10 @@
./src
-
+
-
diff --git a/src/Option/FullscreenControlOptions.php b/src/Option/FullscreenControlOptions.php
index ed58a3c..ab3df9d 100644
--- a/src/Option/FullscreenControlOptions.php
+++ b/src/Option/FullscreenControlOptions.php
@@ -18,10 +18,10 @@ namespace Symfony\UX\Map\Bridge\Google\Option;
*
* @author Hugo Alliaume
*/
-final readonly class FullscreenControlOptions
+final class FullscreenControlOptions
{
public function __construct(
- private ControlPosition $position = ControlPosition::INLINE_END_BLOCK_START,
+ private readonly ControlPosition $position = ControlPosition::INLINE_END_BLOCK_START,
) {
}
diff --git a/src/Option/MapTypeControlOptions.php b/src/Option/MapTypeControlOptions.php
index 11dfe82..3cc28e3 100644
--- a/src/Option/MapTypeControlOptions.php
+++ b/src/Option/MapTypeControlOptions.php
@@ -18,15 +18,15 @@ namespace Symfony\UX\Map\Bridge\Google\Option;
*
* @author Hugo Alliaume
*/
-final readonly class MapTypeControlOptions
+final class MapTypeControlOptions
{
/**
* @param array<'hybrid'|'roadmap'|'satellite'|'terrain'|string> $mapTypeIds
*/
public function __construct(
- private array $mapTypeIds = [],
- private ControlPosition $position = ControlPosition::BLOCK_START_INLINE_START,
- private MapTypeControlStyle $style = MapTypeControlStyle::DEFAULT,
+ private readonly array $mapTypeIds = [],
+ private readonly ControlPosition $position = ControlPosition::BLOCK_START_INLINE_START,
+ private readonly MapTypeControlStyle $style = MapTypeControlStyle::DEFAULT,
) {
}
diff --git a/src/Option/StreetViewControlOptions.php b/src/Option/StreetViewControlOptions.php
index 897c746..2fa9a89 100644
--- a/src/Option/StreetViewControlOptions.php
+++ b/src/Option/StreetViewControlOptions.php
@@ -18,10 +18,10 @@ namespace Symfony\UX\Map\Bridge\Google\Option;
*
* @author Hugo Alliaume
*/
-final readonly class StreetViewControlOptions
+final class StreetViewControlOptions
{
public function __construct(
- private ControlPosition $position = ControlPosition::INLINE_END_BLOCK_END,
+ private readonly ControlPosition $position = ControlPosition::INLINE_END_BLOCK_END,
) {
}
diff --git a/src/Option/ZoomControlOptions.php b/src/Option/ZoomControlOptions.php
index 644ba79..b669e5b 100644
--- a/src/Option/ZoomControlOptions.php
+++ b/src/Option/ZoomControlOptions.php
@@ -18,10 +18,10 @@ namespace Symfony\UX\Map\Bridge\Google\Option;
*
* @author Hugo Alliaume
*/
-final readonly class ZoomControlOptions
+final class ZoomControlOptions
{
public function __construct(
- private ControlPosition $position = ControlPosition::INLINE_END_BLOCK_END,
+ private readonly ControlPosition $position = ControlPosition::INLINE_END_BLOCK_END,
) {
}
diff --git a/src/Renderer/GoogleRenderer.php b/src/Renderer/GoogleRenderer.php
index 1077e26..331137e 100644
--- a/src/Renderer/GoogleRenderer.php
+++ b/src/Renderer/GoogleRenderer.php
@@ -22,7 +22,7 @@ use Symfony\UX\StimulusBundle\Helper\StimulusHelper;
*
* @internal
*/
-final readonly class GoogleRenderer extends AbstractRenderer
+final class GoogleRenderer extends AbstractRenderer
{
/**
* Parameters are based from https://googlemaps.github.io/js-api-loader/interfaces/LoaderOptions.html documentation.
@@ -30,20 +30,19 @@ final readonly class GoogleRenderer extends AbstractRenderer
public function __construct(
StimulusHelper $stimulusHelper,
UxIconRenderer $uxIconRenderer,
- #[\SensitiveParameter]
- private string $apiKey,
- private ?string $id = null,
- private ?string $language = null,
- private ?string $region = null,
- private ?string $nonce = null,
- private ?int $retries = null,
- private ?string $url = null,
- private ?string $version = null,
+ #[\SensitiveParameter] private readonly string $apiKey,
+ private readonly ?string $id = null,
+ private readonly ?string $language = null,
+ private readonly ?string $region = null,
+ private readonly ?string $nonce = null,
+ private readonly ?int $retries = null,
+ private readonly ?string $url = null,
+ private readonly ?string $version = null,
/**
* @var array<'core'|'maps'|'places'|'geocoding'|'routes'|'marker'|'geometry'|'elevation'|'streetView'|'journeySharing'|'drawing'|'visualization'>
*/
- private array $libraries = [],
- private ?string $defaultMapId = null,
+ private readonly array $libraries = [],
+ private readonly ?string $defaultMapId = null,
) {
parent::__construct($stimulusHelper, $uxIconRenderer);
}