Skip to content

Leverage PHP 8.0 string functions #1274

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

Merged
merged 1 commit into from
Apr 9, 2024
Merged

Conversation

GromNaN
Copy link
Member

@GromNaN GromNaN commented Apr 8, 2024

We use symfony/php80-polyfill that provides str_starts_with, str_ends_with and str_contains.

@GromNaN GromNaN requested a review from a team as a code owner April 8, 2024 10:26
@GromNaN GromNaN requested a review from jmikola April 8, 2024 10:26
@@ -2,7 +2,7 @@

function getHosts(string $uri): array
{
if (strpos($uri, '://') === false) {
if (!str_contains($uri, '://')) {
Copy link
Member Author

@GromNaN GromNaN Apr 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This files doesn't include composer autoload. I've reverted this change.

@GromNaN GromNaN merged commit 5c147fd into mongodb:master Apr 9, 2024
@GromNaN GromNaN deleted the str_starts_with branch April 9, 2024 14:41
alcaeus added a commit that referenced this pull request May 21, 2024
* v1.19:
  DOCSP-37027: Fix build errors (#1289)
  PHPLIB-1415 Add tests for PHP 8.4 (#1287)
  PHPLIB-1163 Create tutorial for using MongoDB with Bref (#1273)
  Relax branch-alias on dev-master to avoid update on each release (#1277)
  PHPLIB-1424: Fix potentially racy w:0 unified tests (#1276)
  Leverage PHP 8.0 string functions (#1274)
  Master is now 1.19-dev
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