Skip to content

Commit

Permalink
Prevent deprecation warnings (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
janlam7 authored Feb 5, 2024
1 parent f6ce07b commit a36c6f7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public function __destruct()
/**
* @see ResultSet::getIterator()
*/
#[\ReturnTypeWillChange]
public function getIterator()
{
require_once 'creole/ResultSetIterator.php';
Expand Down
18 changes: 12 additions & 6 deletions lib/plugins/sfPropelPlugin/lib/vendor/propel/util/Criteria.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ public function __construct($dbName = null)
* Implementing SPL IteratorAggregate interface. This allows
* you to foreach() over a Criteria object.
*/
public function getIterator()
#[\ReturnTypeWillChange]
public function getIterator()
{
return new CriterionIterator($this);
}
Expand Down Expand Up @@ -1125,23 +1126,28 @@ public function __construct($criteria) {
$this->criteriaSize = count($this->criteriaKeys);
}

public function rewind() {
#[\ReturnTypeWillChange]
public function rewind() {
$this->idx = 0;
}

public function valid() {
#[\ReturnTypeWillChange]
public function valid() {
return $this->idx < $this->criteriaSize;
}

public function key() {
#[\ReturnTypeWillChange]
public function key() {
return $this->criteriaKeys[$this->idx];
}

public function current() {
#[\ReturnTypeWillChange]
public function current() {
return $this->criteria->getCriterion($this->criteriaKeys[$this->idx]);
}

public function next() {
#[\ReturnTypeWillChange]
public function next() {
$this->idx++;
}

Expand Down

0 comments on commit a36c6f7

Please sign in to comment.