Add return type to arginfo for Iterator and Countable methods in PHP 8.1

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.11.0-alpha1, 1.11.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Classes that implement Iterator and Countable will need return type information added to arginfo of relevant methods:

      Deprecated: Return type of MongoDB\Driver\BulkWrite::count() should either be compatible with Countable::count(): int, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
      
      Deprecated: Return type of MongoDB\Driver\Cursor::current() should either be compatible with Iterator::current(): mixed, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
      
      Deprecated: Return type of MongoDB\Driver\Cursor::next() should either be compatible with Iterator::next(): void, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
      
      Deprecated: Return type of MongoDB\Driver\Cursor::key() should either be compatible with Iterator::key(): mixed, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
      
      Deprecated: Return type of MongoDB\Driver\Cursor::valid() should either be compatible with Iterator::valid(): bool, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
      
      Deprecated: Return type of MongoDB\Driver\Cursor::rewind() should either be compatible with Iterator::rewind(): void, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0
      

              Assignee:
              Jeremy Mikola
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: