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

Artisan seems to try to close the zip and the @ doesn't suppress the error #29

Closed
danschumann opened this issue Jul 12, 2022 · 4 comments

Comments

@danschumann
Copy link

image

It seems like the @ variable is used to suppress error, but in php 8.1 it doesn't seem to work anymore, or perhaps they changed the default?

image

@danschumann
Copy link
Author

Currently am working around the issue by overriding madzipper


class MotoZip extends \Madnest\Madzipper\Madzipper {

  public function __destruct() {
    try {
      return parent::__destruct();
    } catch (\ValueError $er) {
      //var_dump($er, 'error'); // suppress
    }
  }
}

@sidneygijzen
Copy link

@danschumann the error you're getting looks a lot like the issue mentioned in #21. Perhaps the workaround posted there also works in your case without having to override Madzipper?

scs-ben added a commit to scs-ben/madzipper that referenced this issue Jul 27, 2022
Apparently, there are ways to close the Zip object when it's not expected to be closed. This would address madnest#21 and madnest#29
@scs-ben
Copy link
Contributor

scs-ben commented Jul 27, 2022

I basically moved your override into Madzipper: #30

@theimerj
Copy link
Collaborator

Should be working with #30 until I find a more permanent solution. I am planning to rewrite the whole package anyway for v2 with more fluent API. I will open a discussion about the plan when the time comes. :)

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

4 participants