Closed voodooism closed 3 years ago
@voodooism Thanks for the PR. Can you elaborate how this is a bug?
@arueckauer its already in PR desc :
This small bug doesn't allow to set a custom label for PDOCheck.
Actually, when extends AbstractCheck in another classes, implements no longer needed as AbstractCheck already implements, but probably that should be in another PR.
@voodooism please apply DCO see https://github.com/laminas/laminas-diagnostics/pull/14/checks?check_run_id=1378946763
To me it more looks more like a design issue than a bug. The setLabel()
should be defined in CheckInterface
to allow a manual overwrite.
@voodooism please apply DCO see https://github.com/laminas/laminas-diagnostics/pull/14/checks?check_run_id=1378946763
Done
travis in php 5.6 failure, not sure if that worth fixing, probably add allow_failures for php 5.6?
@samsonasik
travis in php 5.6 failure, not sure if that worth fixing, probably add allow_failures for php 5.6?
Not necessary if #15 is completed first.
IMO this is an enhancement - moved to 1.8.0
and needs a rebase to see if CI is happy with it.
Interestingly, extending AbstractCheck
instead of implementing CheckInterface
makes the quality of the code worse here, raising new psalm (valid) errors:
ERROR: PropertyNotSetInConstructor - src/Check/PDOCheck.php:11:7 - Property Laminas\Diagnostics\Check\PDOCheck::$label is not defined in constructor of Laminas\Diagnostics\Check\PDOCheck or in any private or final methods called in the constructor (see https://psalm.dev/074)
class PDOCheck extends AbstractCheck
Therefore, decided not to move on with this, as a clean implementation is preferable in general, over adding artificial inheritance layers.
Closing here.
Description
I've noticed that all the checks here extend the AbstractCheck class. As for me, it seems strange that the PDOCheck doesn't. This small bug doesn't allow to set a custom label for PDOCheck.