geocoder-php / geocoder-php/Geocoder

Serialization of 'Closure' is not allowed

Open
#1,180 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I sometimes have this error while using the geocoder google maps plugin.
It seems to be caused by the Symfony cache, during the call to the handleQuery method. The method itself indeed accepts two callables as argument, so it should be expected.
Any hints?
TIA

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

Start by reproducing the error through the Google Maps plugin's handleQuery call, then trace how the Symfony cache handles its two callable arguments. Identify why the closure is being serialized and document a verified fix or workaround that prevents the error during geocoding.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, symfony
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.