Skip to content

Commit 3da2eb9

Browse files
committed
Release phpwcms v1.9.44, the legacy release
Merge branch 'v1.9-dev' into phpwcms-legacy
2 parents 6395aa2 + 3e0fb14 commit 3da2eb9

24 files changed

Lines changed: 1995 additions & 64 deletions

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"require": {
1010
"php": ">=7.4",
11-
"algo26-matthias/idna-convert": "^v3.1.1",
11+
"algo26-matthias/idna-convert": "^v3.2.0",
1212
"enshrined/svg-sanitize": "^0.21.0",
1313
"netcarver/textile": "v4.1.3",
1414
"league/commonmark": "^2.6.1",
@@ -20,6 +20,7 @@
2020
"html2text/html2text": "^4.3.2",
2121
"symfony/polyfill-mbstring": "^v1.31.0",
2222
"symfony/polyfill-php73": "^v1.31.0",
23+
"symfony/polyfill-php74": "^v1.31.0",
2324
"symfony/polyfill-php80": "^v1.31.0",
2425
"symfony/polyfill-php81": "^v1.31.0",
2526
"symfony/polyfill-php82": "^v1.31.0",

include/inc_lib/revision/revision.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
*
1010
**/
1111

12-
const PHPWCMS_VERSION = '1.9.43';
13-
const PHPWCMS_RELEASE_DATE = '2025/03/20';
12+
const PHPWCMS_VERSION = '1.9.44';
13+
const PHPWCMS_RELEASE_DATE = '2025/04/08';
1414
const PHPWCMS_REVISION = '553';

include/vendor/algo26-matthias/idna-convert/.travis.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

include/vendor/algo26-matthias/idna-convert/README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# IDNA Convert - pure PHP IDNA converter
22

33
![latest stable version](https://img.shields.io/github/tag/algo26-matthias/idna-convert.svg)
4-
![Travis CI status](https://img.shields.io/travis/algo26-matthias/idna-convert.svg)
54

65
Project homepage: <http://idnaconv.net><br>
76
by Matthias Sommerfeld <matthias.sommerfeld@algo26.de><br>
@@ -21,7 +20,7 @@ for details) as they can be used with various registries worldwide to be transla
2120
The library provides two classes (`ToIdn` and `ToUnicode` respectively), which expose three public methods to convert between the respective forms. See the Example section below.
2221
This allows you to convert host names (simple labels like `localhost` or FQHNs like `some-host.domain.example`), email addresses and complete URLs.
2322

24-
Errors, incorrectly encoded or invalid strings will lead to various exceptions. They should help you to find out, what went wrong.
23+
Errors, incorrectly encoded or invalid strings will lead to various exceptions. They should help you find out, what went wrong.
2524

2625
Unicode strings are expected to be UTF-8 strings. ACE strings (the Punycode form) are always 7bit ASCII strings.
2726

@@ -35,7 +34,7 @@ composer require algo26-matthias/idna-convert
3534

3635
### Official ZIP Package
3736

38-
The official ZIP packages are discontinued. Stick to Composer or Github to acquire your copy, please.
37+
The official ZIP packages are discontinued. Stick to Composer or GitHub to acquire your copy, please.
3938

4039
## Upgrading from a previous version
4140

@@ -85,7 +84,7 @@ echo utf8_decode($output); // This will read: andre@börse.knörz.info
8584

8685
### Example 3.
8786

88-
The input is read from a UCS-4 coded file and encoded line by line. By appending the optional second parameter we tell enode() about the input format to be used
87+
The input is read from a UCS-4 coded file and encoded line by line. By appending the optional second parameter we tell encode() about the input format to be used
8988

9089
```php
9190
<?php
@@ -132,29 +131,29 @@ Per default, the class converts strings according to IDNA version 2008. To suppo
132131
// Include the class
133132
use Algo26\IdnaConvert\ToIdn;
134133
// Instantiate it, switching to IDNA 2003, the original, now outdated standard
135-
$IDN = new ToIdn(2008);
136-
// Sth. containing the German letter ß
134+
$IDN = new ToIdn(2003);
135+
// Something containing the German letter ß
137136
$input = 'meine-straße.example';
138-
// Encode it to its punycode presentation
137+
// Encode it to its punycode representation
139138
$output = $IDN->convert($input);
140-
// Output, what we got now
139+
// Output what we got now
141140
echo $output; // xn--meine-strae-46a.example
142141

143142
// Switch back to IDNA 2008
144-
$IDN = new ToIdn(2003);
145-
// Sth. containing the German letter ß
143+
$IDN = new ToIdn(2008);
144+
// Something containing the German letter ß
146145
$input = 'meine-straße.example';
147-
// Encode it to its punycode presentation
146+
// Encode it to its punycode representation
148147
$output = $IDN->convert($input);
149-
// Output, what we got now
148+
// Output what we got now
150149
echo $output; // meine-strasse.example
151150
```
152151

153152

154153
## Encoding helper
155154

156155
In case you have strings in encodings other than ISO-8859-1 and UTF-8 you might need to translate these strings to UTF-8 before feeding the IDNA converter with it.
157-
PHP's built in functions `utf8_encode()` and `utf8_decode()` can only deal with ISO-8859-1.
156+
PHP's built-in functions `utf8_encode()` and `utf8_decode()` can only deal with ISO-8859-1.
158157
Use the encoding helper class supplied with this package for the conversion. It requires either iconv, libiconv or mbstring installed together with one of the relevant PHP extensions. The functions you will find useful are
159158
`toUtf8()` as a replacement for `utf8_encode()` and
160159
`fromUtf8()` as a replacement for `utf8_decode()`.
@@ -209,7 +208,7 @@ Please use the [issues tab on GitHub](https://github.com/algo26-matthias/idna-co
209208
210209
## Contact the author
211210
212-
For questions, bug reports and security issues just send me an email.
211+
For questions, bug reports and security issues just drop me a line.
213212
214213
algo26 Beratungs GmbH<br>
215214
c/o Matthias Sommerfeld<br>

include/vendor/algo26-matthias/idna-convert/UPGRADING.md

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
11
# Upgrading from previous versions
22

3-
## 3.0
3+
## 3.2.0
4+
5+
The extra dependency to ext/intl, accidentally introduced with v 3.1 is no longer required.
6+
7+
8+
## 3.1.0
9+
10+
We changed the behaviour of the Punycode algorithm to now include all basic ASCII characters in the output when using `ToPunycode->convert()`.
11+
This change is expected to have no negative effect, but work more closely to the respective RFCs. The old behaviour even led to some endless loops for a few Unicode characters.
12+
13+
14+
## 3.0.0
415

516
The library has been broken down into various specific classes, thus more closely following SOLID principles.
617

718
As such the single class `IdnaConvert` has been broken down into `ToIdn` and `ToUnicode` respectively. Their naming reflects
8-
the format of the outcome, so it's more clear to distinguish, what you need. This should be easier to grasp then the old method names `encode()` and `decode()`.
19+
the format of the outcome, so it's easier picking the right conversion direction.
920
Usually you will only need one conversion direction per script run, so why bother loading and parsing all the other unused code, then?
1021

11-
Also the handling of host names (simple labels like `my-hostname` or FQHNs like `some-host.my-domain.example`) is now separated from
22+
Also, the handling of host names (simple labels like `my-hostname` or FQHNs like `some-host.my-domain.example`) is now separated from
1223
that of email addresses and URLs.
1324
Both classes offer the same set of public methods:
1425

@@ -19,41 +30,46 @@ Both classes offer the same set of public methods:
1930
| `convertUrl()` | To convert the host name of an URL |
2031

2132
There's no "strict mode" anymore, this is achieved by the separate methods above. The IDN version is selected when instantiating the class, no more setting during runtime.
22-
Also the encoding (for the Unicode side of things) is now **always UTF-8**. Use `TransCodeUnicode` or `EncodingHelper` for converting to and from various encodings to UTF-8.
33+
Also, the encoding (for the Unicode side of things) is now **always UTF-8**. Use `TransCodeUnicode` or `EncodingHelper` for converting to and from various encodings to UTF-8.
2334

24-
All actual sub classes like that for NamePrep and the actual Punycode transformation are put in their own namespaces under `Algo26\IdnaConvert`, e.g. `Algo26\IdnaConvert\NamePrep`.
25-
Interfaces and Exceptions also have their own namespace to declutter the class structure even more.
35+
All actual subclasses like that for NamePrep and the actual Punycode transformation are put in their own namespaces under `Algo26\IdnaConvert`, e.g. `Algo26\IdnaConvert\NamePrep`.
36+
Interfaces and Exceptions also have their own namespace to declutter the class structure even more.
2637

2738
The class `EncodingHelper` is now called separated into the two classes `ToUtf8` and `FromUtf8` respectively and lies under the namespace `Algo26\idnaConvert\EncodingHelper`.
2839
The class `UnicodeTranscoder` is now called `TransCodeUnicode` under the namespace `Algo26\idnaConvert\TransCodeUnicode`.
2940

3041
All examples are updated to reflect the new usage. See the ReadMe for more details.
3142

32-
Also the **minimum PHP version is now 7.2**.
43+
Finally, the **minimum PHP version is now 7.2**.
3344

34-
## 2.0
35-
The library has been handed over to actively maintained GitHub and Packagist accounts. This lead to a change in the namespace.
45+
46+
## 2.0.0
47+
The library has been handed over to actively maintained GitHub and Packagist accounts. This led to a change in the namespace.
3648
Replace all occurrences of
3749
`Mso\IdnaConvert` or `PhlyLabs\IdnaConvert` to `Algo26\IdnaConvert`.
3850
There's no further changes to the class signatures.
3951

40-
## 1.0
52+
53+
## 1.0.0
4154
**BC break:**
4255
As of version 1.0.0 the class closely follows the PSRs PSR-1, PSR-2 and PSR-4 of the PHP-FIG.
4356
As such the classes' naming has been changed, a namespace has been introduced and the default IDN version has changed from 2003 to 2008 and minimum PHP engine version raised to 5.6.0.
4457

58+
4559
## 0.8.0
4660
As of version 0.8.0 the class fully supports IDNA 2008.
47-
Thus the aforementioned parameter is deprecated and replaced by a parameter to switch between the standards. See the updated example 5 in the ReadMe.
61+
Thus, the aforementioned parameter is deprecated and replaced by a parameter to switch between the standards. See the updated example 5 in the ReadMe.
62+
4863

4964
## 0.6.4
5065
**BC break:**
5166
As of version 0.6.4 the class per default allows the German ligature ß to be encoded as the DeNIC, the registry for .DE allows domains containing ß.
5267

68+
5369
## 0.6.0
5470
**ATTENTION:** As of version 0.6.0 this class is written in the OOP style of PHP 5.
55-
Since PHP 4 is no longer actively maintained, you should switch to PHP 5 as fast as possible.
56-
We expect to see no compatibility issues with the upcoming PHP 6, too.
71+
Since PHP 4 is no longer actively maintained, you should switch to PHP 5 as quickly as possible.
72+
We expect no compatibility issues with the upcoming ~~PHP 6~~ PHP 7 as well.
5773

5874

5975

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace Algo26\IdnaConvert\NamePrep;
4+
5+
class CaseFolding
6+
{
7+
/** @var CaseFoldingData */
8+
private $caseFoldingData;
9+
10+
public function __construct()
11+
{
12+
$this->caseFoldingData = new CaseFoldingData();
13+
}
14+
15+
public function apply(array $inputArray, string $idnaVersion): array
16+
{
17+
if ($idnaVersion == 2003) {
18+
return $inputArray;
19+
}
20+
21+
$outputArray = [];
22+
foreach ($inputArray as $codePoint) {
23+
if (isset($this->caseFoldingData->foldingMap[$codePoint])) {
24+
foreach ($this->caseFoldingData->foldingMap[$codePoint] as $folded) {
25+
$outputArray[] = $folded;
26+
}
27+
} else {
28+
$outputArray[] = $codePoint;
29+
}
30+
}
31+
32+
return $outputArray;
33+
}
34+
}

0 commit comments

Comments
 (0)