Skip to content

TemplateFactory - remove redundant class_exists check in constructor - #373

Open
mildabre wants to merge 1 commit into
nette:masterfrom
mildabre:fix/remove-redundant-class-exists
Open

TemplateFactory - remove redundant class_exists check in constructor#373
mildabre wants to merge 1 commit into
nette:masterfrom
mildabre:fix/remove-redundant-class-exists

Conversation

@mildabre

@mildabre mildabre commented Sep 3, 2026

Copy link
Copy Markdown
Contributor
  • BC break - no

The class_exists() check is redundant because is_a() with allow_string: true already verifies that the given class exists and is compatible with Template.

The same is_a() check is already used in createTemplate(), so this change also makes the validation consistent within TemplateFactory.

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

Successfully merging this pull request may close these issues.

1 participant