php-imap icon indicating copy to clipboard operation
php-imap copied to clipboard

WIP: Improve IMAP response handling

Open szymekjanaczek opened this issue 3 years ago • 1 comments

According to #270

I know, we still have to update legacy protocol. It's just a draft.

szymekjanaczek avatar Sep 08 '22 08:09 szymekjanaczek

Hi @szymekjanaczek , wow thanks for taking the time! I have only two questions:

  • Why would you prefer to require ext-imap?
  • Where / How are you using use function imap_last_error;?

Thanks again!

Webklex avatar Sep 09 '22 18:09 Webklex

Okay, removed ext-imap usage.

szymekjanaczek avatar Oct 13 '22 11:10 szymekjanaczek

Hi, what do you think about merging it? 👉👈

szymekjanaczek avatar Nov 02 '22 08:11 szymekjanaczek

Hi @szymekjanaczek , this line makes me nervous:

protected function assumedNextLine(string $start): bool {
    return str_starts_with($this->nextLine(), $start);
}

This would lock the code to require php > 8. I'm having an inner discussion how I should proceed. I was sure to have talked about it somewhere (but can't find it anymore). Frankly I'm nervous to exclude a whole bunch of people but I'm also aware of the fact that you can't support everything and supporting a wide range causes a whole bunch of new issues.

I haven't forgotten this pull request. In fact I thought about it a lot, I just don't know how to proceed.

Best regards,

Webklex avatar Nov 09 '22 04:11 Webklex

Hi @Webklex!

You're right, this must stay at the lower version of PHP - my mistake. According to the rest of your message, you probably are talking about #270, aren't you?

Greetings!

szymekjanaczek avatar Nov 09 '22 11:11 szymekjanaczek

Hey @szymekjanaczek , I wouldn't call it a mistake. It's a valid point to use modern functions :+1:

I've touched the topic it a little bit in 270 but that's not what I've meant.

Anyway whats your thought on it? I can see arguments for both. How would you decide?

Best regards and thanks for your help & support,

Edit: Anyone else reading this, you are welcome to share your thoughts as well :)

Webklex avatar Nov 09 '22 13:11 Webklex

Hello again, @Webklex

In my honest opinion we should move forward and create a new branch using PHPv8.1 with tools: sniffers, static analysis, unit tests, refactoring helpers, ci/cd on github to speed-up cooperation with new collaborators, and so on - to open the way for the further updates. And ofc some performance improvements - like using bulk IMAP operations. I know that would be a breaking change, but necessary to keep this library useable in new projects - know it from my own experience. We're using this lib in out project too.

That's my idea, now we need devs and quite advanced knowledge about IMAP usage.

Regards!

szymekjanaczek avatar Nov 09 '22 14:11 szymekjanaczek

Hi again @Webklex!

What do you think about merging it? Switch from mixed response to bool was a breaking change for some of my features ;(

Thanks in advance, greetings!

szymekjanaczek avatar Dec 13 '22 20:12 szymekjanaczek

Hi @szymekjanaczek, yes lets do it. I'll reserved the last week of the year to work on the next major release. I especially want to introduce commit testing via github actions.

Best regards,

Webklex avatar Dec 14 '22 15:12 Webklex

Nice to hear that - feel free to ping me when need anything!

Have a nice evening!

szymekjanaczek avatar Dec 14 '22 16:12 szymekjanaczek

Hi @szymekjanaczek , I just pushed my last weeks work. We now have an actual Response::class to work with and real unit tests.

Btw happy new year :)

Best regards,

Webklex avatar Jan 02 '23 02:01 Webklex