Skip to content

Commit 2e77901

Browse files
committed
Leverage str_starts_with(), str_ends_with() and str_contains()
1 parent 7ae279b commit 2e77901

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Internal/ComposerPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function updateAutoloadFile(): void
8484
$projectDir = $fs->makePathRelative($projectDir, $vendorDir);
8585
$nestingLevel = 0;
8686

87-
while (0 === strpos($projectDir, '../')) {
87+
while (str_starts_with($projectDir, '../')) {
8888
++$nestingLevel;
8989
$projectDir = substr($projectDir, 3);
9090
}

0 commit comments

Comments
 (0)