Skip to content

Commit

Permalink
Merge pull request #67 from PHPCSStandards/feature/reports-gitblame-f…
Browse files Browse the repository at this point in the history
…ix-fatal-error-subdir-basepath

Gitblame: fix fatal error on `chdir()` when `basepath` is set and phpcs is run from subdir
  • Loading branch information
jrfnl committed Dec 5, 2023
2 parents af7f3c2 + a2667bc commit 66b4b36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ The file documents changes to the PHP_CodeSniffer project.
- Thanks to Dan Wallis (@fredden) for the patch
- Fixed bug #3816 : PSR12/FileHeader: bug fix - false positives on PHP 8.2+ readonly classes
- Thanks to Juliette Reinders Folmer (@jrfnl) for the patch
- Fixed bug #3854 : Fatal error when using Gitblame report in combination with `--basepath` and running from project subdirectory
- Thanks to Juliette Reinders Folmer (@jrfnl) for the patch
- Fixed bug #3867 : Tokenizer/PHP: union type and intersection type operators were not correctly tokenized for static properties without explicit visibility
- Thanks to Juliette Reinders Folmer (@jrfnl) for the patch
- Fixed bug #3877 : Filter names can be case-sensitive. The -h help text will now display the correct case for the available filters
Expand Down
2 changes: 1 addition & 1 deletion src/Reports/VersionControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ abstract class VersionControl implements Report
*/
public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80)
{
$blames = $this->getBlameContent($report['filename']);
$blames = $this->getBlameContent($phpcsFile->getFilename());

$authorCache = [];
$praiseCache = [];
Expand Down

0 comments on commit 66b4b36

Please sign in to comment.