Skip to content
Snippets Groups Projects
Verified Commit c33be8d9 authored by Bartek Jaskulski's avatar Bartek Jaskulski
Browse files

fix: use absolute cache path

parent 802ec7a5
No related branches found
No related tags found
3 merge requests!3improve into wp-hook and some additional unfinished things,!21.x,!1Draft: Basic implementation of plugin initializer
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
......@@ -75,7 +75,7 @@ final class PluginInit {
$this->filename = $backtrace[0]['file'];
}
$cache_path = $this->config->get( 'cache_path', 'generated' ) . '/plugin.php';
$cache_path = $this->get_cache_dir() . '/plugin.php';
try {
$plugin_data = $this->loader->load( $cache_path );
} catch ( \Exception $e ) {
......@@ -95,6 +95,10 @@ final class PluginInit {
return $plugin;
}
private function get_cache_dir(): string {
return $this->filename . '/' . $this->config->get( 'cache_path', 'generated' );
}
private function initialize_container( Plugin $plugin ): Container {
$original_builder = new DiBuilder();
$builder = new ContainerBuilder( $original_builder );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment