Skip to content
Snippets Groups Projects

1.x

Merged Bartek Jaskulski requested to merge 1.x into review
1 file
+ 5
1
Compare changes
  • Side-by-side
  • Inline
+ 5
1
@@ -75,7 +75,7 @@ final class PluginInit {
@@ -75,7 +75,7 @@ final class PluginInit {
$this->filename = $backtrace[0]['file'];
$this->filename = $backtrace[0]['file'];
}
}
$cache_path = $this->config->get( 'cache_path', 'generated' ) . '/plugin.php';
$cache_path = $this->get_cache_dir() . '/plugin.php';
try {
try {
$plugin_data = $this->loader->load( $cache_path );
$plugin_data = $this->loader->load( $cache_path );
} catch ( \Exception $e ) {
} catch ( \Exception $e ) {
@@ -95,6 +95,10 @@ final class PluginInit {
@@ -95,6 +95,10 @@ final class PluginInit {
return $plugin;
return $plugin;
}
}
 
private function get_cache_dir(): string {
 
return $this->filename . '/' . $this->config->get( 'cache_path', 'generated' );
 
}
 
private function initialize_container( Plugin $plugin ): Container {
private function initialize_container( Plugin $plugin ): Container {
$original_builder = new DiBuilder();
$original_builder = new DiBuilder();
$builder = new ContainerBuilder( $original_builder );
$builder = new ContainerBuilder( $original_builder );
Loading