Skip to content

maint: rework PHP error reporting for link tester - #104

Merged
mcdurdin merged 1 commit into
mainfrom
maint/improve-php-tests-add-composer-setup
Sep 15, 2026
Merged

mcdurdin merged 1 commit into
mainfrom
maint/improve-php-tests-add-composer-setup

Conversation

@mcdurdin

@mcdurdin mcdurdin commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

Setup a more reliable PHP error reporting mechanism when running link test. This helps to capture PHP error messages as the link checker hits each page, providing some basic runtime validation of the site.

KeymanSentry.php: With this new test setup, we no longer force pages to exit with 500 errors if any PHP warning or message is encountered (serious errors will still cause a 500 error as is the default). This makes the link checker faster (no retries needed), as all the messages are reported in the do_test_print_container_error_logs function afterwards anyway.

Also add composer setup and teardown functions for manual maintenance of composer packages; these can be run through build.sh on the various sites.

Test-bot: skip
Relates-to: keymanapp/keymanweb.com#209

@keymanapp-test-bot

Copy link
Copy Markdown

User Test Results

Test specification and instructions

User tests are not required

@github-actions github-actions Bot added the maint label Sep 11, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Keyman Sep 11, 2026
@keymanapp-test-bot keymanapp-test-bot Bot added this to the B19S1 milestone Sep 11, 2026
Comment thread _common/docker.inc.sh
return "$LINK_RESULT"
}

#

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These could be split into a separate PR if you think that is warranted.

@mcdurdin
mcdurdin force-pushed the maint/improve-php-tests-add-composer-setup branch 6 times, most recently from 510c1ad to fd8b2ab Compare September 11, 2026 08:17
Comment thread _common/docker.inc.sh
function docker_stop_and_cleanup_composer_container() {
local COMPOSER_ID=composer-temp
# copy modified files to mounted volume:
docker exec $COMPOSER_ID cp composer.lock //var/www/html/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the double slash required?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a cygwin thing. Needed on Windows, otherwise it prepends a Windows path. Works without issue on other platforms as far as I have tested (might be worth testing on your Linux setup)

@keyman-server keyman-server modified the milestones: B19S1, B19S2 Sep 12, 2026
Setup a more reliable PHP error reporting mechanism when running link
test. This helps to capture PHP error messages as the link checker hits
each page, providing some basic runtime validation of the site.

KeymanSentry.php: With this new test setup, we no longer force pages to
exit with 500 errors if any PHP warning or message is encountered
(serious errors will still cause a 500 error as is the default). This
makes the link checker faster (no retries needed), as all the messages
are reported in the do_test_print_container_error_logs function
afterwards anyway.

Also add composer setup and teardown functions for manual maintenance of
composer packages; these can be run through build.sh on the various
sites.

Test-bot: skip
@mcdurdin
mcdurdin force-pushed the maint/improve-php-tests-add-composer-setup branch from fd8b2ab to 7b0361f Compare September 12, 2026 06:02
@mcdurdin
mcdurdin merged commit 72afabb into main Sep 15, 2026
3 checks passed
@mcdurdin
mcdurdin deleted the maint/improve-php-tests-add-composer-setup branch September 15, 2026 06:26
@github-project-automation github-project-automation Bot moved this from Todo to Done in Keyman Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants