tempest-framework icon indicating copy to clipboard operation
tempest-framework copied to clipboard

Added additional architecture tests

Open Plytas opened this issue 1 year ago • 2 comments

As per https://github.com/tempestphp/tempest-framework/issues/116#issuecomment-1970395938

  • Added a test to make sure there are no abstract classes.
  • From bullet point 2 and 3 we can extract a test to make sure that all classes are final.
  • Added a test to make sure that classes that implement anything are readonly.

I've added these tests exactly as they were described in Brent's comment. There are 88 errors currently that would need to be addressed to satisfy those rules. I do believe that there will be exceptions to these rules so I'm not sure how feasible it will be to implement them.

Plytas avatar Mar 12 '24 10:03 Plytas

I think we'll need to finetune this a bit more, since it's now saying interfaces should be final, and enums should be readonly, which isn't needed.

brendt avatar Mar 13 '24 05:03 brendt

Adjusted selectors to ignore interfaces and enums. Down to 45 errors. Let me know if you see more exceptions.

Plytas avatar Mar 13 '24 09:03 Plytas

Gonna merge this and fix the errors 👍

brendt avatar May 30 '24 11:05 brendt