refactor: Remove deprecated Config\Format::getFormatter() (#9405)

* refactor: Remove deprecated `Config\Format::getFormatter()`

* docs: Update changelog
This commit is contained in:
neznaika0 2025-01-13 09:59:49 +03:00 committed by GitHub
parent 5e50f2f6a6
commit 35321ac6c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 14 deletions

View File

@ -3,7 +3,6 @@
namespace Config;
use CodeIgniter\Config\BaseConfig;
use CodeIgniter\Format\FormatterInterface;
use CodeIgniter\Format\JSONFormatter;
use CodeIgniter\Format\XMLFormatter;
@ -62,16 +61,4 @@ class Format extends BaseConfig
'application/xml' => 0,
'text/xml' => 0,
];
/**
* A Factory method to return the appropriate formatter for the given mime type.
*
* @return FormatterInterface
*
* @deprecated This is an alias of `\CodeIgniter\Format\Format::getFormatter`. Use that instead.
*/
public function getFormatter(string $mime)
{
return service('format')->getFormatter($mime);
}
}

View File

@ -202,6 +202,7 @@ Removed Deprecated Items
- **Constants:** The deprecated constants ``EVENT_PRIORITY_*`` in has been removed. Use the class constants ``CodeIgniter\Events\Events::PRIORITY_LOW``, ``CodeIgniter\Events\Events::PRIORITY_NORMAL`` and ``CodeIgniter\Events\Events::PRIORITY_HIGH`` instead.
- **View:** The deprecated property ``CodeIgniter\View\View::$currentSection`` has been removed.
- **Config:** The deprecated property ``Config\Cache::$storePath`` has been removed. Use ``Config\Cache::$file['storePath']`` instead.
- **Formatter:** The deprecated ``Config\Format::getFormatter()`` has been removed. Use ``CodeIgniter\Format\Format::getFormatter()`` instead.
************
Enhancements

View File

@ -223,4 +223,5 @@ many will be simple comments or formatting that have no effect on the runtime:
- app/Config/Feature.php
- app/Config/Constants.php
- app/Config/Cache.php
- app/Config/Cache.php
- app/Config/Format.php