Skip to content

Conversation

@DrechslerDerek
Copy link

No description provided.

{
static::isIterableOrNull($value);

foreach ($value ?? [] as $entry) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't allowed here, we need to have PHP 7.4 compatibility I believe.

Copy link
Collaborator

@shadowhand shadowhand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a rebase for PHP 8.4.

}
}

public static function isIterableOrNull($value, $message = '')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this this already covered by isNullOrIterable in mixin?

}
}

public static function nullOrAllIsInstanceOf($value, $class, $message = '')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class should only be modified by running php bin/generate.php. So the underlying modification allUuid would need to be added to Assert, and then regenerating Mixin will add these methods automatically.

@shadowhand shadowhand added this to the v2.0 milestone Dec 1, 2025
@shadowhand
Copy link
Collaborator

I've looked through this more closely, and we already have:

  • allNullOrIsInstanceOf
  • allNullOrUuid

While it isn't quite the same, it effectively covers these cases already.

Going to mark this as wontfix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants