chore: migrate from deptrac to structarmed#1336
Conversation
|
Ready for review/merge 👍 |
Co-authored-by: Pooya Parsa <pooya_parsa_dadashi@yahoo.com>
Co-authored-by: Pooya Parsa <pooya_parsa_dadashi@yahoo.com>
Co-authored-by: Pooya Parsa <pooya_parsa_dadashi@yahoo.com>
|
@datamweb review applied 👍 |
Since structarmed allows all unregistered classes by default, it seems the only way to forbid vendor usage in a specific layer is to explicitly register those vendor namespaces via |
|
@datamweb I think I need a real violation example first for that, eg use of: new \CodeIgniter\Controller();on specific part, which not allowed. That will may use ->layer('CI_Vendor_Controller', ....)
->rule(
'entity.must_not_use_ci_controller',
new MayNotDependOnRule(from: 'Model', to: 'CI_Vendor_Controller')
) |
Description
This PR try to migrate deptrac to structarmed, the vendor parts seems no need to be included in layer definition, structarmed treats dependencies on classes that don't match any defined layer as external/unregistered and automatically allows them, and
src/Views/contains only PHP template files with no class or namespace declarations, so no PHP class would ever match a View layer pattern regardlessLet me know if there is a catch so I can improve in structarmed first itself if possible.
Checklist: