Loading
task: #3630443: Move UI dependencies to suggest, default to the https endpoint, and add CI
Closes #3630443
Changes
Packaging
composer.json:drupal/geocoder,drupal/leafletandgeocoder-php/nominatim-providermove fromrequiretosuggestandrequire-dev.overpass_api_ui.info.ymlstill declares them, so the submodule cannot be enabled without them. Onlyhalaxa/json-machinestays inrequire.core_version_requirement: ^10.3 || ^11andphp: 8.1on both.info.ymlfiles.overpass_apiandoverpass_api_uiare listed under the OpenStreetMap package on the Extend page.
Endpoint
- The default endpoint becomes
https://overpass-api.de/api/.overpass_api_update_10002()moves sites still on the exact oldhttpdefault and leaves every other value alone.
CI
- Adds
.gitlab-ci.yml(drupal.org GitLab templates, previous and next minor opted in),phpcs.xml.dist(Drupal, DrupalPractice),phpstan.neon(level 1) and.gitignore. - Deletes
tests/src/PHPCodeSniffer/Standard.php, which extended a class that does not exist in any PHP_CodeSniffer release and caused 55 of the 60 phpcs errors. - All jobs pass: composer, composer-lint, cspell, eslint, phpcs, phpstan, phpunit, stylelint. To get there:
- cspell: the module's domain words in
_CSPELL_WORDS, typo fixes, and "Please" out of two strings. - phpcs: the remaining errors, checked with coder 8.3.31 (the pipeline's) and 9.0.1, which disagree on a few lines.
- phpcs/phpstan:
SettingsFormandQueryBuilderFormget their services injected throughcreate()instead of calling\Drupal. The same code works withConfigFormBase::create()on 10.3 andAutowireTraiton 11.x. - phpstan:
$responseinitialised before the retry loop inOverpassApi::sendQuery()(false positive), and the intentional reads of the deprecatedOverpassQueryOptions::$returnRaware ignored by path. - eslint:
query-builder-map.jsreordered so helpers are defined before use,Ldeclared as a global, prettier applied.
- cspell: the module's domain words in
Docs
- README rewritten: what the module does and does not do, requirements, usage of
execute(),getElements(), streaming withsink, and the exception contract as of #3618910. - Presets, the Feeds submodule and
drupal/feedsare left out until #3614000 and #3614002 land.
Bug fix
SettingsForm: "Check API status" caughtClientException, butgetStatus()throwsOverpassApiExceptionsince #3618910, so a failed status request ended in an error page. It now shows the message.
Notes
- The
^10.3floor is a support-policy change; nothing on 1.0.x needs 10.3 technically. It goes into the 1.0.0-beta5 release notes along with the https default. - The dependency injection for the two forms was planned in #3630442. It is done here because the CI jobs this issue adds need it; #3630442 keeps lowering the retry defaults.
- Security advisory coverage is a project-page setting and is not part of this MR.
Commits
15900afPackaging: move UI dependencies to suggest, https endpoint, CI (tbcs)9e8d1f3Group with the OpenStreetMap modules, drop the broken sniff (tbcs)35c8e00Trim the docs and composer.json to what 1.0.x ships3fc25a7Fix the cspell and phpcs findingse968a1cFix the phpcs errors coder 8.3 reports1de64e1Inject services into SettingsForm and QueryBuilderForm107d2f7Clear the remaining phpstan findings3aeb21eFix the eslint findings
Testing
- Pipeline #1006648: every job green, phpunit 77/77.
- Locally (DDEV, Drupal 11.4): both forms build and render through
formBuilder()->getForm(), andQueryBuilderFormsurvives serialize/unserialize with its injected services.
Edited by Orkut Murat Yılmaz