Skip to content

Commit

Permalink
Merge branch '5.1-dev' into banner-svg-support
Browse files Browse the repository at this point in the history
  • Loading branch information
Razzo1987 committed Nov 2, 2023
2 parents 7ca741b + 254b730 commit 9b83d13
Show file tree
Hide file tree
Showing 1,106 changed files with 5,861 additions and 4,301 deletions.
4 changes: 2 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ hosts:
openldap: 127.0.0.1

services:
- mysql
- iis

before_test:
# Run openldap docker image
- ps: docker pull bitnami/openldap:2.6.3
- ps: docker run --rm --name openldap --publish 1389:1389 --publish 1636:1636 -v ${pwd}\tests\certs:/certificates --env LDAP_ADMIN_USERNAME=admin --env LDAP_ADMIN_PASSWORD=adminpassword --env LDAP_USERS=customuser --env LDAP_PASSWORDS=custompassword --env LDAP_ENABLE_TLS=yes --env LDAP_TLS_CERT_FILE=/certificates/openldap.crt --env LDAP_TLS_KEY_FILE=/certificates/openldap.key --env LDAP_TLS_CA_FILE=/certificates/CA.crt --env BITNAMI_DEBUG=true --env LDAP_CONFIG_ADMIN_ENABLED=yes --env LDAP_CONFIG_ADMIN_USERNAME=admin --env LDAP_CONFIG_ADMIN_PASSWORD=configpassword -d bitnami/openldap:2.6.3
# Database setup for MySQL via PowerShell tools
- ps: Start-Service MySQL80
- >
"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u root -p"Password12!" -e "CREATE DATABASE IF NOT EXISTS test_joomla;"
"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql" -u root -p"Password12!" -e "CREATE DATABASE IF NOT EXISTS test_joomla;"
# Wait till slapd has started
- ps: |
$Counter=0
Expand Down
2 changes: 2 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
'ordered_imports' => ['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha'],
// There should not be useless else cases
'no_useless_else' => true,
// Native function invocation
'native_function_invocation' => ['include' => ['@compiler_optimized']],
]
)
->setFinder($finder);
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
Joomla! CMS™
====================

The Joomla! 5.0 branch is under heavy development and not all links in this document are available yet
The Joomla! 5.1 branch is under heavy development and not all links in this document are available yet
------------------------------------------------------------------------------------------------------

