-
Notifications
You must be signed in to change notification settings - Fork 1
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
refactored a little, added CI actions, dummy test #51
Conversation
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.
Nice! Clean and simple.
.github/workflows/phpunit-sqlite.yml
Outdated
php-versions: ['8.2'] | ||
server-versions: ['master'] |
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 could test against all supported Php and NC:
Php >= 8.0
NC >= 26
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.
php-versions: ['8.1', '8.2']
server-versions: ['stable26', 'stable27', 'master']
I think will be enough...
public function __construct(ITimeFactory $time, | ||
JiraAPIService $jiraAPIService, | ||
LoggerInterface $logger) { | ||
JiraAPIService $jiraAPIService, | ||
LoggerInterface $logger) { |
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.
Since you know Php >= 8.0 will be used you could use attribute declaration in construct params. Not very important though.
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.
I fixed missing type declarations in all files, removing them completely.
Declaring in construct params - let leave this for the next time.
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.
Do what you want about the comment 😁
IRequest $request, | ||
IConfig $config, | ||
IURLGenerator $urlGenerator, | ||
IL10N $l, | ||
NetworkService $networkService, | ||
?string $userId) { |
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.
IRequest $request, | |
IConfig $config, | |
IURLGenerator $urlGenerator, | |
IL10N $l, | |
NetworkService $networkService, | |
?string $userId) { | |
IRequest $request, | |
private IConfig $config, | |
private IURLGenerator $urlGenerator, | |
private IL10N $l, | |
private NetworkService $networkService, | |
private ?string $userId) { |
(Just in case) In Php >= 8.0, if you do this you can get rid of the property declaration (before the constructor) and of the property assignment (in the constructor).
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.
Yeah, I know but I like the old style for some reason more..
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.
Do what you want about the comment 😁
Most stuff was taken from picker
Test was added only one, as it is more likely a test for a test.
Linters and style checking stuff is much more useful :)
P.S: I know that commits should be separated, but this should be easy review I hope even in this bad case.