-
Notifications
You must be signed in to change notification settings - Fork 291
Develop #203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop #203
Conversation
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](actions/cache@v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/github-script](https://github.com/actions/github-script) from 7 to 8. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](actions/github-script@v7...v8) --- updated-dependencies: - dependency-name: actions/github-script dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
….0 || ^9.0 || ^10.0 to ^10.6.0 --- updated-dependencies: - dependency-name: orchestra/testbench dependency-version: 10.6.0 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com>
…evelop/actions/cache-4 ci(deps): bump actions/cache from 3 to 4
…evelop/actions/checkout-5 ci(deps): bump actions/checkout from 4 to 5
…/orchestra/testbench-tw-10.6.0 chore(deps)(deps-dev): update orchestra/testbench requirement from ^8.0 || ^9.0 || ^10.0 to ^10.6.0
…evelop/actions/github-script-8 ci(deps): bump actions/github-script from 7 to 8
- Refactored to extract URLs only from HTML resource attributes - No longer extracts URLs from JSON-LD structured data - No longer extracts URLs from JavaScript code - Added tests for JSON-LD and JavaScript edge cases - Fixes #179 - DNS prefetch incorrectly parsing JSON schema - All 45 tests passing with 199 assertions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the Laravel PageSpeed middleware to handle edge cases in DNS prefetching and comment removal, while updating dependencies and CI workflows. The changes focus on fixing issues with large HTML documents and preventing DNS prefetch from extracting URLs from JavaScript/JSON-LD content.
Key changes:
- Added error handling for PCRE operations to prevent blank pages on large HTML documents
- Refactored DNS prefetch logic to only extract URLs from HTML attributes, not script content
- Updated GitHub Actions workflows and test dependencies to newer versions
Reviewed Changes
Copilot reviewed 8 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/Middleware/PageSpeed.php |
Added PCRE error checking to prevent returning null on regex failures with large content |
src/Middleware/InsertDNSPrefetch.php |
Refactored URL extraction to target specific HTML attributes instead of generic URL pattern matching |
tests/Middleware/LargeHtmlTest.php |
Added comprehensive tests for comment removal in large HTML documents |
tests/Middleware/InsertDNSPrefetchTest.php |
Added tests verifying DNS prefetch ignores URLs in JSON-LD and JavaScript content |
composer.json |
Updated orchestra/testbench to specific version ^10.6.0 |
.github/workflows/tests.yml |
Updated actions/checkout from v4 to v5 |
.github/workflows/pull-request.yml |
Updated actions/checkout, actions/cache, and actions/github-script to newer versions |
.github/workflows/code-quality.yml |
Updated actions/checkout from v4 to v5 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🔍 Pull Request Validation Results
Automated validation by GitHub Actions |
Description
Describe your changes in detail.
Motivation and context
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here (if you write
fixes #numor
closes #num, the issue will be automatically closed when the pull is accepted.)How has this been tested?
Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc.
Screenshots (if appropriate)
Types of changes
What types of changes does your code introduce? Put an
xin all the boxes that apply:Checklist:
Go over all the following points, and put an
xin all the boxes that apply.Please, please, please, don't send your pull request until all of the boxes are ticked. Once your pull request is created, it will trigger a build on our continuous integration server to make sure your tests and code style pass.
If you're unsure about any of these, don't hesitate to ask. We're here to help!