#microformats 2026-11-09

2026-11-09 UTC
thatoddshade, rMdes, barnaby, strugee and [pfefferle] joined the channel
#
[pfefferle]
[tantek] I thought about our last chat about the side-files and experimented a bit: https://github.com/indieweb/wordpress-mf2-feed/pull/36
[Murray], barnaby, [KevinMarks] and rMdes joined the channel
#
[tantek]
looks great [pfefferle]++
#
[tantek]
added one further suggestion (as another potential PR), and also added GWG and [snarfed] as reviewers since they are more familiar with WordPress details
barnaby, [aciccarello] and [artlung] joined the channel
#
gRegor
jtojnar, I'm not opposed to the mock server. No experience with that one myself, would appreciate any other parser devs input: https://github.com/microformats/php-mf2/pull/281 Zegnat, [pfefferle], GWG, jkingweb, any others
#
jkingweb
It's what I use, for what it's worth. It's a library which starts and stops the basic built-in PHP server on-demand. It certainly beats relying on an external resource not changing, and it adds no added dependencies since it's just using what's built in PHP. The library does require the sockets PHP extension, but this is only required if you're not specifying a port number for the server.
#
gRegor
awesome, thx!
emery and [Leo] joined the channel
#
Zegnat
Interesting. In one of my current projects I fake the HTTP request through dependency injection instead, requires no separate processes: https://github.com/Zegnat/php-webmention-endpoint-discovery/blob/main/tests/FakeHttp.php - I think you could do something similar in php-mf2 with https://github.com/php-mock/php-mock-phpunit to override curl.
#
Zegnat
But as long as it is still easy to run the tests, the mock server will work just as well. But I do not think ext-sockets is enabled by default in PHP, is it? What does the test result in when it is not enabled? Will it mark the test as skipped per PHPUnit, fail it, or do something else?
#
jkingweb
Unfortunately it's a hard dependency in composer.json, so `composer install` will fail before you even get to running the tests. For my application I got around by adding provides:ext-sockets, but a library can't do that (because there is no provides-dev section in the Composer schema). I'll need to figure out a workaround (or use something else) soon, though, as I'll shortly be facing the same problem.
cobbland and [pcarrier_com] joined the channel
#
[pfefferle]
these are two very small wrappers for curl… I think a mock server to simply test a GET request is a bit overkill!? aside from that, I would prefer the build in PHP server over the mock server. this is less dependencies…
#
[pfefferle]
but I generally agree that we should not test live data…
#
[pfefferle]
maybe we could use github pages… if github is down, the tests won’t work either 😉
#
gRegor
I did update the one test to use microformats.org
#
gRegor
but agree we shouldn't use other sites, even if they're part of our team
Kaja joined the channel
#
[aciccarello]
I have some tests for omnibear that run against the webmention.rocks test suite
#
Zegnat
I just pulled all the webmention.rocks tests I wanted to run against as vendored data within my repo, hehe
#
Zegnat
My biggest concern is honestly not with whether this is using sockets, or starting an instance of the build in PHP server, or whatever. But if I understand jkingweb correctly and this would block install unless the ext-socket module is loaded, that would be annoying to me.
#
aaronpk
isn't there a way to say a dependency is only needed for dev? at least that would be less bad
#
aaronpk
still seems weird to require ext-socket at all for this tho
#
gRegor
yeah require-dev in composer
#
[pfefferle]
You can require only for dev
#
gRegor
php-mock looks nice at a glance