Skip to content

Commit 57a56f1

Browse files
committed
Merge branch 'QA_5_2'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2 parents ff8d5e2 + 1634264 commit 57a56f1

5 files changed

Lines changed: 54 additions & 12 deletions

File tree

ChangeLog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ phpMyAdmin - ChangeLog
148148
- issue #19299 Fix charset in procedure's parameter type
149149
- issue #19316 Fix input size for hexadecimal values
150150
- issue #19321 Suppress deprecation message of E_STRICT constant
151+
- issue Fix PHP 8.4 `str_getcsv` `$escape` parameter deprecation
152+
- issue #19426 Fix PHP warnings when the column is a `COMPRESSED BLOB`
151153

152154
5.2.1 (2023-02-07)
153155
- issue #17522 Fix case where the routes cache file is invalid

bin/internal/create-release.sh

Lines changed: 46 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ do_ci=0
3333
do_sign=1
3434
do_pull=0
3535
do_daily=0
36+
do_revision=0
3637

3738
while [ $# -gt 0 ] ; do
3839
case "$1" in
@@ -45,6 +46,9 @@ while [ $# -gt 0 ] ; do
4546
--test)
4647
do_test=1
4748
;;
49+
--revision-info)
50+
do_revision=1
51+
;;
4852
--daily)
4953
do_sign=0
5054
do_pull=1
@@ -59,18 +63,36 @@ while [ $# -gt 0 ] ; do
5963
branch="ci"
6064
fi
6165
;;
66+
--no-sign)
67+
do_sign=0
68+
;;
69+
--kits)
70+
KITS="$2"
71+
# Skip one position, the value
72+
shift
73+
;;
74+
--compressions)
75+
COMPRESSIONS="$2"
76+
# Skip one position, the value
77+
shift
78+
;;
6279
--help)
6380
echo "Usages:"
64-
echo " create-release.sh <version> <from_branch> [--tag] [--stable] [--test] [--ci]"
81+
echo " create-release.sh <version> <from_branch> [--tag] [--stable] [--test] [--ci] [--daily] [--revision-info] [--compressions] [--kits] [--no-sign]"
6582
echo ""
6683
echo "If --tag is specified, release tag is automatically created (use this for all releases including pre-releases)"
6784
echo "If --stable is specified, the STABLE branch is updated with this release"
6885
echo "If --test is specified, the testsuite is executed before creating the release"
6986
echo "If --ci is specified, the testsuite is executed and no actual release is created"
87+
echo "If --no-sign is specified, the ouput files will not be signed"
88+
echo "If --daily is specified, the ouput files will have snapshot information"
89+
echo "If --revision-info is specified, the output files will contain git revision info"
90+
echo "If --compressions is specified, it changes the compressions available. Space separated values. Valid values: $COMPRESSIONS"
91+
echo "If --kits is specified, it changes the kits to be built. Space separated values. Valid values: $KITS"
7092
echo ""
7193
echo "Examples:"
72-
echo " create-release.sh 2.9.0-rc1 QA_2_9"
73-
echo " create-release.sh 2.9.0 MAINT_2_9_0 --tag --stable"
94+
echo " create-release.sh 5.2.2-dev QA_5_2"
95+
echo " create-release.sh 5.2.2 QA_5_2 --tag --stable"
7496
exit 65
7597
;;
7698
*)
@@ -89,19 +111,20 @@ while [ $# -gt 0 ] ; do
89111
fi
90112
else
91113
echo "Unknown parameter: $1!"
114+
echo "Use --help to check the syntax."
92115
exit 1
93116
fi
94117
esac
95118
shift
96119
done
97120

98-
if [ -z "$branch" ]; then
99-
echo "Branch must be specified!"
121+
if [ -z "$version" ] && [ $do_ci -eq 0 ]; then
122+
echo "Version must be specified!"
100123
exit 1
101124
fi
102125

103-
if [ -z "$version" ] && [ $do_ci -eq 0 ]; then
104-
echo "Version must be specified!"
126+
if [ -z "$branch" ]; then
127+
echo "Branch must be specified!"
105128
exit 1
106129
fi
107130

@@ -504,6 +527,9 @@ if [ -f ./bin/console ]; then
504527
composer install --no-interaction
505528
# Warm up the routing cache for 5.1+ releases
506529
./bin/console cache:warmup --routing
530+
if [ $do_revision -eq 1 ] ; then
531+
./bin/console write-revision-info
532+
fi
507533
fi
508534

509535
echo "* Writing the version to composer.json (version: $version)"
@@ -597,6 +623,8 @@ security_checkup
597623

598624
cd ..
599625

626+
SIGN_FILES=""
627+
600628
# Prepare all kits
601629
for kit in $KITS ; do
602630
echo "* Building kit: $kit"
@@ -653,15 +681,18 @@ for kit in $KITS ; do
653681
if [ "$comp" = txz ] ; then
654682
echo "* Creating $name.tar.xz"
655683
xz -9k "$name".tar
684+
SIGN_FILES="$SIGN_FILES $name.tar.xz"
656685
fi
657686
if [ "$comp" = tgz ] ; then
658687
echo "* Creating $name.tar.gz"
659688
gzip -9c "$name".tar > "$name".tar.gz
689+
SIGN_FILES="$SIGN_FILES $name.tar.gz"
660690
fi
661691
;;
662692
zip-7z)
663693
echo "* Creating $name.zip"
664694
7za a -bd -tzip "$name".zip "$name" > /dev/null
695+
SIGN_FILES="$SIGN_FILES $name.zip"
665696
;;
666697
*)
667698
echo "WARNING: ignoring compression '$comp', not known!"
@@ -681,8 +712,13 @@ rm -r "$workdir_name"
681712
git worktree prune
682713

