-
Notifications
You must be signed in to change notification settings - Fork 42
PHP 8.4 support #53
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
PHP 8.4 support #53
Conversation
src/Flow/Basic.php
Outdated
*/ | ||
public static function save($destination, $config, RequestInterface $request = null) | ||
public static function save(string $destination, $config, ?RequestInterface $request = null) : bool |
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.
maybe type config as string|ConfigInterface
src/Flow/Config.php
Outdated
{ | ||
$this->config['hashNameCallback'] = $callback; | ||
|
||
return $this; |
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.
not aligned?
src/Flow/Config.php
Outdated
{ | ||
$this->config['preprocessCallback'] = $callback; | ||
|
||
return $this; |
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.
align?
src/Flow/Config.php
Outdated
{ | ||
$this->config['deleteChunksOnSave'] = $delete; | ||
|
||
return $this; |
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.
code style
src/Flow/Mongo/MongoConfig.php
Outdated
/** | ||
* @param Bucket $gridFS storage of the upload (and chunks) | ||
*/ | ||
function __construct(Bucket $gridFS) | ||
function __construct(private Bucket $gridFS) | ||
{ | ||
parent::__construct(); | ||
$this->gridFs = $gridFS; |
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.
remove this?
Are these tests passing locally? |
Will fix these issues. Maybe I should set up phpcsfixer and phpstan too. Tests fail for me locally, you will have to fix, as you know the code better. Not sure how the mocking works. |
I fixed the save() parameter type. Also fixed the formatting with PHP-CS-Fixer. Corrected a bunch of type errors with PHPStan (removed the MongoConfigInterface, as it is not really needed). I also fixed one of the PHPUnit errors. The other two are caused by the mocking, but not exactly sure how to fix those, so you will need to work on them. I am going to test this in my project. Will push again if I find and fix any issues. I can't test the MongoDB stuff, as I use SQL only. |
My local testing seems to work with no mods needed. This should probably be released as v1.3 or v2.0 |
Released as 2.0, thank you for your contribution <3 |
Thanks for the prompt attention. Seems PHP 8.4 compatibility is not a high priority for many maintainers. |
ToDo:
Unit test need some work, but not sure what to do here as I am not familiar with the code.