Deprecated error
I am testing tipctl.phar v6.24.0 on FreeBSD 12.4 and php 8.1.
I get with every tipctl command a couple of deprecated errors:
Deprecated: Return type of HumbugBox384\KevinGH\RequirementChecker\RequirementCollection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///root/tipctl/tipctl.phar/.box/src/RequirementCollection.php on line 15
Deprecated: Return type of HumbugBox384\KevinGH\RequirementChecker\RequirementCollection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///root/tipctl/tipctl.phar/.box/src/RequirementCollection.php on line 19
Workaround
I've got the same warning when running tipctl.phar in a php docker container.
By default there is no php.ini telling to suppress deprecated warnings.
I used:
cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
The production php.ini has: error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT so not showing deprecated warnings.
Relevant Dockerfile lines:
FROM php:8.2-cli
ADD --chmod=700 https://github.com/transip/tipctl/releases/latest/download/tipctl.phar tipctl.phar
RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
But this is a workaround and the deprecated warnings should be solved (might break in the future).