Code Monkey home page Code Monkey logo

Comments (24)

mattstauffer avatar mattstauffer commented on July 23, 2024 4

@bakerkretzmar and I put in a PR to two of Laravel Zero's dependencies (PHP Scoper and Covers Validation, IIRC) to try to get PHP 8.1 support. Fingers crossed.

from takeout.

nunomaduro avatar nunomaduro commented on July 23, 2024 4

@mattstauffer You can now migrate this tool to Laravel Zero 9, and on the process, you will get this issue fixed. Of course, keep in mind, that just like Laravel 9, Laravel Zero 9 drops PHP 7.4 and PHP 7.3.

from takeout.

mattstauffer avatar mattstauffer commented on July 23, 2024 2

This is the PR I made to the dependency:

humbug/php-scoper#543

It's still in draft form until the package author can take time to work with it:

from takeout.

mattstauffer avatar mattstauffer commented on July 23, 2024 1

Merged #261; I'll test out the build process locally shortly.

from takeout.

ahoiroman avatar ahoiroman commented on July 23, 2024 1

A very good hint.

Don't forget to source your .zshrc after that.

In my case I had to adopt this a little bit (expose has the same problem, and this can also be solved like that):

alias takeout="/opt/homebrew/Cellar/[email protected]/8.0.13/bin/php ~/.composer/vendor/bin/takeout"
alias expose="/opt/homebrew/Cellar/[email protected]/8.0.13/bin/php ~/.composer/vendor/bin/expose"

from takeout.

mrailton avatar mrailton commented on July 23, 2024

I've taken a look at this and it appears that it just needs a new build to be created against PHP 8.1 and released.

I've installed PHP 8.1 locally and run composer install & ./vendor/bin/phpunit, all seems to run well. I've created a new build with php ./takeout app:build and the resulting build appears to work fine.

I have created #261 to add PHP 8.1 to the test suite in Actions

from takeout.

mattstauffer avatar mattstauffer commented on July 23, 2024

Hm.. after upgrading to 8.1, I can't even build:

image

I'll dig into this a bit later

from takeout.

osbre avatar osbre commented on July 23, 2024

I've got the same error when using Takeout on PHP 8.1:

PHP Fatal error:  During inheritance of IteratorAggregate: Uncaught ErrorException: Return type of Symfony\Component\Console\Helper\HelperSet::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///home/user/.config/composer/vendor/tightenco/takeout/builds/takeout/vendor/symfony/console/Helper/HelperSet.php:94

from takeout.

chrisdicarlo avatar chrisdicarlo commented on July 23, 2024

In case it's useful to anyone dealing with these errors, I thought I would mention what I've done as a workaround. Since I've got PHP 8.1 as my default CLI version (but I've got 7.3-8.0 also installed), I just created an alias in my .zshrc that forces Takeout to run under a specific PHP version, e.g.:

alias takeout="php8.0 ~/.config/composer/vendor/bin/takeout"

Not ideal but it lets me run Valet under 8.1 and still maintain a functioning Takeout install.

from takeout.

mattstauffer avatar mattstauffer commented on July 23, 2024

Sorry y'all, I've been pretty burned out the last few days. Looking at this again now.

from takeout.

mattstauffer avatar mattstauffer commented on July 23, 2024

laravel-zero/laravel-zero#367

Looks like this is a known issue. Let me dig into Box but I don't know anything about it so we're probably just dependent on them.

from takeout.

jsposato avatar jsposato commented on July 23, 2024

any update? Will go back to PHP 7 for awhile if this is going to take some time. Appreciate you jumping on it @mattstauffer

from takeout.

mattstauffer avatar mattstauffer commented on July 23, 2024

Woooo thanks @nunomaduro!

from takeout.

bandgeekndb avatar bandgeekndb commented on July 23, 2024

@mattstauffer Now that the upstream issues have been fixed, what's left to do on this repo? This is my last PHP 8.1 blocker, so I'd love to help anyway I can!

from takeout.

mattstauffer avatar mattstauffer commented on July 23, 2024

@bandgeekndb Thanks! Looks like we need to upgrade it to Laravel Zero 9. I'd welcome that PR!

from takeout.

bandgeekndb avatar bandgeekndb commented on July 23, 2024

#274 was merged yesterday, which should close this once a new build is tagged (1.8.13 was built and tagged before my PR was merged).

I also realize I didn't include any docs updates in my PR, do you want to make a note about dropping PHP7 support? Maybe tag the new release as 2.0 and tell anyone who still needs PHP7 support to stay on the 1.* builds?

from takeout.

mrailton avatar mrailton commented on July 23, 2024

Thanks for the v2.0.0 build Matt. I installed globally and am getting the attached errors (same as previous)
Screenshot 2022-03-01 at 18 12 59 If i try to run any command within takeout like enable then it fails with
Screenshot 2022-03-01 at 18 20 26

I also tried running the version from repo and same issue. I tried the same build using php 8.0 directly and that appears to work so I tried building from main branch locally on 8.1 and appears to run fine.

Not sure if maybe is a local issue for me or not tho. Also wondering if maybe there's something funky going on where it needs to be built against php 8.1 in order to work properly or something else weird.

from takeout.

bandgeekndb avatar bandgeekndb commented on July 23, 2024

@railto Thanks for bringing this up, I believe I know what happened. I only committed the composer.json, and not the .lock file along with it, so I don't think the right dependencies were in place for the 2.0.0 build. I've submitted #278 to fix this and then v2.0.1 should be working.

from takeout.

mattstauffer avatar mattstauffer commented on July 23, 2024

Closed in #274 / #278.

from takeout.

priithansen avatar priithansen commented on July 23, 2024

Seems it still might need a new build published also because still seeing same errors that resolve with local "composer i && php ./takeout app:build"

from takeout.

mattstauffer avatar mattstauffer commented on July 23, 2024

@priithansen which version is that, 2.0.1 or 2.0.2? Thanks!

from takeout.

priithansen avatar priithansen commented on July 23, 2024

Ah jes impatient me tried 2.0.1. Seems 2.0.2 fixes the iterator return value problem but there appears to be some new problem with plain "takeout" command workig but every other command results in "The provided cwd "" does not exist."
CleanShot 2022-03-04 at 23 40 54
Yet again doing a local build resolves the problem 🤔

from takeout.

mattstauffer avatar mattstauffer commented on July 23, 2024

Interesting. I can't reproduce the cwd issue on my machine, but my machine is the one that built it. I'll dig in to see if I can figure out what's going on in Process.php line 344 and what's calling that particular spot, if I can.

from takeout.

priithansen avatar priithansen commented on July 23, 2024

It could always just be something funky with my setup although tried to delete global vendors folder and do composer global clearcache :) anyways Thanks for the fantastic package!

from takeout.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.