Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated error #14

Open
nachtbraker opened this issue Oct 20, 2023 · 1 comment
Open

Deprecated error #14

nachtbraker opened this issue Oct 20, 2023 · 1 comment

Comments

@nachtbraker
Copy link

nachtbraker commented Oct 20, 2023

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

@JMDirksen
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants