-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Fix #25 assertModulesLoaded not matching all loaded Modules #84
Conversation
This is only for #25. |
I thought I had signoff set in my IDE. I guess I was wrong. |
You will need to rebase this |
Because of the missing signoff? No problem |
No, because it is based off of the wrong branch |
I am confused 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.
Thanks @visto9259
LGTM other than a couple of minor points.
The remaining 3 UnusedBaselineEntry
issues can be solved by running vendor/bin/psalm --update-baseline
I'll leave approval for someone else who has a better memory for MVC stuff 👍
/** @var ModuleManager $moduleManager */ | ||
$moduleManager = $this->getApplicationServiceLocator()->get('ModuleManager'); |
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.
/** @var ModuleManager $moduleManager */ | |
$moduleManager = $this->getApplicationServiceLocator()->get('ModuleManager'); | |
$moduleManager = $this->getApplicationServiceLocator()->get('ModuleManager'); | |
assert($moduleManager instanceof ModuleManager); |
Try to use an assertion in cases like this - it has the same effect of telling your IDE and psalm what the type is expected to be, but with the added benefit of causing a runtime error when the type does not match with a clear assertion failure.
When the type should be verified as part of expectations for the subject under test, then PHPUnit's self::assertInstanceOf()
method should be used.
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.
Good point. Thanks
So was I correct in using the 4.10.x branch for a bug fix? |
Looks to me like you worked on the patch by branching from In order to clean things up, you'd need to create a new branch from |
Good grief.... you are right! Rookie mistake. |
Signed-off-by: Eric Richer eric.richer@vistoconsulting.com <eric.richer@vistoconsulting.com>
Signed-off-by: Eric Richer eric.richer@vistoconsulting.com <eric.richer@vistoconsulting.com>
Signed-off-by: Eric Richer eric.richer@vistoconsulting.com <eric.richer@vistoconsulting.com>
…eption Signed-off-by: Aleksei Khudiakov <aleksey@xerkus.pro>
Signed-off-by: Aleksei Khudiakov <aleksey@xerkus.pro>
Signed-off-by: Aleksei Khudiakov <aleksey@xerkus.pro>
Ignoring DCO check for non-essential commits |
@visto9259 thank you |
Description