[Map] Downgrade PHP requirement from 8.3 to 8.1

This commit is contained in:
Hugo Alliaume
2025-04-15 09:45:09 +02:00
parent 74ba69bf3f
commit 0357b3b5a6
8 changed files with 31 additions and 28 deletions

View File

@@ -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

View File

@@ -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/" },

View File

@@ -16,7 +16,6 @@
<php>
<ini name="error_reporting" value="-1"/>
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0&amp;max[direct]=0"/>
<server name="SYMFONY_PHPUNIT_VERSION" value="11.5.0"/>
</php>
<testsuites>

View File

@@ -18,10 +18,10 @@ namespace Symfony\UX\Map\Bridge\Google\Option;
*
* @author Hugo Alliaume <hugo@alliau.me>
*/
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,
) {
}

View File

@@ -18,15 +18,15 @@ namespace Symfony\UX\Map\Bridge\Google\Option;
*
* @author Hugo Alliaume <hugo@alliau.me>
*/
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,
) {
}

View File

@@ -18,10 +18,10 @@ namespace Symfony\UX\Map\Bridge\Google\Option;
*
* @author Hugo Alliaume <hugo@alliau.me>
*/
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,
) {
}

View File

@@ -18,10 +18,10 @@ namespace Symfony\UX\Map\Bridge\Google\Option;
*
* @author Hugo Alliaume <hugo@alliau.me>
*/
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,
) {
}

View File

@@ -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);
}