-
Notifications
You must be signed in to change notification settings - Fork 2k
fix: incorrect type declarations #5909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0a48e6a
df987a3
8a7113f
ac93fe4
98f778e
c470d25
0ffc993
fed3b85
03ba268
f89f42a
ba5cf95
168b66c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,7 +44,6 @@ | |
| use CodeIgniter\Log\Logger; | ||
| use CodeIgniter\Pager\Pager; | ||
| use CodeIgniter\Router\RouteCollection; | ||
| use CodeIgniter\Router\RouteCollectionInterface; | ||
| use CodeIgniter\Router\Router; | ||
| use CodeIgniter\Security\Security; | ||
| use CodeIgniter\Session\Handlers\Database\MySQLiHandler; | ||
|
|
@@ -597,7 +596,7 @@ public static function routes(bool $getShared = true) | |
| * | ||
| * @return Router | ||
| */ | ||
| public static function router(?RouteCollectionInterface $routes = null, ?Request $request = null, bool $getShared = true) | ||
| public static function router(?RouteCollection $routes = null, ?Request $request = null, bool $getShared = true) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This makes it more difficult for people to pass their own classes that implement the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The current Router does not depend on If a user creates their own
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lonnieezell can we pick this discussion back up?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then maybe change the Router class? |
||
| { | ||
| if ($getShared) { | ||
| return static::getSharedInstance('router', $routes, $request); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -914,7 +914,7 @@ public function prepare(Closure $func, array $options = []) | |
|
|
||
| $this->pretend(false); | ||
|
|
||
| if ($sql instanceof QueryInterface) { | ||
| if ($sql instanceof Query) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again - BC break since they can currently pass custom implementations.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be less breaking to add Without looking at the history of things I want to say that method came after the initial release, but even if it didn't I think the bug would be that it wasn't included. |
||
| $sql = $sql->getOriginalQuery(); | ||
| } | ||
|
|
||
|
|
@@ -1509,6 +1509,13 @@ public function disableForeignKeyChecks() | |
| return $this->query($sql); | ||
| } | ||
|
|
||
| /** | ||
| * Returns platform-specific SQL to disable foreign key checks. | ||
| * | ||
| * @return string | ||
| */ | ||
| abstract protected function _disableForeignKeyChecks(); | ||
|
|
||
| /** | ||
| * Enables foreign key checks temporarily. | ||
| */ | ||
|
|
@@ -1519,6 +1526,13 @@ public function enableForeignKeyChecks() | |
| return $this->query($sql); | ||
| } | ||
|
|
||
| /** | ||
| * Returns platform-specific SQL to enable foreign key checks. | ||
| * | ||
| * @return string | ||
| */ | ||
| abstract protected function _enableForeignKeyChecks(); | ||
|
|
||
| /** | ||
| * Allows the engine to be set into a mode where queries are not | ||
| * actually executed, but they are still generated, timed, etc. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I think it unlikely, what if someone had created their own Request class? LIke perhaps a more PSR-friendly version. What is the benefit of this change other than limiting those options for devs?