SMF icon indicating copy to clipboard operation
SMF copied to clipboard

Move a bunch of repeat functions to a trait

Open live627 opened this issue 3 months ago • 6 comments

No need for constantly implementing the same load() and call() in every action, we have traits for that.

live627 avatar Mar 31 '24 01:03 live627

This is a good idea, but why move the interface and this new trait out of the SMF\Action namespace?

Sesquipedalian avatar Apr 01 '24 01:04 Sesquipedalian

I believe that namespace should only be for implementations.

On Sun, Mar 31, 2024 at 6:32 PM Jon Stovell @.***> wrote:

This is a good idea, but why move the interface and this new trait out of the SMF\Action namespace?

— Reply to this email directly, view it on GitHub https://github.com/SimpleMachines/SMF/pull/8161#issuecomment-2029006308, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADJNN5CM72L5WZNIR32HEDY3C2KJAVCNFSM6AAAAABFP7WSRWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRZGAYDMMZQHA . You are receiving this because you authored the thread.Message ID: @.***>

live627 avatar Apr 01 '24 03:04 live627

I tend to think that traits and interfaces should live where they're used, but I don't have strong feelings about this. And as I think about it, I suppose your preferred organization is in fact the way we already do it in the way SMF\Cache, SMF\Db, etc., relate their base classes and interfaces with the implementations in their *\API sub-namespaces. So okay, sure.

Sesquipedalian avatar Apr 01 '24 14:04 Sesquipedalian

Can I get you to resolve the conflicts in this PR, @live627? Then we can merge it.

Sesquipedalian avatar Apr 26 '24 01:04 Sesquipedalian

Sure, no problem.

On Thu, Apr 25, 2024 at 6:37 PM Jon Stovell @.***> wrote:

Can I get you to resolve the conflicts in this PR, @live627 https://github.com/live627? Then we can merge it.

— Reply to this email directly, view it on GitHub https://github.com/SimpleMachines/SMF/pull/8161#issuecomment-2078477202, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADJNNYRTWNNJCI6CYU3NRLY7GVXDAVCNFSM6AAAAABFP7WSRWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZYGQ3TOMRQGI . You are receiving this because you were mentioned.Message ID: @.***>

live627 avatar Apr 26 '24 07:04 live627

Done

live627 avatar Apr 26 '24 11:04 live627

I went ahead and fixed the documentation issues myself. Glad to have this PR merged. 🙂

Sesquipedalian avatar Apr 29 '24 19:04 Sesquipedalian