Skip to content

Commit

Permalink
Update Deprecation.php
Browse files Browse the repository at this point in the history
  • Loading branch information
raziel057 authored Aug 31, 2023
1 parent bdaa697 commit 5e91141
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Doctrine/Deprecations/Deprecation.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public static function triggerIfCalledFromOutside(string $package, string $link,

// first check that the caller is not from a tests folder, in which case we always let deprecations pass
if (isset($backtrace[1]['file'], $backtrace[0]['file']) && strpos($backtrace[1]['file'], DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR) === false) {
$path = DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . $package . DIRECTORY_SEPARATOR;
$path = DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . str_replace("/", DIRECTORY_SEPARATOR, $package) . DIRECTORY_SEPARATOR;

Check failure on line 141 in lib/Doctrine/Deprecations/Deprecation.php

View workflow job for this annotation

GitHub Actions / coding-standards / Coding Standards (8.1)

Function str_replace() should not be referenced via a fallback global name, but via a use statement.

Check failure on line 141 in lib/Doctrine/Deprecations/Deprecation.php

View workflow job for this annotation

GitHub Actions / coding-standards / Coding Standards (8.1)

String "/" does not require double quotes; use single quotes instead

if (strpos($backtrace[0]['file'], $path) === false) {
return;
Expand Down

0 comments on commit 5e91141

Please sign in to comment.