diff --git a/composer/Plugin/Scaffold/Operations/ScaffoldFileCollection.php b/composer/Plugin/Scaffold/Operations/ScaffoldFileCollection.php
index a1bacf597d77e4e099524d4df2e4070b93216e29..c6e89ef4c79190d12f8d15f713c67de3315b5b3f 100644
--- a/composer/Plugin/Scaffold/Operations/ScaffoldFileCollection.php
+++ b/composer/Plugin/Scaffold/Operations/ScaffoldFileCollection.php
@@ -115,8 +115,7 @@ protected function checkListHasItemWithContent(array $scaffold_files) {
   /**
    * {@inheritdoc}
    */
-  #[\ReturnTypeWillChange]
-  public function getIterator() {
+  public function getIterator(): \ArrayIterator {
     return new \ArrayIterator($this->scaffoldFilesByProject);
   }