Skip to content

refactor: remove deprecated Controller::loadHelpers() #8286

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

Merged
merged 2 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -816,11 +816,6 @@
'count' => 4,
'path' => __DIR__ . '/system/Config/Services.php',
];
$ignoreErrors[] = [
'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Controller.php',
];
$ignoreErrors[] = [
'message' => '#^Only booleans are allowed in a negated boolean, array given\\.$#',
'count' => 1,
Expand Down
18 changes: 0 additions & 18 deletions system/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,24 +121,6 @@ protected function cachePage(int $time)
Services::responsecache()->setTtl($time);
}

/**
* Handles "auto-loading" helper files.
*
* @deprecated Use `helper` function instead of using this method.
*
* @codeCoverageIgnore
*
* @return void
*/
protected function loadHelpers()
{
if (empty($this->helpers)) {
return;
}

helper($this->helpers);
}

/**
* A shortcut to performing validation on Request data.
*
Expand Down
1 change: 1 addition & 0 deletions user_guide_src/source/changelogs/v4.5.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ Others
------

- **Config:** The deprecated ``CodeIgniter\Config\Config`` class has been removed.
- **Controller:** The deprecated ``Controller::loadHelpers()`` method has been removed.

Enhancements
************
Expand Down