Skip to content

refactor: remove deprecated Logger::cleanFilenames() and TestLogger::cleanup() #8843

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions system/Log/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -410,19 +410,4 @@ public function determineFile(): array
'unknown',
];
}

/**
* Cleans the paths of filenames by replacing APPPATH, SYSTEMPATH, FCPATH
* with the actual var. i.e.
*
* /var/www/site/app/Controllers/Home.php
* becomes:
* APPPATH/Controllers/Home.php
*
* @deprecated Use dedicated `clean_path()` function.
*/
protected function cleanFileNames(string $file): string
{
return clean_path($file);
}
}
14 changes: 0 additions & 14 deletions system/Test/TestLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,4 @@ public static function didLog(string $level, $message, bool $useExactComparison

return false;
}

/**
* Expose filenames.
*
* @param string $file
*
* @return string
*
* @deprecated No longer needed as underlying protected method is also deprecated.
*/
public function cleanup($file)
{
return clean_path($file);
}
}
3 changes: 3 additions & 0 deletions user_guide_src/source/changelogs/v4.6.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ Removed Deprecated Items
has been removed. Use ``failValidationErrors()`` instead.
- **HTTP:** The deprecated ``getReason()`` method in ``CodeIgniter\HTTP\Response``
and ``ResponseInterface`` has been removed. Use ``getReasonPhrase()`` instead.
- **Logger:** The deprecated ``CodeIgniter\Log\Logger::cleanFilenames()`` and
``CodeIgniter\Test\TestLogger::cleanup()`` have been removed. Use the
``clean_path()`` function instead.

************
Enhancements
Expand Down
Loading