Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
stefan-korn opened this issue Feb 1, 2024 · 6 comments

Comments

@stefan-korn
Copy link
Contributor

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
Copy link
Member

dafeder commented Apr 5, 2024

@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
Copy link
Contributor Author

@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
Copy link
Member

dafeder commented Apr 8, 2024

@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.

@dafeder
Copy link
Member

dafeder commented Jul 25, 2024

Have done some more research, and I'm really not finding an acceptable way to do this to the source tarball in github.

I don't want to add this as a composer suggestion because on testing I'm noticing the info-rewrite package has not been updated to work with PHP >8.2 and throws deprecation warnings; there hasn't been any activity in the repo in 3 years and it may be abandoned?

We really would like to move to releasing on drupal.org over the next year which would solve this problem. For now people are free to add info-rewrite to their projects. Would consider adding a note temporarily to the docs if you want to submit a PR there.

@dafeder dafeder closed this as completed Jul 25, 2024
@dafeder
Copy link
Member

dafeder commented Jul 25, 2024

Test

@dafeder dafeder closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2024
@stefan-korn
Copy link
Contributor Author

sounds good:

We really would like to move to releasing on drupal.org over the next year which would solve this problem

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

No branches or pull requests

2 participants