Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using Symfony 7 and fix some deprecations #346

Merged
merged 3 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ jobs:
sf_version: '6.0.*'
- php: '8.2'
sf_version: '6.2.*'
- php: '8.2'
sf_version: '6.4.*'
- php: '8.2'
sf_version: '7.0.*'
steps:
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
Expand Down
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"geocoder-php/plugin": "^1.5",
"php-http/curl-client": "^2.3",
"php-http/discovery": "^1.14",
"symfony/console": "^4.4 || ^5.0 || ^6.0",
"symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0",
"symfony/options-resolver": "^4.4 || ^5.0 || ^6.0",
"symfony/console": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/options-resolver": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"willdurand/geocoder": "^4.6"
},
"require-dev": {
Expand Down Expand Up @@ -63,11 +63,11 @@
"php-http/message": "^1.13",
"phpstan/phpstan": "^1.9.2",
"psr/http-client": "^1.0",
"symfony/cache": "^4.4 || ^5.0 || ^6.0",
"symfony/config": "^4.4 || ^5.0 || ^6.0",
"symfony/phpunit-bridge": "^5.2 || ^6.0",
"symfony/validator": "^4.4 || ^5.0 || ^6.0",
"symfony/yaml": "^4.4 || ^5.0 || ^6.0"
"symfony/cache": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/config": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/phpunit-bridge": "^5.2 || ^6.0 || ^7.0",
"symfony/validator": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/yaml": "^4.4 || ^5.0 || ^6.0 || ^7.0"
},
"conflict": {
"geocoder-php/nominatim-provider": "<5.0"
Expand Down
10 changes: 10 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ parameters:
count: 1
path: src/Doctrine/ORM/GeocoderListener.php

-
message: "#^Method Bazinga\\\\GeocoderBundle\\\\Plugin\\\\FakeIpPlugin\\:\\:handleQuery\\(\\) return type with generic interface Http\\\\Promise\\\\Promise does not specify its types\\: T$#"
count: 1
path: src/Plugin/FakeIpPlugin.php

-
message: "#^Parameter \\#1 \\$text of method Geocoder\\\\Query\\\\GeocodeQuery\\:\\:withText\\(\\) expects string, string\\|null given\\.$#"
count: 1
Expand All @@ -150,6 +155,11 @@ parameters:
count: 1
path: src/Plugin/FakeIpPlugin.php

-
message: "#^Method Bazinga\\\\GeocoderBundle\\\\Plugin\\\\ProfilingPlugin\\:\\:handleQuery\\(\\) return type with generic interface Http\\\\Promise\\\\Promise does not specify its types\\: T$#"
count: 1
path: src/Plugin/ProfilingPlugin.php

-
message: "#^Parameter \\#1 \\$accountId of class GeoIp2\\\\WebService\\\\Client constructor expects int, int\\|null given\\.$#"
count: 1
Expand Down
5 changes: 1 addition & 4 deletions src/Command/GeocodeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,7 @@ protected function configure()
);
}

/**
* @return int
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
if ($input->getOption('provider')) {
$this->geocoder->using($input->getOption('provider'));
Expand Down
4 changes: 1 addition & 3 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ public function __construct(bool $debug)

/**
* Generates the configuration tree builder.
*
* @return TreeBuilder The tree builder
*/
public function getConfigTreeBuilder()
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('bazinga_geocoder');
$rootNode = $treeBuilder->getRootNode();
Expand Down