Skip to content

Remove silverstripe/cms as a requirement? #29

@JamesDPC

Description

@JamesDPC

Hi

When using this module with framework-only projects and modules that do not require silverstripe/cms, silverstripe/cms is installed (https://github.com/syntro-opensource/silverstripe-phpstan/blob/5/composer.json#L29).

For these occurrences, adding silvertstripe/cms can make analysis problematic. A good example is a module that has conditional support for the cms via an extension, where analysis and testing needs to be performed both with and without the cms module installed.

It would be good if the cms module requirement could be decoupled and allow the project/module to install if it is required.
The stub classes could be made conditional, similar to https://github.com/Cambis/silverstripe-rector/blob/main/stubs/Page.php

Is this possible? Maybe a silverstripe-cms-phpstan module would do the trick and move all the CMS handling there (except the stubs per #16 )?

Thanks
James

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions