Skip to content

Commit

Permalink
🐛 blueprints from classes loader
Browse files Browse the repository at this point in the history
Signed-off-by: bnomei <b@bnomei.com>
  • Loading branch information
bnomei committed Oct 12, 2023
1 parent ee88690 commit f04a2d1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
6 changes: 5 additions & 1 deletion classes/Autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,11 @@ public function toArray(array $merge = []): array
fn () => ['routes' => $this->routes()],
];
foreach ($types as $callback) {
$this->registry = array_merge_recursive($this->registry, $callback());
$c = (array) $callback();
$r = (array) $this->registry;
$this->registry = array_merge_recursive($r, $c);
// NOTE: if done like this PHP does not merge correctly for whatever reason
// $this->registry = array_merge_recursive($this->registry, $callback());
}

// merge on top but do not store in the registry
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bnomei/autoloader-for-kirby",
"type": "project",
"version": "1.10.3",
"version": "1.10.4",
"license": "MIT",
"description": "Helper to automatically load various Kirby extensions in a plugin",
"authors": [
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php return array(
'root' => array(
'name' => 'bnomei/autoloader-for-kirby',
'pretty_version' => '1.10.3',
'version' => '1.10.3.0',
'pretty_version' => '1.10.4',
'version' => '1.10.4.0',
'reference' => NULL,
'type' => 'project',
'install_path' => __DIR__ . '/../../',
Expand All @@ -11,8 +11,8 @@
),
'versions' => array(
'bnomei/autoloader-for-kirby' => array(
'pretty_version' => '1.10.3',
'version' => '1.10.3.0',
'pretty_version' => '1.10.4',
'version' => '1.10.4.0',
'reference' => NULL,
'type' => 'project',
'install_path' => __DIR__ . '/../../',
Expand Down

0 comments on commit f04a2d1

Please sign in to comment.