Skip to content

Conversation

@AlwinGarside
Copy link
Contributor

No description provided.

Copy link
Contributor

Copilot AI left a 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 introduces a new preg_escape() function that escapes PCRE delimiter characters in regular expression patterns, making it easier to safely use delimiters in PHP's PCRE functions.

Key changes:

  • Implements preg_escape() function with comprehensive delimiter validation and escaping logic
  • Adds extensive test coverage including edge cases and error conditions
  • Updates documentation and autoload configuration

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/pcre.php New file implementing the preg_escape() function with delimiter validation and escaping logic using a regex pattern to match unescaped delimiters
tests/Unit/pcreTest.php Comprehensive test suite covering valid delimiters, error conditions, and edge cases for the new function
composer.json Adds src/pcre.php to the autoload files array in alphabetical order
README.md Documents the new PCRE Functions section with a link to the preg_escape() function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AlwinGarside AlwinGarside force-pushed the feature/new-preg-escape-function branch from c597a2a to aaca777 Compare December 20, 2025 19:53
@AlwinGarside AlwinGarside merged commit dbaed18 into main Dec 20, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants