Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/other-tools.yml3
-rw-r--r--ChangeLog1
-rw-r--r--composer.json10
-rw-r--r--doc/faq.rst18
-rwxr-xr-xscripts/create-release.sh55
5 files changed, 73 insertions, 14 deletions
diff --git a/.github/workflows/other-tools.yml b/.github/workflows/other-tools.yml
index 493fd35990..7b255f8393 100644
--- a/.github/workflows/other-tools.yml
+++ b/.github/workflows/other-tools.yml
@@ -70,9 +70,6 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- - name: Install modules
- run: yarn install --non-interactive
-
- name: Set up Python
uses: actions/setup-python@v2
with:
diff --git a/ChangeLog b/ChangeLog
index bbf71e6e33..6355d5f3e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,6 +38,7 @@ phpMyAdmin - ChangeLog
- issue #17734 PHP deprecations will only be shown when in a development environment
- issue #17369 Fix server error when blowfish_secret is not exactly 32 bytes long
- issue #17736 Add utf8mb3 as an alias of utf8 on the charset description page
+- issue #16418 Fix FAQ 1.44 about manually removing vendor folders
5.2.0 (2022-05-10)
- issue #16521 Upgrade Bootstrap to version 5
diff --git a/composer.json b/composer.json
index b156cd7fdf..95e6de0090 100644
--- a/composer.json
+++ b/composer.json
@@ -24,7 +24,15 @@
"psr-4": {
"PhpMyAdmin\\": "libraries/classes"
},
- "files": ["vendor/phpmyadmin/motranslator/src/functions.php"]
+ "files": ["vendor/phpmyadmin/motranslator/src/functions.php"],
+ "exclude-from-classmap": [
+ "/test/",
+ "/vendor/tecnickcom/tcpdf/tcpdf_barcodes_*.php",
+ "/vendor/tecnickcom/tcpdf/tcpdf_import.php",
+ "/vendor/tecnickcom/tcpdf/tcpdf_parser.php",
+ "/vendor/tecnickcom/tcpdf/include/tcpdf_filters.php",
+ "/vendor/tecnickcom/tcpdf/include/barcodes"
+ ]
},
"autoload-dev": {
"psr-4": {
diff --git a/doc/faq.rst b/doc/faq.rst
index ff1e928f0d..78be8c44f8 100644
--- a/doc/faq.rst
+++ b/doc/faq.rst
@@ -686,16 +686,20 @@ Some users have requested to be able to reduce the size of the phpMyAdmin instal
This is not recommended and could lead to confusion over missing features, but can be done.
A list of files and corresponding functionality which degrade gracefully when removed include:
-* :file:`./vendor/tecnickcom/tcpdf` folder (exporting to PDF)
* :file:`./locale/` folder, or unused subfolders (interface translations)
-* Any unused themes in :file:`./themes/`
-* :file:`./js/vendor/jquery/src/` (included for licensing reasons)
-* :file:`./js/line_counts.php` (removed in phpMyAdmin 4.8)
+* Any unused themes in :file:`./themes/` except the default theme `pmahomme`.
+* :file:`./libraries/language_stats.inc.php` (translation statistics)
* :file:`./doc/` (documentation)
* :file:`./setup/` (setup script)
-* :file:`./examples/`
-* :file:`./sql/` (SQL scripts to configure advanced functionality)
-* :file:`./js/vendor/openlayers/` (GIS visualization)
+* :file:`./examples/` (configuration examples)
+* :file:`./sql/` (SQL scripts to configure advanced functionalities)
+* :file:`./js/src/` (Source files to re-build `./js/dist/`)
+* :file:`./js/config/` (Configuration files to re-build `./js/dist/`)
+* Run `rm -rv vendor/tecnickcom/tcpdf && composer dump-autoload --no-interaction --optimize --dev` (exporting to PDF)
+* Run `rm -rv vendor/williamdes/mariadb-mysql-kbs && composer dump-autoload --no-interaction --optimize --dev` (external links to MariaDB and MySQL documentations)
+* Run `rm -rv vendor/code-lts/u2f-php-server && composer dump-autoload --no-interaction --optimize --dev` (U2F second factor authentication)
+* Run `rm -rv vendor/pragmarx/* && composer dump-autoload --no-interaction --optimize --dev` (2FA second factor authentication)
+* Run `rm -rv vendor/bacon/bacon-qr-code && composer dump-autoload --no-interaction --optimize --dev` (QRcode generation for 2FA second factor authentication)
.. _faq1_45:
diff --git a/scripts/create-release.sh b/scripts/create-release.sh
index b147732436..a8c543a7a8 100755
--- a/scripts/create-release.sh
+++ b/scripts/create-release.sh
@@ -58,7 +58,7 @@ while [ $# -gt 0 ] ; do
git branch ci
branch="ci"
fi
- version="ci"
+ version="${VERSION_SERIES}+ci"
;;
--help)
echo "Usages:"
@@ -302,6 +302,42 @@ security_checkup() {
fi
}
+autoload_checkup() {
+ php <<'CODE'
+<?php
+
+$classMapFiles = require __DIR__ . '/vendor/composer/autoload_classmap.php';
+
+$foundFiles = 0;
+$notFoundFiles = 0;
+
+foreach ($classMapFiles as $classMapFile) {
+ if (! file_exists($classMapFile)) {
+ echo 'Does not exist: ' . $classMapFile . PHP_EOL;
+ $notFoundFiles++;
+ continue;
+ }
+ $foundFiles++;
+}
+
+echo '[autoload class map checkup] Found files: ' . $foundFiles . PHP_EOL;
+echo '[autoload class map checkup] NOT found files: ' . $notFoundFiles . PHP_EOL;
+$minFilesToHave = 1100;// An arbitrary value based on how many files the autoload has on average
+
+if ($foundFiles < $minFilesToHave) {
+ echo '[autoload class map checkup] The project expects at least ' . $minFilesToHave . ' in the autoload class map' . PHP_EOL;
+ exit(1);
+}
+
+if ($notFoundFiles > 0) {
+ echo '[autoload class map checkup] There is some missing files documented in the class map' . PHP_EOL;
+ exit(1);
+}
+echo '[autoload class map checkup] The autoload class map seems okay' . PHP_EOL;
+CODE
+
+}
+
# Ensure we have tracking branch
ensure_local_branch $branch
@@ -449,6 +485,10 @@ if [ -z "$PHP_REQ" ] ; then
echo "Failed to figure out required PHP version from composer.json"
exit 2
fi
+
+echo "* Writing the version to composer.json (version: $version)"
+composer config version "$version"
+
# Okay, there is no way to tell composer to install
# suggested package. Let's require it and then revert
# composer.json to original state.
@@ -456,7 +496,7 @@ cp composer.json composer.json.backup
COMPOSER_VERSION="$(composer --version)"
echo "* Running composer (version: $COMPOSER_VERSION)"
composer config platform.php "$PHP_REQ"
-composer update --no-interaction --no-dev --optimize-autoloader
+composer update --no-interaction --no-dev
# Parse the required versions from composer.json
PACKAGES_VERSIONS=''
@@ -470,7 +510,7 @@ done
echo "* Installing composer packages '$PACKAGES_VERSIONS'"
-composer require --no-interaction --optimize-autoloader --update-no-dev $PACKAGES_VERSIONS
+composer require --no-interaction --update-no-dev $PACKAGES_VERSIONS
echo "* Running a security checkup"
security_checkup
@@ -479,6 +519,15 @@ echo "* Cleaning up vendor folders"
mv composer.json.backup composer.json
cleanup_composer_vendors
+echo "* Re-generating the autoload class map"
+# https://getcomposer.org/doc/articles/autoloader-optimization.md#what-does-it-do-
+# We removed some files, we also need that composer removes them from autoload class maps
+# If the class is in the class map (as explained in the link above) then it is assumed to exist as a file
+composer dump-autoload --no-interaction --optimize --dev
+
+echo "* Running an autoload checkup"
+autoload_checkup
+
echo "* Running a security checkup"
security_checkup
if [ $do_tag -eq 1 ] ; then