Skip to content

Commit f5a58e9

Browse files
committed
refactor: autoload URL helper in Autoloader
1 parent 11bc65e commit f5a58e9

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

system/Autoloader/Autoloader.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,12 @@ class Autoloader
7878

7979
/**
8080
* Stores helper list.
81+
* Always load the URL helper, it should be used in most apps.
8182
*
8283
* @var string[]
8384
* @phpstan-var list<string>
8485
*/
85-
protected $helpers = [];
86+
protected $helpers = ['url'];
8687

8788
/**
8889
* Reads in the configuration array (described above) and stores
@@ -115,7 +116,7 @@ public function initialize(Autoload $config, Modules $modules)
115116
}
116117

117118
if (isset($config->helpers)) { // @phpstan-ignore-line
118-
$this->helpers = $config->helpers;
119+
$this->helpers = array_merge($this->helpers, $config->helpers);
119120
}
120121

121122
if (is_file(COMPOSER_PATH)) {

system/bootstrap.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,3 @@
118118

119119
require_once COMPOSER_PATH;
120120
}
121-
122-
// Always load the URL helper, it should be used in most of apps.
123-
helper('url');

0 commit comments

Comments
 (0)