Skip to content

Commit 4e8af37

Browse files
authored
Merge pull request #346 from javiereguiluz/allow_sf7
Allow using Symfony 7 and fix some deprecations
2 parents acee478 + ba0babf commit 4e8af37

File tree

5 files changed

+24
-15
lines changed

5 files changed

+24
-15
lines changed

.github/workflows/ci.yml

+4
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ jobs:
8282
sf_version: '6.0.*'
8383
- php: '8.2'
8484
sf_version: '6.2.*'
85+
- php: '8.2'
86+
sf_version: '6.4.*'
87+
- php: '8.2'
88+
sf_version: '7.0.*'
8589
steps:
8690
- name: "Setup PHP"
8791
uses: shivammathur/setup-php@v2

composer.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
"geocoder-php/plugin": "^1.5",
1616
"php-http/curl-client": "^2.3",
1717
"php-http/discovery": "^1.14",
18-
"symfony/console": "^4.4 || ^5.0 || ^6.0",
19-
"symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0",
20-
"symfony/options-resolver": "^4.4 || ^5.0 || ^6.0",
18+
"symfony/console": "^4.4 || ^5.0 || ^6.0 || ^7.0",
19+
"symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0 || ^7.0",
20+
"symfony/options-resolver": "^4.4 || ^5.0 || ^6.0 || ^7.0",
2121
"willdurand/geocoder": "^4.6"
2222
},
2323
"require-dev": {
@@ -63,11 +63,11 @@
6363
"php-http/message": "^1.13",
6464
"phpstan/phpstan": "^1.9.2",
6565
"psr/http-client": "^1.0",
66-
"symfony/cache": "^4.4 || ^5.0 || ^6.0",
67-
"symfony/config": "^4.4 || ^5.0 || ^6.0",
68-
"symfony/phpunit-bridge": "^5.2 || ^6.0",
69-
"symfony/validator": "^4.4 || ^5.0 || ^6.0",
70-
"symfony/yaml": "^4.4 || ^5.0 || ^6.0"
66+
"symfony/cache": "^4.4 || ^5.0 || ^6.0 || ^7.0",
67+
"symfony/config": "^4.4 || ^5.0 || ^6.0 || ^7.0",
68+
"symfony/phpunit-bridge": "^5.2 || ^6.0 || ^7.0",
69+
"symfony/validator": "^4.4 || ^5.0 || ^6.0 || ^7.0",
70+
"symfony/yaml": "^4.4 || ^5.0 || ^6.0 || ^7.0"
7171
},
7272
"conflict": {
7373
"geocoder-php/nominatim-provider": "<5.0"

phpstan-baseline.neon

+10
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ parameters:
140140
count: 1
141141
path: src/Doctrine/ORM/GeocoderListener.php
142142

143+
-
144+
message: "#^Method Bazinga\\\\GeocoderBundle\\\\Plugin\\\\FakeIpPlugin\\:\\:handleQuery\\(\\) return type with generic interface Http\\\\Promise\\\\Promise does not specify its types\\: T$#"
145+
count: 1
146+
path: src/Plugin/FakeIpPlugin.php
147+
143148
-
144149
message: "#^Parameter \\#1 \\$text of method Geocoder\\\\Query\\\\GeocodeQuery\\:\\:withText\\(\\) expects string, string\\|null given\\.$#"
145150
count: 1
@@ -150,6 +155,11 @@ parameters:
150155
count: 1
151156
path: src/Plugin/FakeIpPlugin.php
152157

158+
-
159+
message: "#^Method Bazinga\\\\GeocoderBundle\\\\Plugin\\\\ProfilingPlugin\\:\\:handleQuery\\(\\) return type with generic interface Http\\\\Promise\\\\Promise does not specify its types\\: T$#"
160+
count: 1
161+
path: src/Plugin/ProfilingPlugin.php
162+
153163
-
154164
message: "#^Parameter \\#1 \\$accountId of class GeoIp2\\\\WebService\\\\Client constructor expects int, int\\|null given\\.$#"
155165
count: 1

src/Command/GeocodeCommand.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,7 @@ protected function configure()
5555
);
5656
}
5757

58-
/**
59-
* @return int
60-
*/
61-
protected function execute(InputInterface $input, OutputInterface $output)
58+
protected function execute(InputInterface $input, OutputInterface $output): int
6259
{
6360
if ($input->getOption('provider')) {
6461
$this->geocoder->using($input->getOption('provider'));

src/DependencyInjection/Configuration.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ public function __construct(bool $debug)
3030

3131
/**
3232
* Generates the configuration tree builder.
33-
*
34-
* @return TreeBuilder The tree builder
3533
*/
36-
public function getConfigTreeBuilder()
34+
public function getConfigTreeBuilder(): TreeBuilder
3735
{
3836
$treeBuilder = new TreeBuilder('bazinga_geocoder');
3937
$rootNode = $treeBuilder->getRootNode();

0 commit comments

Comments
 (0)