Skip to content

Improve code quality: fix bugs, add type safety, and harden tests#595

Open
JayBizzle wants to merge 1 commit intomasterfrom
updates
Open

Improve code quality: fix bugs, add type safety, and harden tests#595
JayBizzle wants to merge 1 commit intomasterfrom
updates

Conversation

@JayBizzle
Copy link
Copy Markdown
Owner

  • Fix null concatenation deprecation in setUserAgent (PHP 8.1+)
  • Fix MSIE exclusion pattern missing * quantifier
  • Reset matches at top of isCrawler() for reliable state
  • Add preg error handling in isCrawler()
  • Make compileRegex() protected (internal API)
  • Add return type declarations to all methods
  • Add parameter type hints throughout
  • Use setUp() in tests, fix property visibility/naming
  • Fix typo in test method name (persit -> persist)
  • Optimize collision test from O(n²) to O(n²/2)
  • Add tests for regex validity and stored agent immutability

- Fix null concatenation deprecation in setUserAgent (PHP 8.1+)
- Fix MSIE exclusion pattern missing * quantifier
- Reset matches at top of isCrawler() for reliable state
- Add preg error handling in isCrawler()
- Make compileRegex() protected (internal API)
- Add return type declarations to all methods
- Add parameter type hints throughout
- Use setUp() in tests, fix property visibility/naming
- Fix typo in test method name (persit -> persist)
- Optimize collision test from O(n²) to O(n²/2)
- Add tests for regex validity and stored agent immutability
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.

1 participant