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

Warn if property does not exist and add it to DiContainerTrait #329

Merged
merged 7 commits into from
Oct 4, 2021

Conversation

mvorisek
Copy link
Member

@mvorisek mvorisek commented Oct 3, 2021

This highly improves code quality as something like:

$m->noLongerSupportedProperty = 'x';

or

$m->eckbox= 'x'; // notice the typo

will warn if the new trait is added. To add it to the most of the code, we add it to DiContainerTrait by default.

The deprecation warnings can be supressed by a custom error handler or by overriding the warnIfPropertyDoesNotExist method.

Copy link
Collaborator

@abbadon1334 abbadon1334 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mvorisek mvorisek merged commit 6cd61da into develop Oct 4, 2021
@mvorisek mvorisek deleted the warn_if_property_does_not_exist branch October 4, 2021 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants