Repository navigation
Incorporate pocketarc 3.4.5: highlight_code() on PHP 8.3+, JSON MIME - #20
Merged
Merged
Conversation
highlight_code() only stripped its internally appended "?>" from the pre-8.3 highlight_string() markup. On PHP 8.3+ (<pre><code> output) the tag was left in place, so every query shown by the profiler ended in a stray "?>". The regex now matches both formats; the pre-8.3 branch is the original pattern, so older output is unchanged (pocketarc PR bcit-ci#54, issue bcit-ci#51). The test that asserted the duplicated tag is corrected, and a no-PHP-tags case (the profiler's input) is added. Accept text/plain for .json uploads in the template mimes.php, as finfo on Windows detects JSON that way (pocketarc PR bcit-ci#58, issue bcit-ci#57). Existing applications keep their own mimes.php and are unaffected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Status updated to applied in 75e7411; PHP 8.6 test infrastructure recorded as deferred until PHP 8.6 is released. 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.
Incorporates the outstanding items from pocketarc/codeigniter 3.4.5. Full review:
docs/todo/archive/pocketarc-3.4.5-incorporation.md.Changes
highlight_code()on PHP 8.3+ (pocketarc PR csrf with encrypted cookie bcit-ci/CodeIgniter#54, issue Additional options for captcha_helper bcit-ci/CodeIgniter#51). PHP 8.3 changedhighlight_string()output to<pre><code>, and the cleanup regex only matched the old format. Every query shown by the profiler ended with a stray?>. The regex now matches both formats. The first alternative is the original pattern, so output on PHP < 8.3 is unchanged.?> ?>and is corrected. A no-PHP-tags case (the profiler's actual input) is added.text/plainaccepted for.jsonuploads (pocketarc PR Autoload drivers bcit-ci/CodeIgniter#58, issue The insert() method in "Cart" class doesn't suport UTF-8 in products names bcit-ci/CodeIgniter#57).finfoon Windows detects JSON astext/plain. The change is in the templateapplication/config/mimes.phponly, so existing applications keep their own copy and are unaffected. Upload test assertions added.docs/todo/archive/.Not included
create_sid(), thexml_parser_free()guards, theupdateTimestamptypo and the.gitignoreentry. Already present in this fork.tests/patch-vendor.php(pocketarc PR _compile_session_data() is not "private" in Profiler bcit-ci/CodeIgniter#56). Deferred until PHP 8.6 is released. These are test files only; nothing undersystem/.CI_VERSION. pocketarc's 3.4.x numbering does not apply here. The fork's own3.1.13-devlagging the3.1.23tag is recorded in the review as a separate decision.Testing
test_highlight_codeandtest_is_allowed_filetypepass.Calendar_test::test_generate. The same failure occurs ondevelopwithout these changes.Text_helper_teston its own errors intest_highlight_phrase(UTF8_ENABLEDundefined). That happens without these changes too, and does not occur in the full suite.🤖 Generated with Claude Code