Skip to content

Commit 1751525

Browse files
committed
refactor: remove deprecations in Services
1 parent cd3013b commit 1751525

File tree

3 files changed

+5
-18
lines changed

3 files changed

+5
-18
lines changed

system/Config/BaseService.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,6 @@ class BaseService
175175
*/
176176
protected static $discovered = false;
177177

178-
/**
179-
* A cache of other service classes we've found.
180-
*
181-
* @var array
182-
*
183-
* @deprecated 4.5.0 No longer used.
184-
*/
185-
protected static $services = [];
186-
187178
/**
188179
* A cache of the names of services classes found.
189180
*

system/Config/Services.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -517,17 +517,10 @@ public static function renderer(?string $viewPath = null, ?ViewConfig $config =
517517
* createRequest() injects IncomingRequest or CLIRequest.
518518
*
519519
* @return CLIRequest|IncomingRequest
520-
*
521-
* @deprecated The parameter $config and $getShared are deprecated.
522520
*/
523-
public static function request(?App $config = null, bool $getShared = true)
521+
public static function request()
524522
{
525-
if ($getShared) {
526-
return static::getSharedInstance('request', $config);
527-
}
528-
529-
// @TODO remove the following code for backward compatibility
530-
return AppServices::incomingrequest($config, $getShared);
523+
return static::getSharedInstance('request');
531524
}
532525

533526
/**

user_guide_src/source/changelogs/v4.8.0.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Method Signature Changes
4343
- The updated method signature is now ``handleRequest(?RouteCollectionInterface $routes, ?Cache $cacheConfig = null)``.
4444
- ``CodeIgniter\CodeIgniter::gatherOutput()`` no longer accepts the deprecated ``$cacheConfig`` parameter.
4545
As this is the first parameter, custom uses of this method will need to be updated to remove the parameter.
46+
- **Config:** ``CodeIgniter\Config\Services::request()`` no longer accepts any parameter.
4647

4748
Removed Deprecated Items
4849
========================
@@ -70,6 +71,8 @@ Removed Deprecated Items
7071
- ``CodeIgniter\CodeIgniter::determinePath()``
7172
- ``CodeIgniter\CodeIgniter::callExit()``
7273
- ``CodeIgniter\Test\MockCodeIgniter::callExit()``
74+
- **Config:** Removed the following property deprecated:
75+
- ``CodeIgniter\Config\BaseService::$services`` (deprecated since v4.5.0)
7376
- **Debug:** Removed the following properties and methods deprecated since v4.4.0:
7477
- ``CodeIgniter\Debug\Exceptions::$ob_level``
7578
- ``CodeIgniter\Debug\Exceptions::$viewPath``

0 commit comments

Comments
 (0)