1. PHPUnit’s HTML code coverage reports don’t play nicely with GitHub pages “main branch /docs folder” by default, as they store CSS, JS and icon assets in folders prefixed with underscores.

    Here’s a little bash script to run tests with code coverage enabled, then move the assets around:

    rm -rf docs/coverage/
    XDEBUG_MODE=coverage  ./vendor/bin/phpunit tests --coverage-filter src --coverage-html docs/coverage
    mv docs/coverage/_css docs/coverage/phpunit_css
    mv docs/coverage/_icons docs/coverage/phpunit_icons
    mv docs/coverage/_js docs/coverage/phpunit_js
    grep -rl _css docs/coverage | xargs sed -i "" -e 's/_css/phpunit_css/g'
    grep -rl _icons docs/coverage | xargs sed -i "" -e 's/_icons/phpunit_icons/g'
    grep -rl _js docs/coverage | xargs sed -i "" -e 's/_js/phpunit_js/g'
    

    That allows you to use GitHub pages to show code coverage reports as well as docs, as I’m doing for taproot/indieauth.

  2. In reply to a post on github.com

    @sandeepshetty @pfefferle cweiske Something new to consider: Jeremy Keith added a webmention sending form to his journal entries to help people who’s websites don’t support webmention already. Being able to test and use webmention through a human visible, interactable form is a huge benefit of using HTTP form encoded data.

    We can make this an even stronger case by encouraging success and error responses to be full HTML documents with helpful copy.

    See also

  3. I just sent a support email to @github making the following request for better 404 pages:

    Your 404 pages are pretty but useless for actually trying to find stuff which is misspelt, moved or gone. Could you consider implementing some of these improvements?

    • Show the github header on the 404 page for consistency
    • If the path is /real-username/missing-project, show the user’s profile and a list of their repos
    • If the path is /missing-username/*, show a search for “missing-username” or at the very least prefill the search box with that text
    • Keep track of projects which have moved and do HTTP redirects to their new locations

    Thanks for all the great work you’ve done and made possible,
    Barnaby

    Archived here for posterity and public commentary.