geocoder-php / geocoder-php/Geocoder

PHP 8.4 compatibility (implicit nullable deprecation) [Geocoder\\Collection::slice(): Implicitly marking parameter $length as nullable is deprecated]

Open
#1,244 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
4k
Forks
525
Avg merge
8m
Merged PRs (30d)
1

Description

I'm getting a deprecation warning with PHP 8.4 on

500 Geocoder\\Collection::slice(): Implicitly marking parameter $length as nullable is deprecated, the explicit nullable type must be used instead at line 41 in [REDACTED]/willdurand/geocoder/Collection.php

  • geocoder-php/open-cage-provider is 4.6.0
  • willdurand/geocoder is 4.6.0

Am I missing something, or is PHP 8.4 not supported at all yet ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect Collection.php around line 41 and the Collection::slice() signature. Confirm the PHP 8.4 deprecation with the project's existing tests or a PHP 8.4 test run; done means the explicit nullable type removes the warning without breaking slice behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.