Skip to content

Conversation

michaelcontento
Copy link
Contributor

This PR adds the missing doesntContain() method to the Stringable class to provide symmetry with the existing contains() method.

Changes

  • Add Stringable::doesntContain($needles, $ignoreCase = false) method
  • Method proxies to existing Str::doesntContain() implementation
  • Add tests for the new method

Motivation

Currently, Stringable has a contains() method but lacks the corresponding doesntContain() method, while Str has both. This creates an API inconsistency where developers expect both methods to be available in the fluent interface.

This adds the missing doesntContain() method to the Stringable class
to provide symmetry with the contains() method. The method proxies to
the existing Str::doesntContain() implementation.
Tests cover all parameter combinations including arrays, collections,
case sensitivity, and edge cases. All tests pass successfully.
@taylorotwell taylorotwell merged commit 92ea383 into laravel:12.x Oct 6, 2025
66 checks passed
@michaelcontento michaelcontento deleted the add-stringable-doesnt-contain branch October 6, 2025 17:27
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