683714
# Signing of files with default GPG key
684-
echo "* Signing files"
685-
for file in "$kit_prefix"-*.gz "$kit_prefix"-*.zip "$kit_prefix"-*.xz ; do
715+
if [ $do_sign -eq 1 ] ; then
716+
echo "* Signing and making .sha{1,256} files"
717+
else
718+
echo "* Making .sha{1,256} files"
719+
fi
720+
721+
for file in $SIGN_FILES; do
686722
if [ $do_sign -eq 1 ] ; then
687723
gpg --detach-sign --armor "$file"
688724
fi
@@ -707,7 +743,7 @@ echo ""
707743
echo "Files:"
708744
echo "------"
709745

710-
ls -la -- *.gz *.zip *.xz
746+
ls -la $SIGN_FILES
711747

712748
cd ..
713749

src/InsertEditColumn.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function __construct(
4646
}
4747

4848
$this->md5 = md5($this->field);
49-
$this->trueType = preg_replace('@\(.*@s', '', $this->type);
49+
$this->trueType = preg_replace('@(\(.*)|(\s/.*)@s', '', $this->type);
5050
// length is unknown for geometry fields,
5151
// make enough space to edit very simple WKTs
5252
if ($columnLength === -1) {

src/Sql.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ private function resultSetHasJustOneTable(array $fieldsMeta): bool
172172
*/
173173
private function resultSetContainsUniqueKey(string $db, string $table, array $fieldsMeta): bool
174174
{
175+
if ($table === '') {
176+
return false;
177+
}
178+
175179
$columns = $this->dbi->getColumns($db, $table);
176180
$resultSetColumnNames = [];
177181
foreach ($fieldsMeta as $oneMeta) {

src/Util.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1427,7 +1427,7 @@ public static function parseEnumSetValues(string $definition, bool $escapeHtml =
14271427
// It future replace str_getcsv with $dbi->fetchSingleRow('SELECT '.$expressionInBrackets[1]);
14281428

14291429
preg_match('/\((.*)\)/', $definition, $expressionInBrackets);
1430-
$matches = str_getcsv($expressionInBrackets[1], ',', "'");
1430+
$matches = str_getcsv($expressionInBrackets[1], ',', "'", '\\');
14311431

14321432
$values = [];
14331433
foreach ($matches as $value) {

0 commit comments

Comments
 (0)