Skip to content

Provider set up issue #129

Closed
Closed
@fritosxii

Description

@fritosxii

General Information

GeocoderLaravel Version: @stable
Laravel Version: 5.6
PHP Version: 7.2.*
Operating System and Version: Debian

Issue Description

Updated laravel to 5.6 with composer. Noticed the list of available providers skimmed down (I used Nominatim prior) and configuration changed.

I redownloaded the Nominatim package into the new vender/geocoder-php folder. I then added the Nominatim::class to the chain, checked file permission stuff, etc.

Main issue is that my editor is able to verify the class exists and includes it in the new config fine:
'providers' => [ Chain::class => [ Nominatim::class => [], GoogleMaps::class => [ env('GOOGLE_MAPS_LOCALE', 'en-US'), env('GOOGLE_MAPS_API_KEY'), ], GeoPlugin::class => [], ], ],

but the class is not found In ProviderAndDumperAggregator.php line 239: Class Geocoder\Provider\Nominatim\Nominatim does not exist

Any idea what I'm missing?

Stack Trace

ReflectionException thrown with message "Class Geocoder\Provider\Nominatim\Nominatim does not exist"

Stacktrace:
#21 ReflectionException in /matrix/home/anthony.donofrio/public_html/Kora3/vendor/toin0u/geocoder-laravel/src/ProviderAndDumperAggregator.php:239
#20 ReflectionClass:__construct in /matrix/home/anthony.donofrio/public_html/Kora3/vendor/toin0u/geocoder-laravel/src/ProviderAndDumperAggregator.php:239
#19 Geocoder\Laravel\ProviderAndDumperAggregator:Geocoder\Laravel{closure} in [internal]:0
#18 array_map in /matrix/home/anthony.donofrio/public_html/Kora3/vendor/laravel/framework/src/Illuminate/Support/Collection.php:932
#17 Illuminate\Support\Collection:map in /matrix/home/anthony.donofrio/public_html/Kora3/vendor/toin0u/geocoder-laravel/src/ProviderAndDumperAggregator.php:246
#16 Geocoder\Laravel\ProviderAndDumperAggregator:getProvidersFromConfiguration in /matrix/home/anthony.donofrio/public_html/Kora3/vendor/toin0u/geocoder-laravel/src/ProviderAndDumperAggregator.php:145
#15 Geocoder\Laravel\ProviderAndDumperAggregator:registerProvidersFromConfig in /matrix/home/anthony.donofrio/public_html/Kora3/vendor/toin0u/geocoder-laravel/src/Providers/GeocoderService.php:29
#14 Geocoder\Laravel\Providers\GeocoderService:boot in /matrix/home/anthony.donofrio/public_html/Kora3/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
#13 call_user_func_array in /matrix/home/anthony.donofrio/public_html/Kora3/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
#12 Illuminate\Container\BoundMethod:Illuminate\Container{closure} in /matrix/home/anthony.donofrio/public_html/Kora3/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:87
#11 Illuminate\Container\BoundMethod:callBoundMethod in /matrix/home/anthony.donofrio/public_html/Kora3/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:31
#10 Illuminate\Container\BoundMethod:call in /matrix/home/anthony.donofrio/public_html/Kora3/vendor/laravel/framework/src/Illuminate/Container/Container.php:564
#9 Illuminate\Container\Container:call in /matrix/home/anthony.donofrio/public_html/Kora3/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:794
#8 Illuminate\Foundation\Application:bootProvider in /matrix/home/anthony.donofrio/public_html/Kora3/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:777
#7 Illuminate\Foundation\Application:Illuminate\Foundation{closure} in [internal]:0
#6 array_walk in /matrix/home/anthony.donofrio/public_html/Kora3/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:778
#5 Illuminate\Foundation\Application:boot in /matrix/home/anthony.donofrio/public_html/Kora3/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17
#4 Illuminate\Foundation\Bootstrap\BootProviders:bootstrap in /matrix/home/anthony.donofrio/public_html/Kora3/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:206
#3 Illuminate\Foundation\Application:bootstrapWith in /matrix/home/anthony.donofrio/public_html/Kora3/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:162
#2 Illuminate\Foundation\Http\Kernel:bootstrap in /matrix/home/anthony.donofrio/public_html/Kora3/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:146
#1 Illuminate\Foundation\Http\Kernel:sendRequestThroughRouter in /matrix/home/anthony.donofrio/public_html/Kora3/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116
#0 Illuminate\Foundation\Http\Kernel:handle in /matrix/home/anthony.donofrio/public_html/Kora3/public/index.php:52

Activity

mikebronner

mikebronner commented on Jun 13, 2018

@mikebronner
Member
self-assigned this
on Jun 22, 2018
mikebronner

mikebronner commented on Jun 22, 2018

@mikebronner
Member

@fritosxii Are you still having this issue? if you are, please let me know what didn't work with the new provider instructions under 4.0 and re-open this ticket. Thanks :)

fritosxii

fritosxii commented on Jul 30, 2018

@fritosxii
Author

Ok, I think I can finally describe the issue I'm running into. Basically in my composer file under require I have this:

"toin0u/geocoder-laravel": "@stable",

When I look at my .lock file, the required section for it is this:

"geocoder-php/chain-provider": "^4.0",
"geocoder-php/geo-plugin-provider": "^4.0",
"geocoder-php/google-maps-provider": "^4.0",
"guzzlehttp/psr7": "*",
"illuminate/cache": "5.0 - 5.6",
"illuminate/support": "5.0 - 5.6",
"php": ">=7.1.3",
"php-http/curl-client": "^1.7",
"willdurand/geocoder": "^4.0"

So to install Nominatim I do:

composer require geocoder-php/nominatim-provider

Which then gives me this error:

Problem 1
- Can only install one of: geocoder-php/common-http[4.1.0, 4.0.0].
- Can only install one of: geocoder-php/common-http[4.1.0, 4.0.0].
- Can only install one of: geocoder-php/common-http[4.1.0, 4.0.0].
- geocoder-php/nominatim-provider 5.0.0 requires geocoder-php/common-http ^4.1 -> satisfiable by geocoder-php/common-http[4.1.0].
- Installation request for geocoder-php/nominatim-provider ^5.0 -> satisfiable by geocoder-php/nominatim-provider[5.0.0].
- Installation request for geocoder-php/common-http (locked at 4.0.0) -> satisfiable by geocoder-php/common-http[4.0.0].

Any help is appreciated. I feel like and hope I'm just messing up something simple.

mikebronner

mikebronner commented on Jul 30, 2018

@mikebronner
Member

Hi @fritosxii, have you tried using:

"toin0u/geocoder-laravel": "*",

That should install the stable version by default.

fritosxii

fritosxii commented on Jul 30, 2018

@fritosxii
Author

Pulls in the same version:
"version": "4.0.10",

Same issue with manually requiring geocoder-php/nominatim-provider

fritosxii

fritosxii commented on Jul 30, 2018

@fritosxii
Author

Could it have something to do with geocoder-php/geo-plugin-provider and geocoder-php/google-maps-provide both requiring geocoder-php/common-http[4.0.0] while geocoder-php/nominatim-provider requires geocoder-php/common-http[4.1.0]?

fritosxii

fritosxii commented on Sep 5, 2018

@fritosxii
Author

bump

mikebronner

mikebronner commented on Sep 5, 2018

@mikebronner
Member

I will take a look at this as soon as I can. I am currently away on family emergency. Sorry for the delay.

fritosxii

fritosxii commented on Sep 5, 2018

@fritosxii
Author

No rush! Hope everything goes well with that :)

fritosxii

fritosxii commented on Nov 5, 2018

@fritosxii
Author

Ok so, I'm not sure what was going on with my package dependencies. I ended up manually updating common-http by itself apart from dependencies, and then it let me install nominatim-provider. I still have some things to learn about composer packaging.

Consider this issue complete!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Provider set up issue · Issue #129 · geocoder-php/GeocoderLaravel