mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 13:05:53 +03:00
[PR #625] [MERGED] Add repository layer to handlers for better and centralized entity and session management #938
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#938
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cypht-org/cypht/pull/625
Author: @henrique-borba
Created: 9/23/2022
Status: ✅ Merged
Merged: 2/16/2024
Merged by: @kroky
Base:
master← Head:fix/smtp_server_unique_ids📝 Commits (10+)
308ecedfix double require of hm-profiles.php file in profiles and nux modules4f7dd1cSMTP servers unique idscaea86cAll other id entities (JMAP, Feeds, Profiles...)bd27371Hotfix profiles ids1da06d5Repository layer for Handlers and centralized entity and id management180ce61Profile use setDefault methodce62109migrate profiles, imap/smtp/feed server list to repository trait with unique ID management to get rid of array index integer values mixing up when deleting entries9abc745fix tests after repository ID changes and bootstrap switch48d5abemake local contacts use repository pattern and integrate with remote contactsd708645repository IDs migration script📊 Changes
41 files changed (+630 additions, -446 deletions)
View changed files
📝
config/app.php(+0 -9)📝
lib/framework.php(+1 -0)📝
lib/module.php(+1 -0)📝
lib/modules.php(+13 -0)➕
lib/repository.php(+147 -0)📝
lib/servers.php(+17 -28)📝
modules/carddav_contacts/hm-carddav.php(+5 -8)📝
modules/contacts/hm-contacts.php(+45 -25)📝
modules/contacts/modules.php(+1 -0)📝
modules/contacts/setup.php(+2 -2)📝
modules/core/handler_modules.php(+4 -6)📝
modules/core/setup.php(+1 -1)📝
modules/feeds/hm-feed.php(+4 -0)📝
modules/feeds/modules.php(+7 -13)📝
modules/feeds/setup.php(+2 -2)📝
modules/gmail_contacts/modules.php(+1 -1)📝
modules/imap/functions.php(+7 -8)📝
modules/imap/handler_modules.php(+16 -33)📝
modules/imap/hm-imap.php(+4 -0)📝
modules/imap/output_modules.php(+18 -18)...and 21 more files
📄 Description
An MR to fix once and for all the problem of ids in the cypht, in addition to facilitating all the management and access of entities in each module.
Repository Layer for Modules
All registered and active modules will have an automatically initialized repository. This repository contains all the base resources needed to add, remove, edit and search for objects stored in the session.
github.com/jasonmunro/cypht@9b3e9f7236/modules/profiles/modules.php (L130)Fully implemented Profile module
I refactored the entire profiles module to work with this implementation and now I'm implementing it in the other modules. This will remove a lot of duplicate code.
Below is the new code for inserting a profile and how it was before:
Before
github.com/jasonmunro/cypht@07605067db/modules/profiles/modules.php (L117-L147)After
github.com/jasonmunro/cypht@9c001c3379/modules/profiles/modules.php (L118-L137)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.