Skip to content

Commit

Permalink
Fix psr autoloading outside configured directory
Browse files Browse the repository at this point in the history
  • Loading branch information
kelunik committed Jan 9, 2021
1 parent 3f1ca81 commit 8474609
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Fixer/Basic/PsrAutoloadingFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ protected function createConfigurationDefinition()
*/
protected function applyFix(\SplFileInfo $file, Tokens $tokens)
{
if (null !== $this->configuration['dir'] && 0 !== \strpos($file->getRealPath(), \realpath($this->configuration['dir']))) {
return;
}

$namespace = null;
$namespaceStartIndex = null;
$namespaceEndIndex = null;
Expand Down

0 comments on commit 8474609

Please sign in to comment.