Closed eSilverStrike closed 2 years ago
@mystralkk Can you look into this one when you get a chance? (I don't have any real experience with composer)
All libraries installed via composer seem to be available with composer 2 but one. swiftmailer/swiftmailer is abandoned. The author suggests using symfony/mailer instead, but it requires at least PHP 7.1.3.
As an alternative, phpmailer comes to my mind, which requires PHP 5.5.0. Should we continue using swiftmailer or switch to phpmailer, @eSilverStrike ?
Related to issue #1107
I haven't really looked at the 2 libraries . You are right though PHPMailer supports 5.6 and is used in WordPress I believe so it is very popular. Symfony (at least the framework) is used by a lot of other projects like Drupal, Joomla, PHPBB...
I think we want something that is fast, lean (doesn't require a bunch of extra libraries) and does the job well.
I guess if we want to keep supporting PHP 5.6 we would have to go with PHPMailer. Have you used it before, did you like it?
In my opinion, we should keep supporting PHP 5.6 till Geelog's next major version 3.x. I haven't actually used PHPMailer, but it seems to me it is easy to use.
@eSilverStrike , I tried integrating PHPMailer in the improvement/integrate-phpmailer branch.
Did you find it worked okay with your setup?
I have the config options set to SMTPS on my development server which works with SwiftMail but not when I switch to the phpmailer branch. I was just doing a lost password email.
I just tested with the default "mail" setting to see what PHPMailer is like.
Okay I was incorrect, it does work. The user I tested for lost password had an incorrect email address (and the lost password form did not let me know that).
I also tested email attachments with the database backup email and that also worked. (the only place I found where attachment is sent)
The only thing I fixed (I think) was we were loosing our line breaks for plain text messages (which I think most emails Geeklog sends are). As far as I can tell we only need to set the AltBody attribute is if we are dealing with an actual HTML email. If it is only plain text then we just set the body. (I didn't find any docs to confirm this though)
So I think it is ready to merge? Do you? If you agree you want to go ahead and merge it?
Okay, I will merge it. Thanks.
Done.
Is updating to Composer 2 something you want to do for this version of Geeklog or push to next?
To update to Composer 2, we have really nothing to do with Geeklog. All we have to do is update our CLI, by executing:
composer self-update
I have been using Composer 2 for six months with Geeklog and other projects, and haven't met any trouble.
Ahh my mistake sorry (not really familiar with composer) and I thought maybe the files under vendor would need updating do to changes between Composer 1 and 2.
Anyways I have successful updated Composer.
I also ran the library updates
I can commit those now unless there is a reason not to?
BTW I see a few library's like https://github.com/mrclay/jsmin-php/issues/10 https://github.com/serbanghita/Mobile-Detect/issues/876
have fixes in the works to support PHP 8.1 so hopefully they will push a release soon. Not sure what other libraries do not yet support PHP 8.1.
Please go ahead. I want updates of jsmin and mobile detect, too, since they are causing errors with PHP 8.1 when developer mode is on.
Closing as updating composer not related directly with Geeklog.
I ran Composer to update the libraries and got a warning message about Composer 1 being deprecated
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Upgrade guides for Composer 1.x to 2.0 https://github.com/composer/composer/blob/2.0.0/UPGRADE-2.0.md