Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move a bunch of repeat functions to a trait #8161

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

live627
Copy link
Contributor

@live627 live627 commented Mar 31, 2024

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

@live627 live627 added the Housekeeping SMF code reorganization label Mar 31, 2024
@Sesquipedalian
Copy link
Member

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

@live627
Copy link
Contributor Author

live627 commented Apr 1, 2024 via email

@Sesquipedalian
Copy link
Member

Sesquipedalian commented Apr 1, 2024

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
Copy link
Member

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

@live627
Copy link
Contributor Author

live627 commented Apr 26, 2024 via email

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

Signed-off-by: John Rayes <[email protected]>
@live627
Copy link
Contributor Author

live627 commented Apr 26, 2024

Done

Sources/Actions/UnreadReplies.php Show resolved Hide resolved
Sources/Actions/Register2.php Show resolved Hide resolved
Sources/Actions/Post2.php Show resolved Hide resolved
Sources/Actions/NotifyBoard.php Show resolved Hide resolved
Sources/Actions/NotifyAnnouncements.php Show resolved Hide resolved
Sources/Actions/Admin/Boards.php Show resolved Hide resolved
Sources/Actions/Admin/Bans.php Show resolved Hide resolved
Sources/Actions/Admin/Attachments.php Show resolved Hide resolved
Sources/Actions/Admin/AntiSpam.php Show resolved Hide resolved
Sources/Actions/Admin/ACP.php Show resolved Hide resolved
@Sesquipedalian Sesquipedalian merged commit 5642a04 into SimpleMachines:release-3.0 Apr 29, 2024
6 checks passed
@Sesquipedalian
Copy link
Member

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

@live627 live627 deleted the act branch April 30, 2024 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Housekeeping SMF code reorganization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants