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

Forbid Framework\Module\Status::setIsEnabled #424

Open
maaarghk opened this issue Oct 10, 2022 · 1 comment
Open

Forbid Framework\Module\Status::setIsEnabled #424

maaarghk opened this issue Oct 10, 2022 · 1 comment

Comments

@maaarghk
Copy link

Rule

Forbid calling Magento\Framework\Module\Status::setIsEnabled

Reason

Experienced downtime as a result of a magento marketplace module (feefo/reviews) calling setIsEnabled(true) in production mode. The target was Magento_Review, which was installed but not enabled, causing blocks to attempt to load data from database tables which did not exist (declarative schema had removed them). Usage of this function outwith console command handlers should result in an automated knockback from the Magento marketplace due to potential to cause downtime like this.

Implementation

ForbiddenFunctionsSniff

@maaarghk maaarghk added the proposal New rule proposal label Oct 10, 2022
@m2-assistant
Copy link

m2-assistant bot commented Oct 10, 2022

Hi @maaarghk. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.

Add a comment to assign the issue: @magento I am working on this


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

No branches or pull requests

1 participant