Skip to content

Commit 7c191ea

Browse files
committed
bug #1000 fix: Replace str_starts_with by strncmp (PHP7 compatibility) (PROFeNoM)
This PR was merged into the 1.x branch. Discussion ---------- fix: Replace str_starts_with by strncmp (PHP7 compatibility) Hi 👋 The [v1.21.0](https://github.com/symfony/flex/releases/tag/v1.21.0) tag release made a few hours ago started breaking compatibility with PHP7 because of the use of `str_starts_with`. This PR replaces `str_starts_with` by `strncmp`, as suggested by the [rfc](https://wiki.php.net/rfc/add_str_starts_with_and_ends_with_functions) 😃 Commits ------- 07e35fa fix: Replace str_starts_with by strncmp (PHP7 compatibility)
2 parents 5529871 + 07e35fa commit 7c191ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Configurator/DockerComposeConfigurator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ private function normalizeConfig(array $config): array
151151
return ['compose.yaml' => $config];
152152
}
153153

154-
if (!str_starts_with($key, 'docker-')) {
154+
if (strncmp($key, 'docker-', 7)) {
155155
continue;
156156
}
157157

0 commit comments

Comments
 (0)