tighten / takeout

Docker-based development-only dependency manager. macOS, Linux, and WSL2-only and installs via PHP's Composer... for now.
MIT License
1.59k stars 83 forks source link

PHP 8.2 comatibility #314

Closed TiiFuchs closed 1 year ago

TiiFuchs commented 1 year ago

I get this error message using PHP 8.2 when just entering takeout:

Deprecated: Return type of HumbugBox3130\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://[...]/.composer/vendor/tightenco/takeout/builds/takeout/.box/src/RequirementCollection.php on line 12

I guess that's a PHP compatibility problem.

I can't find any information on the README which PHP versions are officially supported.

vblinden commented 1 year ago

You should update to the latest version.

composer global require tightenco/takeout:2.4.0

I had the same problem, but had an older 1.* version installed.

scheMeZa commented 1 year ago

@vblinden is correct. I can confirm as I am using takeout with PHP 8.2

tonysm commented 1 year ago

Hey @TiiFuchs

I'm using Takeout (v2.5.0 at the time of writing) with PHP 8.2.6. What version of Takeout are you using? I think the suggestion from @vblinden should fix it.

I'm gonna close the issue, but pls feel free to reopen it and leave a comment if that doesn't work for you.

cheesegrits commented 1 year ago

@tonysm maybe update the installation instructions? I just had the same issue, followed the instructions, the composer install command given installs 1.x. Maybe give a more specific example for folk with PHP 8.2?

tonysm commented 9 months ago

@cheesegrits we're working on something that should fix issues like this one. See #326 if you're curious.