I have two function in my controller and service. I want to call a function in service. Here is my code :
Controller:
public function findNeighborhoodGet(): array
{
$regionCenter = Request::get('region_center');
$distanceService = \App::make('App\web\one\Infrastructure\Service\Google\Map');
try {
$userPoint = $distanceService->getOriginPoint($regionCenter);
}
.
.
.
return $result
}
my service (Map.php) :
public function getOriginPoint(string $origin):Point
{
dd($origin);
return $this->getPointObject($origin);
}
Actually , I get an error :
A non well formed numeric value encountered
at this line: public function getOriginPoint(string $origin):Point
How to solve it?
This is a bug in the symfony/var-dumper package when using PHP7.1. It was fixed in version 2.7.16, 2.8.9, 3.0.9 and 3.1.3. See the pull request: https://github.com/symfony/symfony/pull/19379
In my case, I needed to composer update
my laravel framework packages, as my vendor directory copy of that package was at 2.7.9. (I'm using Laravel 5.1; later versions use 2.8 and 3.0 of symfony, which also had the bug)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With