Problem/Motivation
In Drupal core, strpos() which compares with FALSE or 0 is already replaced in #3324560: Replace strpos/substr with str_starts_with() / str_contains() / str_ends_with(). Now str_contains() and str_starts_with() can use since PHP 8 so module supporting Drupal 10+ can replace these code.
Proposed resolution
strpos($a, $b) compares with FALSE or 0 replace like following list if possible.
strpos($a, $b) !== FALSEreplace withstr_contains($a, $b)strpos($a, $b) === FALSEreplace with!str_contains($a, $b)strpos($a, $b) === 0replace withstr_starts_with($a, $b)strpos($a, $b) !== 0replace with!str_starts_with($a, $b)
Remaining tasks
TBD
User interface changes
API changes
Data model changes
Issue fork webform-3524067
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
tom kondaComment #4
jrockowitz commented@tom konda You earned yourself a commit credit
Comment #6
jrockowitz commented