Build Status
---------------------
| Drone-CI | AppVeyor | PHP | Node | npm |
|------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|---------------------------------------------------------------------------------|
| [![Build Status](https://ci.joomla.org/api/badges/joomla/joomla-cms/status.svg?branch=5.0-dev)](https://ci.joomla.org/joomla/joomla-cms) | [![Build status](https://ci.appveyor.com/api/projects/status/ru6sxal8jmfckvjc/branch/5.0-dev?svg=true)](https://ci.appveyor.com/project/release-joomla/joomla-cms) | [![PHP](https://img.shields.io/badge/PHP-V8.1.0-green)](https://www.php.net/) | [![node-lts](https://img.shields.io/badge/Node-V18.0-green)](https://nodejs.org/en/) | [![npm](https://img.shields.io/badge/npm-v9.6.7-green)](https://nodejs.org/en/) |
| [![Build Status](https://ci.joomla.org/api/badges/joomla/joomla-cms/status.svg?branch=5.1-dev)](https://ci.joomla.org/joomla/joomla-cms) | [![Build status](https://ci.appveyor.com/api/projects/status/ru6sxal8jmfckvjc/branch/5.1-dev?svg=true)](https://ci.appveyor.com/project/release-joomla/joomla-cms) | [![PHP](https://img.shields.io/badge/PHP-V8.1.0-green)](https://www.php.net/) | [![node-lts](https://img.shields.io/badge/Node-V18.0-green)](https://nodejs.org/en/) | [![npm](https://img.shields.io/badge/npm-v9.6.7-green)](https://nodejs.org/en/) |

Overview
---------------------
* This is the source of Joomla! 5.x.
* Joomla's [Official website](https://www.joomla.org).
* Joomla! 5.0 [version history](https://docs.joomla.org/Special:MyLanguage/Joomla_5.0_version_history).
* Detailed changes are in the [changelog](https://github.com/joomla/joomla-cms/commits/5.0-dev).
* Joomla! 5.1 [version history](https://docs.joomla.org/Special:MyLanguage/Joomla_5.1_version_history).
* Detailed changes are in the [changelog](https://github.com/joomla/joomla-cms/commits/5.1-dev).

What is Joomla?
---------------------
Expand Down Expand Up @@ -48,9 +48,9 @@ git clone https://github.com/joomla/joomla-cms.git
```bash
cd joomla-cms
```
- Go to the 5.0-dev branch:
- Go to the 5.1-dev branch:
```bash
git checkout 5.0-dev
git checkout 5.1-dev
```
- Install all the needed composer packages:
```bash
Expand Down
6 changes: 3 additions & 3 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Joomla! CMS™

The Joomla! 5.0 branch is under heavy development and not all links in this document are available yet
The Joomla! 5.1 branch is under heavy development and not all links in this document are available yet
------------------------------------------------------------------------------------------------------

1- Overview
* This is a Joomla! 5.x installation/upgrade package.
* Joomla! Official site: https://www.joomla.org
* Joomla! 5.0 version history - https://docs.joomla.org/Special:MyLanguage/Joomla_5.0_version_history
* Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/5.0-dev
* Joomla! 5.1 version history - https://docs.joomla.org/Special:MyLanguage/Joomla_5.1_version_history
* Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/5.1-dev

2- What is Joomla?
* Joomla! is a Content Management System (CMS) which enables you to build websites and powerful online applications.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;
\defined('_JEXEC') or die;

use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ function admin_postinstall_behindproxy_condition()
return false;
}

if (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER) && !empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
if (\array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER) && !empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
return true;
}

if (array_key_exists('HTTP_CLIENT_IP', $_SERVER) && !empty($_SERVER['HTTP_CLIENT_IP'])) {
if (\array_key_exists('HTTP_CLIENT_IP', $_SERVER) && !empty($_SERVER['HTTP_CLIENT_IP'])) {
return true;
}

Expand Down
110 changes: 102 additions & 8 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
*/

Expand Down Expand Up @@ -81,7 +81,7 @@ protected function collectError(string $context, \Throwable $error)
// The errorCollector are required
// However when someone already running the script manually the code may fail.
if ($this->errorCollector) {
call_user_func($this->errorCollector, $context, $error);
\call_user_func($this->errorCollector, $context, $error);
} else {
Log::add($error->getMessage(), Log::ERROR, 'Update');
}
Expand All @@ -104,7 +104,7 @@ public function preflight($action, $installer)
if (!empty($installer->extension->manifest_cache)) {
$manifestValues = json_decode($installer->extension->manifest_cache, true);

if (array_key_exists('version', $manifestValues)) {
if (\array_key_exists('version', $manifestValues)) {
$this->fromVersion = $manifestValues['version'];

return true;
Expand Down Expand Up @@ -2115,6 +2115,85 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
// From 5.0.0-beta1 to 5.0.0-beta2
'/language/en-GB/lib_simplepie.sys.ini',
'/libraries/src/Cache/Storage/WincacheStorage.php',
// From 5.0.0-beta2 to 5.0.0-beta3
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/AbstractString.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/AbstractTime.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/ASNObject.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Base128.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Composite/AttributeTypeAndValue.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Composite/RDNString.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Composite/RelativeDistinguishedName.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Construct.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Exception/NotImplementedException.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Exception/ParserException.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/ExplicitlyTaggedObject.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Identifier.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/OID.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Parsable.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/TemplateParser.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/BitString.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/BMPString.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/Boolean.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/CharacterString.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/Enumerated.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/GeneralizedTime.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/GeneralString.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/GraphicString.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/IA5String.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/Integer.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/NullObject.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/NumericString.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/ObjectDescriptor.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/ObjectIdentifier.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/OctetString.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/PrintableString.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/RelativeObjectIdentifier.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/Sequence.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/Set.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/T61String.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/UniversalString.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/UTCTime.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/UTF8String.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal/VisibleString.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/UnknownConstructedObject.php',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/UnknownObject.php',
'/libraries/vendor/fgrosse/phpasn1/lib/Utility/BigInteger.php',
'/libraries/vendor/fgrosse/phpasn1/lib/Utility/BigIntegerBcmath.php',
'/libraries/vendor/fgrosse/phpasn1/lib/Utility/BigIntegerGmp.php',
'/libraries/vendor/fgrosse/phpasn1/lib/X509/AlgorithmIdentifier.php',
'/libraries/vendor/fgrosse/phpasn1/lib/X509/CertificateExtensions.php',
'/libraries/vendor/fgrosse/phpasn1/lib/X509/CertificateSubject.php',
'/libraries/vendor/fgrosse/phpasn1/lib/X509/CSR/Attributes.php',
'/libraries/vendor/fgrosse/phpasn1/lib/X509/CSR/CSR.php',
'/libraries/vendor/fgrosse/phpasn1/lib/X509/PrivateKey.php',
'/libraries/vendor/fgrosse/phpasn1/lib/X509/PublicKey.php',
'/libraries/vendor/fgrosse/phpasn1/lib/X509/SAN/DNSName.php',
'/libraries/vendor/fgrosse/phpasn1/lib/X509/SAN/IPAddress.php',
'/libraries/vendor/fgrosse/phpasn1/lib/X509/SAN/SubjectAlternativeNames.php',
'/libraries/vendor/fgrosse/phpasn1/LICENSE',
'/libraries/vendor/stella-maris/clock/LICENSE.md',
'/libraries/vendor/stella-maris/clock/src/ClockInterface.php',
'/media/com_scheduler/css/admin-view-select-task.css',
'/media/com_scheduler/css/admin-view-select-task.min.css',
'/media/com_scheduler/css/admin-view-select-task.min.css.gz',
'/media/system/css/calendar-jos.css',
'/media/system/css/calendar-jos.min.css',
'/media/system/css/calendar-jos.min.css.gz',
'/media/system/css/debug.css',
'/media/system/css/debug.min.css',
'/media/system/css/debug.min.css.gz',
'/media/system/css/frontediting.css',
'/media/system/css/frontediting.min.css',
'/media/system/css/frontediting.min.css.gz',
'/media/system/css/mootree.css',
'/media/system/css/mootree.min.css',
'/media/system/css/mootree.min.css.gz',
'/media/system/css/mootree_rtl.css',
'/media/system/css/mootree_rtl.min.css',
'/media/system/css/mootree_rtl.min.css.gz',
'/media/system/css/sortablelist.css',
'/media/system/css/sortablelist.min.css',
'/media/system/css/sortablelist.min.css.gz',
];

$folders = [
Expand Down Expand Up @@ -2334,6 +2413,21 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
'/templates/system/incompatible.html,',
'/media/plg_system_compat',
'/media/plg_editors_tinymce/js/plugins/highlighter',
// From 5.0.0-beta2 to 5.0.0-beta3
'/libraries/vendor/stella-maris/clock/src',
'/libraries/vendor/stella-maris/clock',
'/libraries/vendor/stella-maris',
'/libraries/vendor/fgrosse/phpasn1/lib/X509/SAN',
'/libraries/vendor/fgrosse/phpasn1/lib/X509/CSR',
'/libraries/vendor/fgrosse/phpasn1/lib/X509',
'/libraries/vendor/fgrosse/phpasn1/lib/Utility',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Universal',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Exception',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1/Composite',
'/libraries/vendor/fgrosse/phpasn1/lib/ASN1',
'/libraries/vendor/fgrosse/phpasn1/lib',
'/libraries/vendor/fgrosse/phpasn1',
'/libraries/vendor/fgrosse',
];

$status['files_checked'] = $files;
Expand Down Expand Up @@ -2369,11 +2463,11 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)

$this->fixFilenameCasing();

if ($suppressOutput === false && count($status['folders_errors'])) {
if ($suppressOutput === false && \count($status['folders_errors'])) {
echo implode('<br>', $status['folders_errors']);
}

if ($suppressOutput === false && count($status['files_errors'])) {
if ($suppressOutput === false && \count($status['files_errors'])) {
echo implode('<br>', $status['files_errors']);
}

Expand Down Expand Up @@ -2678,7 +2772,7 @@ private function migrateTinymceConfiguration(): bool
$replace = ['blocks', 'fontfamily', 'fontsize', 'styles'];

// Don't redo the template
if (!in_array('jtemplate', $params['configuration']['toolbars'][$setIdx]['menu'])) {
if (!\in_array('jtemplate', $params['configuration']['toolbars'][$setIdx]['menu'])) {
$search[] = 'template';
$replace[] = 'jtemplate';
}
Expand All @@ -2702,7 +2796,7 @@ private function migrateTinymceConfiguration(): bool
$replace = ['fontfamily', 'fontsize', 'blocks', 'styles'];

// Don't redo the template
if (!in_array('jtemplate', $params['configuration']['toolbars'][$setIdx][$toolbarIdx])) {
if (!\in_array('jtemplate', $params['configuration']['toolbars'][$setIdx][$toolbarIdx])) {
$search[] = 'template';
$replace[] = 'jtemplate';
}
Expand Down Expand Up @@ -2838,7 +2932,7 @@ protected function fixFilenameCasing()
// Check if case-insensitive file system, eg on OSX.
if (fileinode($oldRealpath) === fileinode($newRealpath)) {
// Check deeper because even realpath or glob might not return the actual case.
if (!in_array($expectedBasename, scandir(dirname($newRealpath)))) {
if (!\in_array($expectedBasename, scandir(\dirname($newRealpath)))) {
// Rename the file.
File::move(JPATH_ROOT . $old, JPATH_ROOT . $old . '.tmp');
File::move(JPATH_ROOT . $old . '.tmp', JPATH_ROOT . $expected);
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_admin/services/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;
\defined('_JEXEC') or die;

use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_admin/src/Model/SysinfoModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ public function &getPHPInfo(): string
preg_match_all('#<body[^>]*>(.*)</body>#siU', $phpInfo, $output);
$output = preg_replace('#<table[^>]*>#', '<table class="table">', $output[1][0]);
$output = preg_replace('#(\w),(\w)#', '\1, \2', $output);
$output = preg_replace('#<hr />#', '', $output);
$output = str_replace('<hr />', '', $output);
$output = str_replace('<div class="text-center">', '', $output);
$output = preg_replace('#<tr class="h">(.*)</tr>#', '<thead><tr class="h">$1</tr></thead><tbody>', $output);
$output = str_replace('</table>', '</tbody></table>', $output);
Expand Down Expand Up @@ -679,7 +679,7 @@ private function addDirectory(string $name, string $path, string $message = ''):
*/
public function &getEditor(): string
{
if (!is_null($this->editor)) {
if (!\is_null($this->editor)) {
return $this->editor;
}

Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_ajax/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;
\defined('_JEXEC') or die;

require_once JPATH_SITE . '/components/com_ajax/ajax.php';
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;
\defined('_JEXEC') or die;

use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_banners/helpers/banners.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
*/

Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_banners/services/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;
\defined('_JEXEC') or die;

use Joomla\CMS\Categories\CategoryFactoryInterface;
use Joomla\CMS\Component\Router\RouterFactoryInterface;
Expand Down

0 comments on commit 9b83d13

Please sign in to comment.