Skip to content

Commit

Permalink
Fix: Use of CodeIgniter\Config\Services prevents Service overriding
Browse files Browse the repository at this point in the history
See #2376

The following statement is used by multiple "core" classes

`use CodeIgniter\Config\Services;`

This results in `App\Config\Services` being bypassed.

All namespace use statements for `Services` in the core classes changed to ` use Config\Services;` so the overrides can be accomplished.
  • Loading branch information
dafriend committed Nov 2, 2019
1 parent c20b7d7 commit 0967ea7
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion system/CLI/CommandRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

namespace CodeIgniter\CLI;

use CodeIgniter\Config\Services;
use Config\Services;
use CodeIgniter\Controller;

/**
Expand Down
2 changes: 1 addition & 1 deletion system/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

namespace CodeIgniter;

use CodeIgniter\Config\Services;
use Config\Services;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use CodeIgniter\Validation\Validation;
Expand Down
2 changes: 1 addition & 1 deletion system/Debug/Toolbar/Collectors/Events.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

namespace CodeIgniter\Debug\Toolbar\Collectors;

use CodeIgniter\Config\Services;
use Config\Services;
use CodeIgniter\View\RendererInterface;

/**
Expand Down
2 changes: 1 addition & 1 deletion system/Debug/Toolbar/Collectors/Logs.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

namespace CodeIgniter\Debug\Toolbar\Collectors;

use CodeIgniter\Config\Services;
use Config\Services;

/**
* Loags collector
Expand Down
2 changes: 1 addition & 1 deletion system/Debug/Toolbar/Collectors/Routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

namespace CodeIgniter\Debug\Toolbar\Collectors;

use CodeIgniter\Config\Services;
use Config\Services;

/**
* Routes collector
Expand Down
2 changes: 1 addition & 1 deletion system/Debug/Toolbar/Collectors/Timers.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

namespace CodeIgniter\Debug\Toolbar\Collectors;

use CodeIgniter\Config\Services;
use Config\Services;

/**
* Timers collector
Expand Down
2 changes: 1 addition & 1 deletion system/Debug/Toolbar/Collectors/Views.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

namespace CodeIgniter\Debug\Toolbar\Collectors;

use CodeIgniter\Config\Services;
use Config\Services;
use CodeIgniter\View\RendererInterface;

/**
Expand Down
2 changes: 1 addition & 1 deletion system/Encryption/Encryption.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
use Config\Encryption as EncryptionConfig;
use CodeIgniter\Encryption\Exceptions\EncryptionException;
use CodeIgniter\Config\BaseConfig;
use CodeIgniter\Config\Services;
use Config\Services;

/**
* CodeIgniter Encryption Manager
Expand Down
2 changes: 1 addition & 1 deletion system/HTTP/IncomingRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
use CodeIgniter\HTTP\Exceptions\HTTPException;
use CodeIgniter\HTTP\Files\FileCollection;
use CodeIgniter\HTTP\Files\UploadedFile;
use CodeIgniter\Config\Services;
use Config\Services;

/**
* Class IncomingRequest
Expand Down
2 changes: 1 addition & 1 deletion system/Language/Language.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

namespace CodeIgniter\Language;

use CodeIgniter\Config\Services;
use Config\Services;

/**
* Handle system messages and localization.
Expand Down
2 changes: 1 addition & 1 deletion system/Log/Handlers/ChromeLoggerHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

use CodeIgniter\Events\Events;
use CodeIgniter\HTTP\ResponseInterface;
use CodeIgniter\Config\Services;
use Config\Services;

/**
* Class ChromeLoggerHandler
Expand Down

0 comments on commit 0967ea7

Please sign in to comment.