Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Final class declarations #90

@lkwdwrd

Description

@lkwdwrd

Why are so many of the class declarations implemented as final?

I'd love to implement a version of the ProjectFactory as an example, that adds some middleware to the new project definition, but right now I can't. I can implement the interface, sure, but then I'd have to re-implement the entirety of the namespace logic to get a Namespace tree. I can't even wrap the class because the namespace processing is all protected.

Similarly, I'd like to use slightly modified Factory\Function_ and Factory\Method strategies, but would need to copy pasta much of the code because again they are final classes. Being able to extend these classes would be a huge benefit and reduce the amount of code I'd need to write considerably. Perhaps I'm missing something, but they seem constructed with sensible defaults and are itching to be extended for additional implementations. Any reason they are not?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions