Open camlafit opened 2 years ago
Hello
I've a PR in progress at https://github.com/camlafit/cmsscanner/tree/issue-76_SPIPAdapter But I've some questions before :
detectVersion()
appendDetectionCriteria()
we can have an other filespip_loader.php
but If I add it, CMS could be detect twice. How to prevent duplicate result ?detectSystem()
we do a test to check files yet defined in appendDetectionCriteria()
I don't understand why we duplicate this check ?Thanks a lot
I'm not sure looks as a good idea to run twice detectVersion()
Probably not the optimal way, but as you need the CMS version here, I can hardly see a way around it
about appendDetectionCriteria() we can have an other filespip_loader.php but If I add it, CMS could be detect twice.
If I understand you correctly, both files are present in SPIP instance, correct? If so, why adding a second file at all?
on detectSystem() we do a test to check files yet defined in appendDetectionCriteria() I don't understand why we duplicate this check ?
See: https://github.com/camlafit/cmsscanner/blob/issue-76_SPIPAdapter/src/Command/DetectCommand.php#L121
All findings, regardless of their source adapter, are passed to all adapters for verification
Hello
I'm not sure looks as a good idea to run twice detectVersion()
Probably not the optimal way, but as you need the CMS version here, I can hardly see a way around it
Maybe detectVersion() could be set a local $version
variable. Should be specific to this adapter but at least method will be run only once.
about appendDetectionCriteria() we can have an other filespip_loader.php but If I add it, CMS could be detect twice.
If I understand you correctly, both files are present in SPIP instance, correct? If so, why adding a second file at all?
Some user can personalize their spip.php to another name. Purpose is to catch this use case and use a workaround on an optional file specific to this CMS.
on detectSystem() we do a test to check files yet defined in appendDetectionCriteria() I don't understand why we duplicate this check ?
See: https://github.com/camlafit/cmsscanner/blob/issue-76_SPIPAdapter/src/Command/DetectCommand.php#L121 All findings, regardless of their source adapter, are passed to all adapters for verification
Ok I see, then actually this behavior is normal :)
Maybe detectVersion() could be set a local $version variable. Should be specific to this adapter but at least method will be run only once.
If you go down that road, you'll class property storing a path => version map, as only one class instance is created and multiple CMS instances with multiple versions might by present on the filesystem
Hi
Could be nice to add SPIP cms
Thanks