html icon indicating copy to clipboard operation
html copied to clipboard

Use `new %TagClass%()` instead of `%TagClass%::tag()`

Open vjik opened this issue 8 months ago • 2 comments

With PHP 8.4 (new MyClass()->method() without parentheses) single static constructor has lost its meaning.

Suggestion for NormalTag, VoidTag and CustomTag:

  • make constructor public;
  • deprecate static constructor.

vjik avatar Mar 19 '25 20:03 vjik

How about consistency? Would it be the same for all other tags?

samdark avatar Mar 20 '25 10:03 samdark

How about consistency? Would it be the same for all other tags?

All other tags extends NormalTag or VoidTag.

vjik avatar Mar 20 '25 10:03 vjik