Skip to content

Conversation

@Chris53897
Copy link

@Chris53897 Chris53897 commented Dec 20, 2025

removed in #369
this is required for Upgrading willdurand/geocoder (4.6.0 => 5.0.0)

Summary by CodeRabbit

  • Chores

    • Updated and modernized geocoding provider dependencies and related libraries for compatibility and stability.
    • Consolidated legacy providers, replacing them with newer provider packages.
  • Documentation

    • Removed two legacy provider entries from the public services listing to reflect the updated provider set.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 20, 2025

Warning

Rate limit exceeded

@Chris53897 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 7 minutes and 42 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 2376a16 and 157976f.

📒 Files selected for processing (1)
  • .php-cs-fixer.php (1 hunks)

Walkthrough

Removed the Geoip provider factory and its test config, updated phpstan baseline paths/ignore rules, removed provider entries from docs, and bumped/reshuffled multiple dev geocoder-related dependencies in composer.json.

Changes

Cohort / File(s) Summary
Composer dev dependency updates
composer.json
Bumped many geocoder-related dev dependencies (algolia-places, here, host-ip, ip-info, ipstack, maxmind-binary, maxmind, nominatim, open-cage, openrouteservice, pickpoint, tomtom, yandex) and nyholm/psr7; removed legacy providers (e.g., geoips-provider, mapzen-provider, geoip/geoip) and consolidated provider package versions.
Provider factory removal
src/ProviderFactory/GeoipFactory.php
Deleted the GeoipFactory class file and its declarations (class, methods, static dependencies).
Tests config removal
tests/Functional/config/provider/geoip.yml
Removed the Geoip provider test configuration block (provider entry and profiling settings).
Documentation cleanup
doc/services.md
Removed two provider factory entries (GeoipFactory, GeoIPsFactory) from the public services table.
Static analysis baseline edits
phpstan-baseline.php
Adjusted file path formatting to use __DIR__ . '/...', added an ignoreError for GeocodeCommand.php, replaced/remove ignore entries referencing old Geoip factory files and updated entries to reference GeoIP2Factory.php, and reformatted array closures.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Areas to focus on:
    • Ensure removal of GeoipFactory doesn't leave dangling references (service wiring, DI config, docs, tests).
    • Validate updated phpstan-baseline.php paths and new ignore rules accurately reflect current file layout.
    • Confirm composer dependency bumps and removals don't introduce incompatibilities with existing provider integrations or test fixtures.
    • Verify doc/services.md edits align with actual exported services.

Possibly related PRs

Poem

🐰 I hopped through composer, pruning old roots,
I nudged phpstan rules and tidied the routes,
A factory vanished, tests waved goodbye,
New versions arrive with a curious eye,
Hooray — fresh hops for geocoding boots! 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main changes: removing unused code and bumping development dependencies, which directly aligns with the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
composer.json (1)

25-70: Remove orphaned geoip/geoip references from tests/bootstrap.php.

The geoip/geoip package was removed from composer.json but tests/bootstrap.php still contains require statements for its files:

  • Line: require_once __DIR__.'/../vendor/geoip/geoip/src/geoip.inc';
  • Line: require_once __DIR__.'/../vendor/geoip/geoip/src/geoipcity.inc';

These will cause test failures since the package no longer exists. Remove these require statements from the bootstrap file. The other two removed packages (geocoder-php/geoips-provider and geocoder-php/mapzen-provider) have no remaining references.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b601378 and 099a4ed.

📒 Files selected for processing (1)
  • composer.json (1 hunks)
🔇 Additional comments (1)
composer.json (1)

41-45: Dev dependency version bumps look good.

The version increments are consistent minor/patch bumps across all geocoder providers, aligning with the goal of supporting willdurand/geocoder 5.0.0. The nyholm/psr7 bump to ^1.8 is also a reasonable maintenance update.

Also applies to: 49-56, 58-58

"fakerphp/faker": "^1.20",
"friendsofphp/php-cs-fixer": "^3.13",
"geocoder-php/algolia-places-provider": "^0.4",
"geocoder-php/algolia-places-provider": "^0.5",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Algolia Places API is no longer functional.

The Algolia Places API shut down on May 31st, 2022. While the geocoder-php/algolia-places-provider package still exists and receives maintenance updates, the underlying service is non-functional. If this provider is retained solely for testing the bundle's integration patterns, this is acceptable. Otherwise, this dependency should be removed and replaced with an alternative geocoding provider.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 099a4ed and 2376a16.

📒 Files selected for processing (4)
  • doc/services.md (0 hunks)
  • phpstan-baseline.php (1 hunks)
  • src/ProviderFactory/GeoipFactory.php (0 hunks)
  • tests/Functional/config/provider/geoip.yml (0 hunks)
💤 Files with no reviewable changes (3)
  • doc/services.md
  • src/ProviderFactory/GeoipFactory.php
  • tests/Functional/config/provider/geoip.yml
🧰 Additional context used
🪛 GitHub Check: PHP-CS-Fixer
phpstan-baseline.php

[warning] 1-1:
Found violation(s) of type: declare_equal_normalize


[warning] 1-1:
Found violation(s) of type: concat_space


[warning] 1-1:
Found violation(s) of type: blank_line_after_opening_tag

🔇 Additional comments (3)
phpstan-baseline.php (3)

8-194: LGTM: Path formatting standardized.

The path concatenation formatting has been consistently updated throughout the file to use spaces around the concatenation operator (__DIR__ . '/path'), which aligns with the concat_space coding standard and improves readability.


176-194: GeoipFactory to GeoIP2Factory migration verified as complete.

The phpstan-baseline.php updates correctly reflect the removal of the old Geoip provider. GeoipFactory.php has been completely removed from the codebase, all factory references have been properly migrated to GeoIP2Factory, and configuration files and documentation correctly reference the updated factory. The baseline error path updates are appropriate and the changes are ready to merge.


22-27: This PHPStan suppression is appropriate. The sprintf call at lines 81-85 passes a potentially mixed-type value (is_array($value) ? json_encode($value) : $value) as the second argument after the format string. While PHPStan strictly requires bool|float|int|string|null, sprintf handles type coercion at runtime, and the code functions correctly. Suppressing this single instance is more pragmatic than adding explicit type casting for display output.

<?php

declare(strict_types=1);
<?php declare(strict_types = 1);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix the declare statement formatting.

The space around = in the declare statement violates the declare_equal_normalize rule. According to PHP-CS-Fixer standards, there should be no spaces around the equals sign.

🔎 Proposed fix
-<?php declare(strict_types = 1);
+<?php declare(strict_types=1);

Based on static analysis hints.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<?php declare(strict_types = 1);
<?php declare(strict_types=1);
🧰 Tools
🪛 GitHub Check: PHP-CS-Fixer

[warning] 1-1:
Found violation(s) of type: declare_equal_normalize


[warning] 1-1:
Found violation(s) of type: concat_space


[warning] 1-1:
Found violation(s) of type: blank_line_after_opening_tag

🤖 Prompt for AI Agents
In phpstan-baseline.php around line 1, the declare statement has spaces around
the equals sign; update the declaration to remove the spaces so it reads
declare(strict_types=1); to comply with the declare_equal_normalize PHP-CS-Fixer
rule and PHP formatting standards.

@Chris53897
Copy link
Author

I have regenerated the baseline (PHP 8.5). This conflicts with PHP-CS-Fixer. I excluded the baseline from PHP-CS-Fixer

@Chris53897
Copy link
Author

A new Release is needed for BC reasons. But i am pretty sure, you are aware of this.

@Chris53897 Chris53897 mentioned this pull request Dec 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants