Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga committed Dec 18, 2024
1 parent 483a310 commit 70adc63
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Providers/AddonServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Statamic\Facades\Addon;
use Statamic\Facades\Blueprint;
use Statamic\Facades\Fieldset;
use Statamic\Facades\Path;
use Statamic\Fields\Fieldtype;
use Statamic\Forms\JsDrivers\JsDriver;
use Statamic\Modifiers\Modifier;
Expand Down Expand Up @@ -860,6 +861,9 @@ private function shouldBootRootItems()
// i.e. It's the "root" provider. If it's in a subdirectory maybe the developer
// is organizing their providers. Things like tags etc. can be autoloaded but
// root level things like routes, views, config, blueprints, etc. will not.
return dirname((new \ReflectionClass(static::class))->getFileName()) === $addon->directory().$addon->autoload();
$thisDir = Path::tidy(dirname((new \ReflectionClass(static::class))->getFileName()));
$autoloadDir = $addon->directory().$addon->autoload();

return $thisDir === $autoloadDir;
}
}

0 comments on commit 70adc63

Please sign in to comment.