-
Notifications
You must be signed in to change notification settings - Fork 31
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
General refactoring #76
Conversation
- Php version 7.4 or 8.0 - Use strict types - Set type hints - Remove unnecessary comments - Remove not needed service injections for tests
@codedge thanks for your involvement and this refacto seems nice If you are not already in our Slack, you can join us, it would be more convenient to discuss the PRs if needed: https://slack.meilisearch.com/ |
@curquiza Yep, saw your abandoned PRs and thought I could show some ❤️ to this repository. Joining Slack sound like a good plan. Already joined. 👍 |
Circular reference occurring out of nowhere :(
Hello @codedge, sorry for the delay!!! It looks good to me 🙂 Thanks again! I've just gave you the write access to this repo: no need to work on your forked repo 🙂 |
@curquiza Fixed the integration tests. After this PR has been merged, I'll continue to work on the repo itself, without the forked repo. Let's just close this one here :) ... and thanks for the access 👍 |
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.
LGTM! Thanks again for your PR! And your help on this package 😁
bors merge
Build succeeded: |
This PR improves the code in various aspects
PHP version
Supported PHP versions are >=7.4 are >=8.0. Both, Symfony 4.4 and 5.0, can run using these versions.
Strict types
Using strict types is good. You know 😉
Type hints
By using PHP 7.4 as minimum version type hints can be set class properties. There are still places left in the code where multiple types are used or general
object
types. These place can (should?) be refactored at a later stage.Comments
A lot of comments just describe the passed/parameter values and return values. Due to type hints they are obsolte.
Composer packages
The
MeiliSearchImportCommand
needs theDoctrine\Persistence\ManagerRegistry
injected so Doctrine cannot only be a dev requirement.I added the
doctrine/orm
package to therequire
section instead ofrequire-dev
.This is also needed for the Symfony recipe PR I opened.
Tests
Some testing configuration seem to be unnecessary. I removed some configuration. Still, the tests run fine.