Repository navigation
Fix validation findings - #12
Merged
Merged
Conversation
- Move the ACP permission labels into the language file (the one valdeny): listener formats ACL_U_DOCUMENTATION_LANG/_SECTION. - Skip build directories whose names can't become ACL options (charset, 50-char auth_option limit, lang_ sections), and list them in the ACP. - Default the docs build path to store/phpbbmodders_documentation via a new migration; boards with a build at the old default keep it. - Set the language cookie with $user->set_cookie(), use login_box() for guests, inject the language service, guard getimagesize() by size instead of @, read the image page parameter as multibyte. - Cache section and docs-root lookups per request; explicit nullable parameters for PHP 8.4. - Escape build-derived values in templates; public static and & in the notification type; tabs and braces in the JavaScript. - Cap phpBB at 3.3.x (soft-require and is_enableable), match the skeleton license, consistent array syntax. - Regression tests for each fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the findings from a validation pass run against the phpBB.com validation policy and coding guidelines.
The deny finding
ACL_U_DOCUMENTATION_LANGandACL_U_DOCUMENTATION_SECTIONin the language file.Behavior changes
store/phpbbmodders_documentation. The old default sat inside the extension's own folder, which is deleted when the extension is updated. phpBB's own deny rules already coverstore/. New migrationm7_store_docs_pathswitches the setting only if it is still the old default and no build exists there, so working boards keep their path.[a-z0-9_-], fit phpBB's 50-characterauth_optioncolumn, and a section can't start withlang_(it would share a permission name with a language). Skipped names are listed on the ACP settings page.login_box()instead of a hand-built redirect.$user->set_cookie(), so it follows the board's cookie settings. The cookie name changes to<cookie_name>_docs_lang.extra.soft-requireis now>=3.3.19,<4.0.0@dev,phpbb/phpbbis removed fromrequire, andis_enableable()checks the same range.Cleanups
@getimagesize(). The imagepageparameter is now read as multibyte.?array), which PHP 8.4 requires to avoid deprecation notices.public staticand&in its URL.license.txtnow matches the skeleton's.docs/securing-docs-build.mdand thecontrib/snippets are updated for the new path.Testing
Claude added regression tests for each fix (104 → 116 tests) and ran them in Docker on PHP 8.2 and 8.4, with none skipped. Claude also ran the phpbb-release-tools smoke and feature checks on a 3.3.19 board. The feature checks need phpbbmodders/phpbb-release-tools branch
documentation-configured-build-path, because the old check hardcoded the previous build path. EPV gives the same result as onmain: 0 errors and 6 warnings, none new. Claude did not run this on phpBB 4.0.Investigated and written by Claude on behalf of William Jacoby (bonelifer).