Skip to content

Conversation

Nyholm
Copy link
Member

@Nyholm Nyholm commented Jul 9, 2017

Excuse my ignorance about Laravel.

I moved packages to the dev-section because these should be selected by the user. Ie the user should decide if he/she wants to download Guzzle client or Curl client. The user should decide if we should use GoogleMaps or BingMaps etc.

I know the tests fails on this PR but it is a start of how composer.json should look before we tag 2.0.

@willdurand willdurand requested a review from toin0u July 9, 2017 15:31
@mikebronner
Copy link
Member

mikebronner commented Jul 9, 2017

I'm not sure I'm completely in agreement. Here's how I see it: it should work out of the box with the CURL provider, but leave it open for the user to change that as needed in their config file. Because of that I would like to include one basic adapter, along with the providers we have had in the past, and let the user choose if they want to change it.

This makes on-boarding easier with this package (and most Laravel packages aim to work out of the box with Laravel), yet not restrict the developer if they want a different provider. I think largely the documentation should be updated to reflect this.

But yes, the ones needed to make the tests pass should be added to require-dev.

Update: I do want to emphasize that I understand the reasoning for your suggestions, and they make a lot of sense for the main package. I think of Geocoder-Laravel as an opinionated wrapper around the very versatile geocoder-php package. :)

@Nyholm
Copy link
Member Author

Nyholm commented Jul 13, 2017

I'm not sure I'm completely in agreement.

That is very fine. Im just making suggestions =)

Here's how I see it: it should work out of the box with the CURL provider, but leave it open for the user to change that as needed in their config file.

Wouldn't it work out of the box if the user installed any client? (Thanks to discovery)

This makes on-boarding easier with this package (and most Laravel packages aim to work out of the box with Laravel)

That is a fair argument. I usually argues that users are clever enough to run

composer require toin0u/geocoder-laravel geocoder-php/google-maps-provider php-http/mesage php-http/curl-client guzzlehttp/psr7 

instead of just

composer require toin0u/geocoder-laravel

I think of Geocoder-Laravel as an opinionated wrapper around the very versatile geocoder-php package. :)

As you want. As long as this is an intentional decision. Or maybe "intentional" is the wrong word. I mean as long as we disused it.


I will update the PR with a new suggestion.

@mikebronner mikebronner merged commit de34983 into master Jul 13, 2017
@Nyholm Nyholm deleted the nyholm-optional branch July 13, 2017 14:49
@Nyholm
Copy link
Member Author

Nyholm commented Jul 13, 2017

Thank you for reviewing and merging.

@mikebronner
Copy link
Member

mikebronner commented Jul 13, 2017

Moved the packages to dev-master temporarily, so that things will pass. Once 4.0 is released, will update package requirements and minimum stability accordingly.

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