Skip to content

Commit

Permalink
TASK: Compile getPackageKeys static
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellienert committed Oct 10, 2018
1 parent e09f4bf commit ee78100
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions Neos.Flow/Classes/Log/Utility/LogEnvironment.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use Neos\Flow\Package\PackageKeyAwareInterface;
use Neos\Flow\Package\PackageManager;
use Neos\Flow\Package\PackageManagerInterface;
use Neos\Utility\Arrays;
use Neos\Flow\Annotations as Flow;

abstract class LogEnvironment
{
Expand Down Expand Up @@ -53,7 +53,7 @@ public static function fromMethodName(string $methodName): array
*/
protected static function getPackageKeyFromClassName(string $className): string
{
$packageKeys = self::getPackageKeys();
$packageKeys = static::getPackageKeys();
$classPathArray = explode('\\', $className);

$determinedPackageKey = array_shift($classPathArray);
Expand All @@ -74,8 +74,9 @@ protected static function getPackageKeyFromClassName(string $className): string

/**
* @return array
* @Flow\CompileStatic
*/
protected static function getPackageKeys(): array
public static function getPackageKeys(): array
{
if (self::$packageKeys === null) {
/** @var PackageManagerInterface $packageManager */
Expand Down
3 changes: 2 additions & 1 deletion Neos.Flow/Classes/Monitor/FileMonitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Neos\Cache\Frontend\StringFrontend;
use Neos\Flow\Core\Bootstrap;
use Neos\Flow\Log\PsrLoggerFactoryInterface;
use Neos\Flow\Log\Utility\LogEnvironment;
use Neos\Flow\Monitor\ChangeDetectionStrategy\ChangeDetectionStrategyInterface;
use Neos\Flow\Monitor\ChangeDetectionStrategy\StrategyWithMarkDeletedInterface;
use Neos\Flow\SignalSlot\Dispatcher;
Expand Down Expand Up @@ -275,7 +276,7 @@ public function detectChanges()
$this->emitDirectoriesHaveChanged($this->identifier, $this->changedPaths);
}
if ($changedFileCount > 0 || $changedPathCount) {
$this->logger->info(sprintf('File Monitor "%s" detected %s changed files and %s changed directories.', $this->identifier, $changedFileCount, $changedPathCount));
$this->logger->info(sprintf('File Monitor "%s" detected %s changed files and %s changed directories.', $this->identifier, $changedFileCount, $changedPathCount), LogEnvironment::fromMethodName(__METHOD__));
}
}

Expand Down

0 comments on commit ee78100

Please sign in to comment.