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

Compatibility issues with PHP 8.2 #309

Closed andradei closed 1 year ago

andradei commented 1 year ago

Seems to be similar to #260, trying to run any takeout command results in deprecation errors. Example with takeout enable:

❯ takeout enable

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:///Users/me/.composer/vendor/tightenco/takeout/builds/takeout/.box/src/RequirementCollection.php on line 12

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

Deprecated: Return type of Illuminate\Container\Container::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/me/.composer/vendor/tightenco/takeout/builds/takeout/vendor/illuminate/container/Container.php on line 1406

Deprecated: Return type of Illuminate\Container\Container::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/me/.composer/vendor/tightenco/takeout/builds/takeout/vendor/illuminate/container/Container.php on line 1418

Deprecated: Return type of Illuminate\Container\Container::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/me/.composer/vendor/tightenco/takeout/builds/takeout/vendor/illuminate/container/Container.php on line 1431

Deprecated: Return type of Illuminate\Container\Container::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/me/.composer/vendor/tightenco/takeout/builds/takeout/vendor/illuminate/container/Container.php on line 1445

Deprecated: Return type of PhpOption\Some::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/me/.composer/vendor/tightenco/takeout/builds/takeout/vendor/phpoption/phpoption/src/PhpOption/Some.php on line 152

Deprecated: Return type of PhpOption\None::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/me/.composer/vendor/tightenco/takeout/builds/takeout/vendor/phpoption/phpoption/src/PhpOption/None.php on line 118

Deprecated: Return type of Illuminate\Config\Repository::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/me/.composer/vendor/tightenco/takeout/builds/takeout/vendor/illuminate/config/Repository.php on line 142

Deprecated: Return type of Illuminate\Config\Repository::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/me/.composer/vendor/tightenco/takeout/builds/takeout/vendor/illuminate/config/Repository.php on line 154

Deprecated: Return type of Illuminate\Config\Repository::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/me/.composer/vendor/tightenco/takeout/builds/takeout/vendor/illuminate/config/Repository.php on line 167

Deprecated: Return type of Illuminate\Config\Repository::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/me/.composer/vendor/tightenco/takeout/builds/takeout/vendor/illuminate/config/Repository.php on line 179

Deprecated: Return type of Symfony\Component\Finder\Finder::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/me/.composer/vendor/tightenco/takeout/builds/takeout/vendor/symfony/finder/Finder.php on line 608

Deprecated: Return type of Symfony\Component\Finder\Finder::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/me/.composer/vendor/tightenco/takeout/builds/takeout/vendor/symfony/finder/Finder.php on line 690

Deprecated: Return type of Symfony\Component\Finder\Iterator\FileTypeFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/me/.composer/vendor/tightenco/takeout/builds/takeout/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php on line 42

Deprecated: Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::getChildren() should either be compatible with RecursiveDirectoryIterator::getChildren(): RecursiveDirectoryIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/me/.composer/vendor/tightenco/takeout/builds/takeout/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php on line 87

Deprecated: Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::rewind() should either be compatible with FilesystemIterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/me/.composer/vendor/tightenco/takeout/builds/takeout/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php on line 118

Deprecated: Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::current() should either be compatible with FilesystemIterator::current(): SplFileInfo|FilesystemIterator|string, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/me/.composer/vendor/tightenco/takeout/builds/takeout/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php on line 62

Deprecated: Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/me/.composer/vendor/tightenco/takeout/builds/takeout/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php on line 55

Deprecated: Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::hasChildren() should either be compatible with RecursiveIterator::hasChildren(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/me/.composer/vendor/tightenco/takeout/builds/takeout/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php on line 74

Deprecated: Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::getChildren() should either be compatible with RecursiveIterator::getChildren(): ?RecursiveIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/me/.composer/vendor/tightenco/takeout/builds/takeout/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php on line 82

Deprecated: Return type of Symfony\Component\Finder\Iterator\FilenameFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/me/.composer/vendor/tightenco/takeout/builds/takeout/vendor/symfony/finder/Iterator/FilenameFilterIterator.php on line 28

Deprecated: Return type of Symfony\Component\Finder\Iterator\PathFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/me/.composer/vendor/tightenco/takeout/builds/takeout/vendor/symfony/finder/Iterator/PathFilterIterator.php on line 27
tonysm commented 1 year ago

Hey @andradei

I'm trying to reproduce this, but I wasn't able to. I have PHP 8.2.1 installed locally and I was able to run Takeout. Tested it on both Mac and Linux (same PHP version), but works on both.

Can you tell me more about your setup? Which OS and which PHP version specifically (I know it's 8.2, but is it 8.2.0 or 8.2.1)?

tonysm commented 1 year ago

Hmm, based on the file path, looks like you're on Mac.

andradei commented 1 year ago

I just found out this is not an issue at all. I somehow installed an older version to takeout, after fixing my global composer packages, it worked as expected.

Thank you for taking a look at this and sorry for the false positive.