Skip to content

Commit

Permalink
Fix gestione config in di per phalcon
Browse files Browse the repository at this point in the history
  • Loading branch information
Armando Caprio committed Mar 21, 2024
1 parent 31dfa73 commit 550a0c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Phalcon/KrakenService.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static function config( ?Di $di = null ): Config {
return Config::default();
}

return $di->get( self::CONFIG_BIND );
return clone $di->get( self::CONFIG_BIND );
}

public static function logger( ?Config $config = null, ?Di $di = null): KrakenLogger {
Expand All @@ -46,7 +46,7 @@ final public function inject( Di $di ): void {
$service = $this;

$di->setShared( self::CONFIG_BIND, function () use ( $service ) {
return clone $service->config;
return $service->config;
} );

$di->setShared( self::LOGGER_CLASS_BIND, function() {
Expand Down

0 comments on commit 550a0c3

Please sign in to comment.