-
-
Notifications
You must be signed in to change notification settings - Fork 1
Add drift kernel adapter #12
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
Conversation
composer.json
Outdated
@@ -16,6 +16,7 @@ | |||
"require": { | |||
"php": "^7.4|^8.0", | |||
"antidot-fw/framework": "^0.1.3", | |||
"drift/server": "@dev", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this proper to install unstable dependency for the framework?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @peter279k, Is still worki in progress, Driftphp already does not support PHP8, and the release of drift that allows integrating by using an adapter is not released yet. it must be a stable versión before release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@peter279k maybe it will be better to extract this adapter to a third package, allowing us to run the application both with Drift or with our built-in server. Letting the developers choose what they prefer in the starter(future installer)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just notice that the ^0.1.17
version is supported for the php-8.0
.
And the reference is available here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can work with this new version - 0.1.18 - https://github.com/driftphp/server/releases/tag/0.1.18
This server has almost changed it's public API and in case it changes the public API (interface), it will do it in BC mode.
2bd292e
to
5c2da89
Compare
There is one broken dependency in PHP8, I did a PR driftphp/event-loop-utils#1 to update PHP and PHPUnit versions. I think that there is the only blocking thing. Yesterday I test both servers with the forking feature and I can say that the Drift server is at least faster than our built-in server;- D |
Another stopper seregazhuk/php-watcher, I'm forked the project and try locally with PHP8 with success, I will open a PR UPDATE PR opened;-D seregazhuk/php-watcher#69 |
src/DriftKernelAdapter.php
Outdated
ServerContext $serverContext, | ||
MimeTypeChecker $mimeTypeChecker, | ||
string $rootPath, | ||
?object $filesystem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be strict ?FilesystemInterface $filesystem
. It doesn't matter if the dependency is not there, the contract should be working as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OOps. Nopes, sorry, this is not the method I was talking about :(
src/DriftKernelAdapter.php
Outdated
ServerContext $serverContext, | ||
OutputPrinter $outputPrinter, | ||
MimeTypeChecker $mimeTypeChecker, | ||
$filesystem = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here!
?FilesystemInterface $filesystem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't like it too much, but this way I can pass psalm checks both in PHP 7.4 and 8
Description
As talked with @mmoreram(DriftPHP lead developer) we will integrate the reactive versión of Antidot with DriftPHP Server:
Comparing to the actual plain ReactPHP server, the Drift server gives us more robustness and some features like static file serving, multi-threading, server logs, request timing... A big step up;- D
Also, this way we can focus on working on more specific framework related features and of course helping in the Driftphp community