Repository navigation
Conversation
Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
Collaborator
Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Mythos 5.2 <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.
All Submissions:
Changes proposed in this Pull Request:
A set of small changes to how the plugin handles requests, rewrites markup and works with local files.
index.htmland an.htaccess, and the log viewer answers administrators. Existing logs are moved to the new names on the next admin request, or the next time a log is read or written.loading,srcsetandsizesonly where they are attributes of the image tag.phpstan-baseline.neonloses one entry that the logger change made stale.How to test the changes in this Pull Request:
composer phpunitandnpm test.Other information:
Verification
664fea48(592 on the base)composer phpcs,composer phpstan,npm run lintPerformance of the image attribute patterns
Measured on PHP 8.4 with
Optml_Manager::replace_content()on a page of typical lazy-loaded images, median of 25 runs, base branch against this one:That is about 2 µs more per lazy-loaded image with JIT and about 5 µs without. On oversized tags the new pattern stays linear: a tag with 100,000 spaces before its attributes took 2.3 s in the previous
srcset/sizespattern without JIT and takes 0.1 ms now. A tag with more attributes than PCRE's limits allow (above roughly 2,000 with JIT, 12,000 without) is left as written.On a corpus of 22 tag shapes, with native lazy loading off and on, the output is the same as before except where an attribute name appears inside another attribute's value, and in three kinds of unusual markup: a duplicated
loadingattribute (only the first is changed), an upper-caseLOADING(rewritten in place instead of a second attribute being added), andsrcsetwritten with no space before it (removed instead of renamed).Not proven
inc/video_player.phphas no PHPUnit test, because the PHPUnit job does not build the assets it reads..htaccessrules were not exercised on Apache.🤖 Generated with Claude Code