Commit Graph

1721 Commits

Author SHA1 Message Date
Marcus Bointon 050d430203
6.4.0 2021-03-31 22:06:42 +02:00
Robert L Mathews 95438b776d
Revert change that made the `mail()` and sendmail transports set the envelope sender if one isn't explicitly provided, as it causes problems described at <https://github.com/PHPMailer/PHPMailer/issues/2298> (#2300)
Co-authored-by: Robert L Mathews <rob@tigertech.net>
2021-03-31 21:48:35 +02:00
Marcus Bointon e8db1cd5da
Tidelift enterprise 2021-03-22 18:15:45 +01:00
Marcus Bointon 3843c6b401
Tidelift funding 2021-03-22 17:59:04 +01:00
Marcus Bointon a792de883b
Tidelift security 2021-03-22 17:55:59 +01:00
Marcus Bointon 59173eb2bf
Speed 2021-03-20 01:00:04 +01:00
Marcus Bointon 5f93907aa5
CS 2021-03-20 00:59:13 +01:00
Marcus Bointon 4c2197250d
Changelog 2021-03-19 22:25:48 +01:00
Marcus Bointon a9a634274e
Change locale filename as Serbian Latin is apparently `sr_latn` as per https://unicode-org.github.io/cldr-staging/charts/37/summary/sr_Latn.html 2021-03-19 22:25:39 +01:00
Marcus Bointon 48a91d2723
Drop unstable badge 2021-03-19 22:18:21 +01:00
Marcus Bointon f037388959
Comment about AUTH PLAIN format 2021-03-19 22:18:08 +01:00
Marcus Bointon 6b6badad3f
Check for mbstring before trying to use it in parseAddresses 2021-03-19 22:17:22 +01:00
Nemanja Jeremić c626b9e165
Add Serbian(Latin) translation (#2288) 2021-03-19 20:31:54 +01:00
Puneet Gopinath d13d6006a4
Fix links (#2285) 2021-03-17 09:38:27 +01:00
Steve 33fc96f877
correct invalid br (#2280) 2021-03-14 13:02:44 +01:00
Marcus Bointon 4a08cf4cdd
6.3.0 2021-02-19 16:28:08 +01:00
Marcus Bointon e86e4e3f2a
CS 2021-02-19 16:04:57 +01:00
Marcus Bointon 85b4c9cd2d
Remove dead code 2021-02-19 16:04:47 +01:00
Marcus Bointon 09bc306529
Handle envelope sender the same way in sendmail as in mail() 2021-02-19 16:04:33 +01:00
Marcus Bointon 79ead3b070
More debug info for sendmail & qmail 2021-02-19 16:01:19 +01:00
Marcus Bointon 2a8e3a2fc9
Improve debug output from mail() 2021-02-19 13:43:34 +01:00
Marcus Bointon 0f24617b0c
Consistent comment style 2021-02-19 13:42:01 +01:00
Marcus Bointon e28e3552a5
Remove test env diagnostic 2021-02-19 09:37:25 +01:00
Marcus Bointon 0a191cc7ec
More IDN twiddling 2021-02-18 23:46:33 +01:00
Marcus Bointon 7f22287bdb
More IDN twiddling 2021-02-18 23:14:13 +01:00
Marcus Bointon f9cc642d6d
CS 2021-02-18 14:44:15 +01:00
Marcus Bointon 34e1c900be
Charset woes 2021-02-18 14:35:27 +01:00
Marcus Bointon 60126a1b90
Back to xdebug we go... 2021-02-18 13:18:58 +01:00
Marcus Bointon 9ff9932ca7
Require pcov 2021-02-18 12:39:35 +01:00
Marcus Bointon f4910c8b0d
Only use clobber on old PHP versions 2021-02-18 12:36:19 +01:00
Marcus Bointon 19b7f3175d
Test env tweaks 2021-02-18 12:23:06 +01:00
Marcus Bointon d11f2e4731
Docs links 2021-02-18 12:10:26 +01:00
Marcus Bointon 7aa80026cb
CS 2021-02-18 11:48:59 +01:00
Marcus Bointon e2eb2304fe
Decode encoded names in the address parser, see #2266 2021-02-18 11:46:07 +01:00
Marcus Bointon c2c5a3b9af
Fix 2021-02-05 10:19:51 +01:00
Marcus Bointon b1582e23d9
CS 2021-02-05 10:16:39 +01:00
Marcus Bointon 43c7ff5644
Changelog 2021-02-05 10:08:04 +01:00
Marcus Bointon f9f5b8d21e
Make envelope sender config work the same way for `mail()`` as it does for SMTP, preferring `Sender` over `sendmail_from` ini setting. 2021-02-05 09:59:54 +01:00
Marcus Bointon 2eaa82698d
Update reference 2021-02-05 09:49:19 +01:00
Marcus Bointon d8630b9e2c
Add debug output for mail and sendmail transports 2021-02-05 09:49:02 +01:00
Marcus Bointon 640e68d332
Readme 2020-12-10 10:29:01 +01:00
Marcus Bointon 2999b16180
Handle 421 during EHLO/HELO, fixes #2189 2020-12-09 22:50:54 +01:00
Marcus Bointon 81319de7f1
Scrutinizer doesn't work with PHP 8 so remove it, update badges 2020-12-09 22:23:40 +01:00
codedge e78f71aa67
Migrate from TravisCI to GitHub Actions (#2218)
* Remove TravisCI, add Github actions

* Fix missing steps

* Fix composer command

* Fix composer command 2nd :(

* Install postfix

* Postfix set up

* Fix missing sudos

* More sudos

* Fix permissions

* Sendmail path

* Debug

* Debug

* Debug

* Sendmail path

* Code coverage path

* Fix clover.xml path

* Install qmail

* Github Actions CI

* Add more PHP versions

* Add more PHP versions

* Use Ubuntu 18.04

Co-authored-by: Marcus Bointon <marcus@synchromedia.co.uk>
2020-12-09 17:54:59 +01:00
Marcus Bointon 4ddf42b5c4
Readme 2020-12-04 15:15:53 +01:00
Marcus Bointon 5050b6012f
Handle early connection errors, see #2211 2020-12-04 15:15:20 +01:00
Manish Kumar 338b5597ac
Add travis jobs on ppc64le (#2196)
* Add travis jobs on ppc64le

* Make the tests PHPUnit cross version compatible + test on PHP 8 (#2202)

* .gitignore: ignore files created during a test run

* Tests: make config cross-version compatible

PHPUnit config file:

* Add `backupGlobals="true"`.
    The default value for this setting changed in PHPUnit 6 from `true` to `false`. By explicitly setting it to `true`, the existing behaviour is maintained.
* Remove the `logIncompleteSkipped` directive which is no longer supported.
* Remove a number of directives which use the default values and for which the defaults have not changed across PHPUnit versions.
* Remove the space in the testsuite name to make it more easily usable on the command line.
* Make sure that all src files are taken into consideration when calculating code coverage.
* Add XSD schema reference.
    Note: the config as-is will now validate for PHPUnit 4.4-9.2. For PHPUnit 9.3, the code coverage terminology has changed, though the "old" configuration is still supported.
    If needs be (PHPUnit 10), the config can be updated on the fly by using `--migrate-configuration`.

Other:
* Ignore a locally overloaded PHPUnit config file using the standard `phpunit.xml` file name.

Question: why does the config file not use the standard `phpunit.xml.dist` file name ? That would allow for running the tests without command line arguments.
That file can still be overloaded locally by a `phpunit.xml` file.

* Composer: add dependency on the PHPUnit Polyfills package

* Adds a dev dependency to the `yoast/phpunit-polyfills` package.
* As that package already requires and manages the installable versions for PHPUnit, remove this as an explicit requirement from `require-dev` in favour of letting the PHPUnit Polyfills package manage the versions.
    This will update the supported PHPUnit versions from `^4.8 || ^5.7` to `^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0`.
    Note: the supported versions for PHPUnit 4.x and 5.x are very specific and restrictive as it specifically targets the versions in which the "forward compatible" alias files for the namespaced classes are available.

This new package adds the following features:
* Polyfills for various PHPUnit cross-version changes.
* Basic test case and test listener.

Refs:
* https://github.com/Yoast/PHPUnit-Polyfills/

Includes adding the PHPUnit cache file, which is automatically created in PHPUnit 8 and 9, to the `.gitignore` file.

* Tests: switch over to use the Yoast\PHPUnitPolyfills\TestCases\TestCase

This switches the parent class of the test classes over `TestCase` from the PHPUnit native TestCase to the `Yoast\PHPUnitPolyfills\TestCases\TestCase`.

The Yoast `TestCase`:
* Provides cross-version compatibility using snake case fixture method names instead of the PHPUnit native camelCase names.

This switch over includes:
* Renaming the `setUp()` and `tearDown()` methods to, respectively, `set_up()` and `tear_down()` in various test classes for PHPUnit cross-version compatibility.

* Tests: switch over to use the Yoast Polyfill TestListenerDefaultImplementation

This switches `DebugLogTestListener` class over to using the PHPUnit 9 default implementation pattern in combination with using the `TestListenerDefaultImplementation` from the PHPUnit Polyfill library for the cross-version compatibility layer for the TestListener.

The Yoast `TestListenerDefaultImplementation`:
* Provides cross-version compatibility using snake case method names instead of the PHPUnit native camelCase names.

This switch over includes:
* Renaming the template methods used in the `DebugLogTestListener` to use their snake_case variant and removes the type declarations.

* Tests: switch out `assertInternalType()`

... in favour of the more specific assertion(s) as introduced in PHPUnit 7.5.0.

The new assertions are automatically polyfilled via the PHPUnit Polyfill repo as this test class extends the `Yoast\PHPUnitPolyfills\TestCases\TestCase` test case.

* Tests: switch out `assert[Not]Contains()` with string haystacks

... in favour of the string specific `assertString[Not]ContainsString() assertion(s) as introduced in PHPUnit 7.5.0.

The new assertions are automatically polyfilled via the PHPUnit Polyfill repo as this test class extends the `Yoast\PHPUnitPolyfills\TestCases\TestCase` test case.

* Tests: switch out `@expectException` annotations

... in favour of method calls to the `TestCase::expectException()` method as introduced in PHPUnit 5.2.0.

The new method and its variants are automatically polyfilled via the PHPUnit Polyfill repo as this test class extends the `Yoast\PHPUnitPolyfills\TestCases\TestCase` test case.

* Tests: switch out `assertRegExp()`

... in favour of the renamed `Assert::assertMatchesRegularExpression() as introduced in PHPUnit 9.1.0.

The new assertion is automatically polyfilled via the PHPUnit Polyfill repo as this test class extends the `Yoast\PHPUnitPolyfills\TestCases\TestCase` test case.

* Tests: mark a test as incomplete

As per the comment in the docblock:
> Needs a connection to a server that supports this auth mechanism, so commented out by default.

As the test cannot currently be executed succesfully, we may as well skip it with a meaningful message.

* Tests: mark a test as not performing assertions

... to prevent it from being marked as risky.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>

* CS

* 6.2.0

* Use fully-qualified constant names for PHP versions (#2203)

This is a micro performance improvement. When PHP opcode generates opcodes, it can remove PHP version-specific `if` blocks if it sees `PHP_MAJOR_VERSION` or `PHP_VERSION_ID`. However, if the code belongs to a namespace, it cannot make that optimization because the code under namespace can declare the same constants.
This PR updates such PHP constants to be fully-qualified (with back-slash), which enables PHP to make the improvement.

To compare, this is the VLD opcode without fully-qualified constant names:

```php
namespace X;

if (\PHP_VERSION_ID < 80000) {
    echo "hi";
}
```

-->

```
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E >   FETCH_CONSTANT                                   ~0      'X%5CPHP_MAJOR_VERSION'
         1        IS_SMALLER_OR_EQUAL                              ~1      ~0, 8
         2      > JMPZ                                                     ~1, ->4
   6     3    >   ECHO                                                     'hi'
   7     4    > > RETURN                                                   1
```

The same snippet, with the fully-qualified constants, PHP can simply eliminate and optimize the `if` block:

```
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E > > JMPZ                                                     <true>, ->2
   6     1    >   ECHO                                                     'hi'
   7     2    > > RETURN                                                   1
```

* Update Slovak translations (#2204)

* Update phpmailer.lang-sk.php

* Update phpmailer.lang-sk.php

* Update phpmailer.lang-cs.php (#2205)

Co-authored-by: Juliette <663378+jrfnl@users.noreply.github.com>
Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
Co-authored-by: Marcus Bointon <marcus@synchromedia.co.uk>
Co-authored-by: Ayesh Karunaratne <Ayesh@users.noreply.github.com>
Co-authored-by: Róbert Kelčák <RobiNN1@users.noreply.github.com>
2020-11-27 00:55:57 +01:00
Róbert Kelčák 28e43da7af
Update phpmailer.lang-cs.php (#2205) 2020-11-26 23:45:56 +01:00
Róbert Kelčák 4933794b1f
Update Slovak translations (#2204)
* Update phpmailer.lang-sk.php

* Update phpmailer.lang-sk.php
2020-11-26 23:45:19 +01:00
Ayesh Karunaratne fa9c13cefd
Use fully-qualified constant names for PHP versions (#2203)
This is a micro performance improvement. When PHP opcode generates opcodes, it can remove PHP version-specific `if` blocks if it sees `PHP_MAJOR_VERSION` or `PHP_VERSION_ID`. However, if the code belongs to a namespace, it cannot make that optimization because the code under namespace can declare the same constants.
This PR updates such PHP constants to be fully-qualified (with back-slash), which enables PHP to make the improvement.

To compare, this is the VLD opcode without fully-qualified constant names:

```php
namespace X;

if (\PHP_VERSION_ID < 80000) {
    echo "hi";
}
```

-->

```
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E >   FETCH_CONSTANT                                   ~0      'X%5CPHP_MAJOR_VERSION'
         1        IS_SMALLER_OR_EQUAL                              ~1      ~0, 8
         2      > JMPZ                                                     ~1, ->4
   6     3    >   ECHO                                                     'hi'
   7     4    > > RETURN                                                   1
```

The same snippet, with the fully-qualified constants, PHP can simply eliminate and optimize the `if` block:

```
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E > > JMPZ                                                     <true>, ->2
   6     1    >   ECHO                                                     'hi'
   7     2    > > RETURN                                                   1
```
2020-11-25 19:27:52 +01:00