As highlighted in the #2989996 related issue,
at the actual state of 3.x dev, the geocoder-php providers are each a different optional / require-dev for the 3.x dev branch.

This reflects the new structure and approach of the parent geocoder-php library and the considerations already & clearly expressed (by @pfrenssen) here: https://www.drupal.org/project/geocoder/issues/2825360#comment-12710796

This means that after the first install (end enable) with the following:

$ composer require 'drupal/geocoder:3.x-dev'

the "normal" user won't find any really usable Geocoder Provider in the module.
Thanks (probably) to additional documentation (still to be produced) he should realize the need to add the needed Geocoder provider
as further composer require and addiction in its composer json file.

So Question ... is this the right / proper approach to provide an easy-to-use module for the "normal" user?
forcing him to this step by step approach to this module (and distilled) functionalities ?
Wouldn't be better just to ADD ALL the available providers (that the module already wraps with its own plugins) as normal project composer requirements?

More default providers out of the box, or more documentation?

CommentFileSizeAuthor
#9 2989998.patch7.37 KBsaphemmy

Comments

itamair created an issue. See original summary.

itamair’s picture

Title: Which Default Geocoder providers? » Any default Geocoder provider to provide?
pfrenssen’s picture

Well no, which one would you provide? You cannot know which provider the user will need. There is no default provider in the geocoder-php/geocoder library.

By doing this it would make things needlessly complex for the end user. We would need a way to add this to the composer dependencies, but we cannot add it to the "require" dependencies since then the end user would not be able to remove it any more from their project.

Even if we find a way to do this then the end user now will have to do two tasks instead of one: they will have to add the provider of their choice AND remove the default one that we provide.

Thanks (probably) to additional documentation (still to be produced) he should realize the need to add the needed Geocoder provider

It's already documented in the Readme: See https://cgit.drupalcode.org/geocoder/tree/README.md?h=8.x-3.x#n39

itamair’s picture

Ok, good, thanks ... makes sense, I am convinced.
But I don't find any specific documentation on this matter in the actual Readme (am I wrong?).
I will add some doc integration regarding this (need to add single Gecooder Provider with composer, to make it showing up in the module's list and able to be used .. ).
Also the final link to the Geocoder PHP library (now pointing to te 3.x version) should be updated.

pfrenssen’s picture

Yes we could improve the documentation a lot, it is just some very brief instruction in the install steps now, it's easy to miss.

Currently it says this:

* Choose the [Geocoder Provider](https://packagist.org/providers/geocoder-php/provider-implementation)
  you want to use and also add it as a required dependency to your project. For
  example if you want to use Google Maps as your provider:
  ```$ composer require geocoder-php/google-maps-provider```

We could provide a section in the project page, and in the online documentation as well outlining some of the popular providers.

itamair’s picture

I will improve documentation asap ...

itamair’s picture

Title: Any default Geocoder provider to provide? » Improve Documentation on adding geocoder-php Providers
itamair’s picture

Readme.md updated on geocoder-php Providers requirements ...
https://cgit.drupalcode.org/geocoder/commit/?h=8.x-3.x&id=91547125c3cc41...

saphemmy’s picture

StatusFileSize
new7.37 KB

I reviewed and updated(Improved) the coding standards within the documentation.

I also tried reviewing the step-by-step approach as requested for this issue but this module has got lots of requirements(dependencies) which I suggest still needs to be worked on.

  • itamair committed b961729 on 8.x-3.x authored by saphemmy
    Issue #2989998 by saphemmy: Improve Documentation on adding geocoder-php...
itamair’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.