Secure Mail 2.0 #410
No reviewers
Labels
No labels
2018.09
2019.01
2019.03
2019.06
2019.09
2019.12
2020.03
2020.06
2020.09
2020.12
2021.03
2021.07
2021.09
2022.02
2022.06
2022.09
2022.12
2023.04
2023.05
2023.09
2024.03
2024.06
2024.09
2024.12
2025.02
2025.05
dependencies
Hackathon 2021
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: friendica/friendica-addons#410
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "securemail-2.0"
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?
Remove php-gpg, add openpgp-php and phpseclib.
Add template file for settings.
Add "send test" functionality.
Add messages.po
Alright, we have to decide something regarding library autoloading from the add-ons. I'm in favor of putting any library needed by any addon in Friendica's Composer. After all, add-ons are part of Friendica since the same team is maintaining both projects.
Wikimedia actually has a system to manage optional dependencies through Composer: https://github.com/wikimedia/composer-merge-plugin
Of course this would mean each Add-on would be a composer-enabled library as well, which I'm not sure how difficult it would be to convert.
In the mean time I think all dependencies should be grouped into the main composer.json.
What with independent addons - not every addon for Friendica is also part of this repository - put their dependencies into Friendica core as well? I think addons should care about their own dependencies. They are separate works building onto the platform, not necessarily part of the platform.
The potential issue with independent addons is exactly what the Composer Merge Plugin is about: by scanning the addon folder for
composer.json
files, it ensures that the basevendor
directory and theautoload.php
are populated with any library required by any addon.I was thinking something like that plugin , but I have to draft better how make it work..
back to the PR, any comments?
Note that I used "vendor" dir because I installed the libraries with composer, but then I remove everything not strictly required, composer-related files also, as I'm including them directly..
Note also that the only code I wrote is in securemail/securemail.php (and most of the openpgp-php usage is.. inspired by a wordpress plugin...)
Aside from that janky library inclusion, the plugin seemed fine to me. I'd still really prefer the library to be available in the main Friendica repository for non-independent addons.
Only standards changes requested.
Thanks for the standards work! There are a few minor touchups, one Parse Error with PHP5, a few new line characters becoming literal after quote style changes.