mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
refactor: Remove deprecated Config\Format::getFormatter()
(#9405)
* refactor: Remove deprecated `Config\Format::getFormatter()` * docs: Update changelog
This commit is contained in:
parent
5e50f2f6a6
commit
35321ac6c2
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
Loading…
x
Reference in New Issue
Block a user