Package wycheproof tests for the PHP ecosystem#109
Conversation
Co-authored-by: Paul Kehrer <paul.l.kehrer@gmail.com>
cpu
left a comment
There was a problem hiding this comment.
@tob-scott-a Is this still something you would be interested in seeing land?
It seems pretty reasonable to me (with the caveat that I have no experience with the PHP or composer ecosystems).
Perhaps once further progress is made on CI we could think of a way to smoketest the composer distribution.
|
Coming back to this with fresh eyes I'm wondering if we should avoid getting into the game of per-language bindings for the test vector data for similar reasons as the ones that motivated avoiding maintaining per-language test harnesses. It's a fair amount of work, it requires per-language expertise to do well (especially over time as technologies like trusted publishers gain adoption), and the number of languages/package publishing houses is somewhat unbounded. Is this something that could comfortably be handled in a 3rd party repo similar to https://github.com/randombit/wycheproof-rs ? Sorry to flip-flop on this. I know the time this has been open hasn't made a great impression w.r.t the contributor experience and I hope we can do better on future PRs. |
|
The composer.json file lets us pull the repo in as a dependency and never need any maintenance or ops overhead. You just do: And you're done. In order for other people to wrap the wycheproof repository, they need to muck with gitsubmodules and the like, which is a bit of a headache. |
I'm convinced there's value to PHP users in having this, I'm just a bit worried it's going to scale poorly when users from other ecosystems want the same thing, or as the inevitable churn upstream creeps in and we have to adapt our side to match.
That's fair, but it's also going to be a bit of a headache to keep up with packagist.org and the composer ecosystem from this side. I'd still like to hear Filippo or someone else weigh in with their thoughts, but ignoring that for the moment maybe the solution here is to ask for help? :-) If we merged this could I count on your best-effort participation over time to keep it working or is this more of a one-and-done thing from your perspective? |
Chatting with Filippo on this subject we're 👍 on merging. I'm going to try to pull out some guidance for CONTRIBUTING.md for the future but the main points are:
|
|
Y'know, that's a great point. We could just drop everything but the composer.json and onboard this repo to Packagist, and then the PHP code that wraps it could be a separate community-owned repo. I'm going to drop the PHP stuff from this PR and simplify the ongoing maintenance story. |
|
This is now a minimum viable pull request for PHP ecosystem support :) |
|
Thank you! If for whatever reason exposing the files from another repo ends up being cumbersome I think we're OK with restoring the very thin PHP bits you had before. I'm likely going to add a small |
|
I think it will be fine. As long as I can pull in |
|
✨ https://packagist.org/packages/c2sp/wycheproof @tob-scott-a Is there a good packagist username for you to use as a maintainer?
I don't think I have the required perms to handle this part. Will follow up on that separately, and until then can boop the update button upon request. |
|
|
|
Ah. I see. When I encounter this normally, it's usually an intermittent issue due to a race condition. But for once, the error is actually correct. Someone with admin access needs to grant the Packagist application access to the C2SP organization so that it can auto-update whenever code is pushed into the main branch. |
|
I think I clicked the right Grant button. |
|
Hmm. I'm still seeing the error after hitting "update" on the packagist page. It links to this doc page that has more detailed instructions in case it's helpful. I can also add you as a maintainer on the packagist side if you confirm your username in case that helps (?) |

This does the absolute minimum to publish Wycheproof to the PHP ecosystem.
After merging this PR, the C2SP maintainers will need to publish this repository to Packagist to make it usable: https://packagist.org/about