Missing composer datatables.net-bs5
Missing composer datatables.net-bs5
VirginiaFV
Posts: 1Questions: 1Answers: 0
With this config on composer.json:
{
"require" : {
"twbs/bootstrap": "^5.0",
"datatables.net/datatables.net-bs5": "^1.11.3",
"datatables.net/datatables.net-rowgroup-bs5": "^1.1.3"
},
"prefer-stable": true
}
Error messages shown:
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires datatables.net/datatables.net-bs5, it could not be found in any version, there may be a typo in the package name.
Problem 2
- Root composer.json requires datatables.net/datatables.net-rowgroup-bs5, it could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
- It's a private package and you forgot to add a custom repository to find it
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Description of problem:
It appears that the datatables.net-bs5 package is not published against Packagist. As a result, composer isn't able to find it.
- Repositories: https://github.com/DataTables/Dist-DataTables-Bootstrap5 | https://github.com/DataTables/Dist-DataTables-RowGroup-Bootstrap5
- Expected Packagist URL: datatables.net/datatables.net-bs5 | datatables.net/datatables.net-rowgroup-bs5
Answers
Thanks for letting me know about that. That's our Bootstrap 5 and Bulma styling packages published on Packagist now.
Allan
The problem is that the GitHub repo doesn't have any releases (https://github.com/DataTables/Dist-DataTables-Bootstrap5/releases). It looks like whatever deployment automation is managing these is creating tags instead (https://github.com/DataTables/Dist-DataTables-Bootstrap5/tags), but Packagist matches to releases. You'll notice on the Packagist page (https://packagist.org/packages/datatables.net/datatables.net-bs5) that there are no release, only
dev-master
.You can work around this by referencing the repository (see https://getcomposer.org/doc/05-repositories.md#loading-a-package-from-a-vcs-repository) but the maintainers ( @allan ) should really resolve this by creating actual releases.
Darn it - I thought a semver tag was enough, but apparently not. Many thanks for pointing that out - I'll update our scripts.
Allan
Thanks Allan - any update on this? I still see no Releases posted. If you want help creating releases of past tags I'd be happy to assist with the "data entry" aspect if we can work out a temporary access arrangement.
Edit just in case: I'm a real person doing OSS stuff, http://github.com/mgatner
I have actually issued the releases on Github.
It looks like the error might be that the 1.11.3 tag has an incorrect version in the composer.json file. Which probably means we need to do a release to address this.
Hopefully we'll be able to wrap a few other things up and then get this rolled out.
And double hopefully, that is all that is needed .
Allan
It's probably more than that, unfortunately.
I think the real issue is that Composer expects versions (I think this works for Tags or Releases) to have the "v" prefix. You can read more here (https://getcomposer.org/doc/articles/versions.md) but
1.11.3
andv1.11.3
are not treated the same.This issue compounds across repos. For example, "datatables.net/datatables.net-bs5" has the main distribution included as a requirement in composer.json:
...but because those tags aren't detected as releases either the bs5 library will not install until those are fixed at https://github.com/DataTables/Dist-DataTables
Again, glad to help with the nitty-gritty of this if you want - we can hop on Discord or Slack or Gitter, somewhere more conducive to hashing out solutions.
Aside, Composer is a fan of the carat version range (https://getcomposer.org/doc/articles/versions.md#caret-version-range-) which I would recommend for these repos.
I've just released Select 1.3.4 and hopefully composer will be able to pick that up. I'll loop back later in the day to check.
Hopefully the
v
is optional since we depend on not having that for other package managers such as npm, and doing two tags / releases for a single version seems redundant.Allan
Select
was not picked up by Composer either: https://packagist.org/packages/datatables.net/datatables.net-selectI believe you will need to add the "v" prefix if you want this to work with Composer. Right now these versions are unusable.
Interesting discussion here and also from the composer docs. It appears that Composer itself doesn't care about the
v
prefix, but Packagist does. I need to read up some more about this I'm afraid. I'm very reluctant to tag each release twice - once with av
prefix, once without.Allan
Hi @allan ,
I've noticed that the DataTables/Dist-DataTables-Bootstrap5 guthub repository has continued evolving, but there is still only one release 1.11.3.
I'm not sure this is correct.
It's not - thanks for pointing that out! I'll get it fixed alongside the 1.13.3 release which is up coming.
Allan