GetDKAN / dkan

DKAN Open Data Portal
https://dkan.readthedocs.io/en/latest/index.html
GNU General Public License v2.0
364 stars 171 forks source link

Use drupal-composer/info-rewrite for showing DKAN version in Drupal backend #4106

Open stefan-korn opened 5 months ago

stefan-korn commented 5 months ago

User Story

No version of DKAN is shown on Drupal module page (admin/modules). This is because DKAN is not installed via Drupal Package repository. How about using composer plugin drupal-composer/info-rewrite (https://github.com/drupal-composer/info-rewrite) to show the version of DKAN on Drupal module page?

I have tested this and it works on my end.

Would probably only need to add this to composer.json requirements for DKAN.

Acceptance Criteria

DKAN version is shown in Drupal backend. Screenshot with version and without

dafeder commented 3 months ago

@stefan-korn I think we'd be more comfortable with a solution that adds the version info to all the info files in the tarball on github so it would appear as long as you're pulling in a full release and not dist.

Also, I think if one wanted to use this plugin they could just add it to your drupal site's composer project, without needing to add it to DKAN itself?

stefan-korn commented 3 months ago

@dafeder : Surely, one can just add it to composer. We have done so :-)

And if you will provide the version info in the info file of the tarball that would be probably great, but seems like a bit of overhead and will it also work if you "composer require" DKAN or only if you download the tarball?

If you are not comfortable with "composer requiring" the package in DKAN, you could maybe "composer suggest" it at least.

dafeder commented 3 months ago

@stefan-korn in theory, composer would use the tarball when pulling a stable release tag, unless specifically told to --prefer-dist. So you would not see version info in Drupal when using a -dev version or if explicitly preferring dist, but you would if using normal stable version constraints. Some testing required obviously to prove these assumptions, but I think this is the best way to deal with this upstream.