Skip to content

Stop using Command::$defaultName in Symfony commands (#11) #43

Stop using Command::$defaultName in Symfony commands (#11)

Stop using Command::$defaultName in Symfony commands (#11) #43

Triggered via push December 27, 2024 16:00
Status Success
Total duration 35s
Artifacts

test.yml

on: push
Matrix: Run Infection
Matrix: Run PHPUnit
Matrix: Run Psalm
Fit to window
Zoom out
Zoom in

Annotations

32 warnings
Run Infection (8.3)
Your workflow is using a version of actions/cache that is scheduled for deprecation, actions/cache@v2. Please update your workflow to use either v3 or v4 of actions/cache to avoid interruptions. Learn more: https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down
Run Infection (8.2)
Your workflow is using a version of actions/cache that is scheduled for deprecation, actions/cache@v2. Please update your workflow to use either v3 or v4 of actions/cache to avoid interruptions. Learn more: https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down
Run Psalm (8.3)
Your workflow is using a version of actions/cache that is scheduled for deprecation, actions/cache@v2. Please update your workflow to use either v3 or v4 of actions/cache to avoid interruptions. Learn more: https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down
Run Psalm (8.2)
Your workflow is using a version of actions/cache that is scheduled for deprecation, actions/cache@v2. Please update your workflow to use either v3 or v4 of actions/cache to avoid interruptions. Learn more: https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down
Run PHPUnit (8.2)
Your workflow is using a version of actions/cache that is scheduled for deprecation, actions/cache@v2. Please update your workflow to use either v3 or v4 of actions/cache to avoid interruptions. Learn more: https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down
Run PHPUnit (8.3)
Your workflow is using a version of actions/cache that is scheduled for deprecation, actions/cache@v2. Please update your workflow to use either v3 or v4 of actions/cache to avoid interruptions. Learn more: https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down
Run Infection (8.3)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Run Infection (8.3): src/MessageHandler/ReplicateFileHandler.php#L45
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ $sourceAdapter = $failoverAdapter->getInnerAdapter($message->getInnerSourceAdapter()); $destinationAdapter = $failoverAdapter->getInnerAdapter($message->getInnerDestinationAdapter()); try { - $destinationAdapter->writeStream($message->getPath(), StreamWrapper::getResource(new CachingStream(Utils::streamFor($sourceAdapter->readStream($message->getPath())))), new Config()); + } catch (FilesystemException) { // TODO log exception ? $this->messageRepository->push(new ReplicateFile($message->getFailoverAdapter(), $message->getPath(), $message->getInnerSourceAdapter(), $message->getInnerDestinationAdapter(), $message->getRetryCount() + 1));
Run Infection (8.3): src/Service/SyncService.php#L80
Escaped Mutant for Mutator "Coalesce": --- Original +++ New @@ @@ } public function adapterItemsCount(int $adapter) : int { - return count($this->cache[$adapter] ?? []); + return count([] ?? $this->cache[$adapter]); } public function initializeAdapter(int $adapter) : void {
Run Infection (8.3): src/Service/SyncService.php#L88
Escaped Mutant for Mutator "PublicVisibility": --- Original +++ New @@ @@ { $this->cache[$adapter] = []; } - public function clearAdapter(int $adapter) : void + protected function clearAdapter(int $adapter) : void { unset($this->cache[$adapter]); }
Run Infection (8.3): src/Service/SyncService.php#L98
Escaped Mutant for Mutator "Minus": --- Original +++ New @@ @@ public function addFile(StorageAttributes $file, int $adapter, int $timeShift) : void { $lastModified = $file->lastModified(); - $this->cache[$adapter][$file->path()] = null !== $lastModified ? $lastModified - $timeShift : 0; + $this->cache[$adapter][$file->path()] = null !== $lastModified ? $lastModified + $timeShift : 0; } /** * Yield files that are present in $source adapter but not in other
Run Infection (8.3): src/Service/SyncService.php#L117
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ continue; } $fileIsMissing = !key_exists($path, $this->cache[$destination] ?? []); - $fileIsOlder = $lastModified > ($this->cache[$destination][$path] ?? 0); + $fileIsOlder = $lastModified > ($this->cache[$destination][$path] ?? -1); if ($fileIsMissing || !$this->ignoreModificationDates && $fileIsOlder) { (yield [$path, $destination]); }
Run Infection (8.3): src/Service/SyncService.php#L117
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ continue; } $fileIsMissing = !key_exists($path, $this->cache[$destination] ?? []); - $fileIsOlder = $lastModified > ($this->cache[$destination][$path] ?? 0); + $fileIsOlder = $lastModified > ($this->cache[$destination][$path] ?? 1); if ($fileIsMissing || !$this->ignoreModificationDates && $fileIsOlder) { (yield [$path, $destination]); }
Run Infection (8.3): src/Service/SyncService.php#L130
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ }; foreach ($adapter->getInnerAdapters() as $i => $innerAdapter) { $cache->initializeAdapter($i); - $this->eventDispatcher->dispatch(new ListingContentStarted($adapterName, $i)); + try { $timeShift = $innerAdapter->getTimeShift(); foreach ($innerAdapter->listContents('/', true) as $item) {
Run Infection (8.3): src/Service/SyncService.php#L136
Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ $this->eventDispatcher->dispatch(new ListingContentStarted($adapterName, $i)); try { $timeShift = $innerAdapter->getTimeShift(); - foreach ($innerAdapter->listContents('/', true) as $item) { + foreach ($innerAdapter->listContents('/', false) as $item) { if ($item->isFile()) { $cache->addFile($item, $i, $timeShift); }
Run Infection (8.3): src/Service/SyncService.php#L142
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ $cache->addFile($item, $i, $timeShift); } } - $this->eventDispatcher->dispatch(new ListingContentSucceeded($adapterName, $i, $cache->adapterItemsCount($i))); + } catch (FilesystemException) { $cache->clearAdapter($i); $this->eventDispatcher->dispatch(new ListingContentFailed($adapterName, $i));
Run Infection (8.3): src/Service/SyncService.php#L158
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ $this->eventDispatcher->dispatch(new ListingContentFailed($adapterName, $i)); } } - $this->eventDispatcher->dispatch(new SearchingFilesToReplicateStarted($adapterName)); + foreach ($cache->missingFilesFrom(0) as [$path, $destination]) { $this->replicateFile($adapterName, $path, 0, $destination); }
Run Infection (8.2)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Run Infection (8.2): src/MessageHandler/ReplicateFileHandler.php#L45
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ $sourceAdapter = $failoverAdapter->getInnerAdapter($message->getInnerSourceAdapter()); $destinationAdapter = $failoverAdapter->getInnerAdapter($message->getInnerDestinationAdapter()); try { - $destinationAdapter->writeStream($message->getPath(), StreamWrapper::getResource(new CachingStream(Utils::streamFor($sourceAdapter->readStream($message->getPath())))), new Config()); + } catch (FilesystemException) { // TODO log exception ? $this->messageRepository->push(new ReplicateFile($message->getFailoverAdapter(), $message->getPath(), $message->getInnerSourceAdapter(), $message->getInnerDestinationAdapter(), $message->getRetryCount() + 1));
Run Infection (8.2): src/Service/SyncService.php#L80
Escaped Mutant for Mutator "Coalesce": --- Original +++ New @@ @@ } public function adapterItemsCount(int $adapter) : int { - return count($this->cache[$adapter] ?? []); + return count([] ?? $this->cache[$adapter]); } public function initializeAdapter(int $adapter) : void {
Run Infection (8.2): src/Service/SyncService.php#L88
Escaped Mutant for Mutator "PublicVisibility": --- Original +++ New @@ @@ { $this->cache[$adapter] = []; } - public function clearAdapter(int $adapter) : void + protected function clearAdapter(int $adapter) : void { unset($this->cache[$adapter]); }
Run Infection (8.2): src/Service/SyncService.php#L98
Escaped Mutant for Mutator "Minus": --- Original +++ New @@ @@ public function addFile(StorageAttributes $file, int $adapter, int $timeShift) : void { $lastModified = $file->lastModified(); - $this->cache[$adapter][$file->path()] = null !== $lastModified ? $lastModified - $timeShift : 0; + $this->cache[$adapter][$file->path()] = null !== $lastModified ? $lastModified + $timeShift : 0; } /** * Yield files that are present in $source adapter but not in other
Run Infection (8.2): src/Service/SyncService.php#L117
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ continue; } $fileIsMissing = !key_exists($path, $this->cache[$destination] ?? []); - $fileIsOlder = $lastModified > ($this->cache[$destination][$path] ?? 0); + $fileIsOlder = $lastModified > ($this->cache[$destination][$path] ?? -1); if ($fileIsMissing || !$this->ignoreModificationDates && $fileIsOlder) { (yield [$path, $destination]); }
Run Infection (8.2): src/Service/SyncService.php#L117
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ continue; } $fileIsMissing = !key_exists($path, $this->cache[$destination] ?? []); - $fileIsOlder = $lastModified > ($this->cache[$destination][$path] ?? 0); + $fileIsOlder = $lastModified > ($this->cache[$destination][$path] ?? 1); if ($fileIsMissing || !$this->ignoreModificationDates && $fileIsOlder) { (yield [$path, $destination]); }
Run Infection (8.2): src/Service/SyncService.php#L130
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ }; foreach ($adapter->getInnerAdapters() as $i => $innerAdapter) { $cache->initializeAdapter($i); - $this->eventDispatcher->dispatch(new ListingContentStarted($adapterName, $i)); + try { $timeShift = $innerAdapter->getTimeShift(); foreach ($innerAdapter->listContents('/', true) as $item) {
Run Infection (8.2): src/Service/SyncService.php#L136
Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ $this->eventDispatcher->dispatch(new ListingContentStarted($adapterName, $i)); try { $timeShift = $innerAdapter->getTimeShift(); - foreach ($innerAdapter->listContents('/', true) as $item) { + foreach ($innerAdapter->listContents('/', false) as $item) { if ($item->isFile()) { $cache->addFile($item, $i, $timeShift); }
Run Infection (8.2): src/Service/SyncService.php#L142
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ $cache->addFile($item, $i, $timeShift); } } - $this->eventDispatcher->dispatch(new ListingContentSucceeded($adapterName, $i, $cache->adapterItemsCount($i))); + } catch (FilesystemException) { $cache->clearAdapter($i); $this->eventDispatcher->dispatch(new ListingContentFailed($adapterName, $i));
Run Infection (8.2): src/Service/SyncService.php#L158
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ $this->eventDispatcher->dispatch(new ListingContentFailed($adapterName, $i)); } } - $this->eventDispatcher->dispatch(new SearchingFilesToReplicateStarted($adapterName)); + foreach ($cache->missingFilesFrom(0) as [$path, $destination]) { $this->replicateFile($adapterName, $path, 0, $destination); }
Run PHPUnit (8.2)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Run Psalm (8.3)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Run PHPUnit (8.3)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Run Psalm (8.2)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636