Skip to content
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

Remove silverstripe/cms as a requirement? #29

Open
JamesDPC opened this issue Aug 12, 2024 · 0 comments
Open

Remove silverstripe/cms as a requirement? #29

JamesDPC opened this issue Aug 12, 2024 · 0 comments

Comments

@JamesDPC
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant