Skip to content

Commit 35321ac

Browse files
authored
refactor: Remove deprecated Config\Format::getFormatter() (#9405)
* refactor: Remove deprecated `Config\Format::getFormatter()` * docs: Update changelog
1 parent 5e50f2f commit 35321ac

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

app/Config/Format.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Config;
44

55
use CodeIgniter\Config\BaseConfig;
6-
use CodeIgniter\Format\FormatterInterface;
76
use CodeIgniter\Format\JSONFormatter;
87
use CodeIgniter\Format\XMLFormatter;
98

@@ -62,16 +61,4 @@ class Format extends BaseConfig
6261
'application/xml' => 0,
6362
'text/xml' => 0,
6463
];
65-
66-
/**
67-
* A Factory method to return the appropriate formatter for the given mime type.
68-
*
69-
* @return FormatterInterface
70-
*
71-
* @deprecated This is an alias of `\CodeIgniter\Format\Format::getFormatter`. Use that instead.
72-
*/
73-
public function getFormatter(string $mime)
74-
{
75-
return service('format')->getFormatter($mime);
76-
}
7764
}

user_guide_src/source/changelogs/v4.6.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ Removed Deprecated Items
202202
- **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.
203203
- **View:** The deprecated property ``CodeIgniter\View\View::$currentSection`` has been removed.
204204
- **Config:** The deprecated property ``Config\Cache::$storePath`` has been removed. Use ``Config\Cache::$file['storePath']`` instead.
205+
- **Formatter:** The deprecated ``Config\Format::getFormatter()`` has been removed. Use ``CodeIgniter\Format\Format::getFormatter()`` instead.
205206

206207
************
207208
Enhancements

user_guide_src/source/installation/upgrade_460.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,4 +223,5 @@ many will be simple comments or formatting that have no effect on the runtime:
223223

224224
- app/Config/Feature.php
225225
- app/Config/Constants.php
226-
- app/Config/Cache.php
226+
- app/Config/Cache.php
227+
- app/Config/Format.php

0 commit comments

Comments
 (0)