Review main Abandoned

80566[TASK] Remove "final" keyword from classes and methods

Claus Due CR 0 V 0 Hard +468 −463 updated 05/27/24, 21:32

Commit message

The "final" keyword should not be used unless in very specific
circumstances:

For security reasons, e.g. when a class name can be selected from
an exposed option like a form field, and only when such
implementations share an interface and the entire application
programs against the interface, not the implementation.

And that's basically it.

And it should never be done on a class that does not have an
interface and where the rest of the framework programs against the
specific implementation instead of the interface.

The classes that currently declare "final" as well as those that
are scheduled to become "final" simply do not fulfill this.

Using "final" as a way to signal that "you shouldn't replace this
class" is an abuse of the language construct. Signals should be
sent with interfaces or annotations - not by enforcing it as an
unavoidable choice imposed on every developer.

Additionally, "final" without a programmed-to interface is poison
for testability in that it prevents the (efficient) creation of
test doubles.

Therefore, the "final" keyword is removed and avoided in the future.

Important: this reverts a previously communicated decision to make
every core ViewHelper "final" in v12 (which was thankfully never
done).

Review

  • Code review CR 0

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V 0

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 456

Show 436 more files