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

feat: bump amp to v3 #52

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

feat: bump amp to v3 #52

wants to merge 3 commits into from

Conversation

Yokann
Copy link

@Yokann Yokann commented Aug 23, 2023

AMPHP use now Fiber via Revolt eventloop.
I made this PR to update the current AMPHP implementation of Tornado to this new version.
I don't think it's a good idea to keep both implementation of AMP (2.6 and 3.0)

  • Drop of the PHP 7.4 version was needed.
  • I also update PHPStan version

Documentaion

https://amphp.org/upgrade
https://revolt.run/fundamentals

@Yokann Yokann marked this pull request as ready for review August 23, 2023 12:39
src/Adapter/Amp/EventLoop.php Outdated Show resolved Hide resolved
Comment on lines +13 to +14
private \Amp\DeferredFuture $ampDeferred;
private PromiseWrapper $promise;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be readonly

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the pros of making it read-only? It's a private attribute.

@@ -11,11 +11,9 @@
*/
class PromiseWrapper implements Promise
{
/** @var \Amp\Promise */
private $ampPromise;
private \Amp\Future $ampPromise;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be readonly now, and the getter removed.

@Yokann Yokann marked this pull request as draft August 24, 2023 07:27
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

Successfully merging this pull request may close these issues.

2 participants