Skip to content

Commit

Permalink
Merge branch '5.3-dev' into feature-article-module
Browse files Browse the repository at this point in the history
  • Loading branch information
LadySolveig authored Oct 7, 2024
2 parents 8de72b5 + 0f4dbee commit edf53e8
Show file tree
Hide file tree
Showing 939 changed files with 13,389 additions and 7,244 deletions.
29 changes: 23 additions & 6 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ steps:
- ./libraries/vendor/bin/phpcs --extensions=php -p --standard=ruleset.xml .
- echo $(date)

- name: phan
image: joomlaprojects/docker-images:php8.1-ast
- name: phpstan
image: joomlaprojects/docker-images:php8.2
depends_on: [ phpcs ]
failure: ignore
commands:
- ./libraries/vendor/bin/phan
- ./libraries/vendor/bin/phpstan

- name: npm
image: node:20-bullseye-slim
Expand Down Expand Up @@ -162,6 +162,10 @@ steps:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/System/drone-system-run.sh "$(pwd)" cmysqlmax mysqli mysql
when:
event:
exclude:
- pull_request

- name: phpnext-system-mysql
depends_on:
Expand All @@ -177,6 +181,10 @@ steps:
- echo "This test is disabled because php next is not stable yet"
- exit 1
- bash tests/System/drone-system-run.sh "$(pwd)" cmysqlnext mysqli mysql
when:
event:
exclude:
- pull_request

- name: phpmin-system-postgres
depends_on:
Expand All @@ -189,6 +197,10 @@ steps:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/System/drone-system-run.sh "$(pwd)" cpostgres pgsql postgres
when:
event:
exclude:
- pull_request

- name: phpmax-system-postgres
depends_on:
Expand Down Expand Up @@ -216,6 +228,10 @@ steps:
- echo "This test is disabled because php next is not stable yet"
- exit 1
- bash tests/System/drone-system-run.sh "$(pwd)" cpostgresnext pgsql postgres
when:
event:
exclude:
- pull_request

- name: artifacts-system-tests
image: joomlaprojects/docker-images:packager
Expand Down Expand Up @@ -392,15 +408,16 @@ steps:
- rclone delete nightly:/home/devj/public_html/nightlies/ --include "Joomla_$MINORVERSION.*"
- rclone delete nightly:/home/devj/public_html/cache/com_content/
- rclone copy ./transfer/ nightly:/home/devj/public_html/nightlies/
- curl -i -X POST -H 'Content-Type:application/json' -d '{"text":"Nightly Build for [Joomla 5.2](https://developer.joomla.org/nightly-builds.html) successfully built."}' $MATTERMOST_NIGHTLY_HOOK
- curl -i -X POST -H 'Content-Type:application/json' -d '{"text":"Nightly Build for [Joomla $MINORVERSION](https://developer.joomla.org/nightly-builds.html) successfully built."}' $MATTERMOST_NIGHTLY_HOOK

- name: buildfailure
image: joomlaprojects/docker-images:packager
environment:
MATTERMOST_NIGHTLY_HOOK:
from_secret: mattermost_nightly_hook
commands:
- curl -i -X POST -H 'Content-Type:application/json' -d '{"text":"Nightly Build for [Joomla 5.2](https://developer.joomla.org/nightly-builds.html) FAILED to built."}' $MATTERMOST_NIGHTLY_HOOK
- export MINORVERSION=${DRONE_BRANCH%-*}
- curl -i -X POST -H 'Content-Type:application/json' -d '{"text":"Nightly Build for [Joomla $MINORVERSION](https://developer.joomla.org/nightly-builds.html) FAILED to built."}' $MATTERMOST_NIGHTLY_HOOK
when:
status:
- failure
Expand All @@ -414,6 +431,6 @@ trigger:

---
kind: signature
hmac: bd41423d85abadb875c8fc911f87596ead88b62d26fabf6a283737c5a7b4c5b9
hmac: 4651bf03bdeacfec868856dca94418b8999543e6bc05c3797e927734c878ea89

...
2 changes: 1 addition & 1 deletion .github/workflows/create-translation-pull-request-v4.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create translation pull request
name: Create translation pull request J4

on:
push:
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/create-translation-pull-request-v5.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
name: Create translation pull request
name: Create translation pull request J5

on:
push:
branches: [ translation ]
branches: [ translation5 ]

workflow_dispatch:

schedule:
# Run daily at 7:32
- cron: '32 7 * * *'

env:
JOOMLA_MAJOR_VERSION: 5
JOOMLA_MINOR_VERSION: 5.3

permissions:
contents: read

Expand All @@ -25,6 +29,7 @@ jobs:
- uses: actions/checkout@v3
# We need the full depth to create / update the pull request against the main repo
with:
ref: translation5
fetch-depth: 0
- uses: actions/setup-node@v3
with:
Expand All @@ -37,7 +42,7 @@ jobs:
git remote add upstream https://github.com/joomla/joomla-cms.git
git fetch upstream
git checkout --progress --force -B translation5 refs/remotes/origin/translation5
git merge upstream/5.1-dev
git merge upstream/${{ env.JOOMLA_MINOR_VERSION }}-dev
- name: Fetch and extract translations
run: |
Expand All @@ -49,11 +54,9 @@ jobs:
# We use a simple copy paste syntax here if needed customization for different directories
run: |
cd ..
SYNC_VERSION="v5"
SYNC_PATH="installation/language/"
echo ${SYNC_PATH}
rsync -i -rptgo --checksum --ignore-times --delete --exclude="*en-GB*" core-translations-main/joomla_${SYNC_VERSION}/translations/core/${SYNC_PATH} joomla-cms/${SYNC_PATH}
rsync -i -rptgo --checksum --ignore-times --delete --exclude="*en-GB*" core-translations-main/joomla_v${{ env.JOOMLA_MAJOR_VERSION }}/translations/core/${SYNC_PATH} joomla-cms/${SYNC_PATH}
- name: Update static error pages
run: |
Expand All @@ -73,5 +76,5 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
run: |
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "[5.x] Translation Update" | grep -v "No pull" || \
gh pr create --title "[5.x] Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 5.1-dev
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "[${{ env.JOOMLA_MINOR_VERSION }}] Translation Update" --base ${{ env.JOOMLA_MINOR_VERSION }}-dev | grep -v "No pull" || \
gh pr create --title "[${{ env.JOOMLA_MINOR_VERSION }}] Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base ${{ env.JOOMLA_MINOR_VERSION }}-dev
24 changes: 13 additions & 11 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,27 +68,29 @@
->setRules(
[
// Basic ruleset is PSR 12
'@PSR12' => true,
'@PSR12' => true,
// Short array syntax
'array_syntax' => ['syntax' => 'short'],
'array_syntax' => ['syntax' => 'short'],
// List of values separated by a comma is contained on a single line should not have a trailing comma like [$foo, $bar,] = ...
'no_trailing_comma_in_singleline' => true,
'no_trailing_comma_in_singleline' => true,
// Arrays on multiline should have a trailing comma
'trailing_comma_in_multiline' => ['elements' => ['arrays']],
'trailing_comma_in_multiline' => ['elements' => ['arrays']],
// Align elements in multiline array and variable declarations on new lines below each other
'binary_operator_spaces' => ['operators' => ['=>' => 'align_single_space_minimal', '=' => 'align']],
'binary_operator_spaces' => ['operators' => ['=>' => 'align_single_space_minimal', '=' => 'align']],
// The "No break" comment in switch statements
'no_break_comment' => ['comment_text' => 'No break'],
'no_break_comment' => ['comment_text' => 'No break'],
// Remove unused imports
'no_unused_imports' => true,
'no_unused_imports' => true,
// Classes from the global namespace should not be imported
'global_namespace_import' => ['import_classes' => false, 'import_constants' => false, 'import_functions' => false],
'global_namespace_import' => ['import_classes' => false, 'import_constants' => false, 'import_functions' => false],
// Alpha order imports
'ordered_imports' => ['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha'],
'ordered_imports' => ['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha'],
// There should not be useless else cases
'no_useless_else' => true,
'no_useless_else' => true,
// Native function invocation
'native_function_invocation' => ['include' => ['@compiler_optimized']],
'native_function_invocation' => ['include' => ['@compiler_optimized']],
// Adds null to type declarations when parameter have a default null value
'nullable_type_declaration_for_default_null_value' => true,
]
)
->setFinder($finder);
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Overview
---------------------
* This is the source of Joomla! 5.x.
* Joomla's [Official website](https://www.joomla.org).
* Joomla! 5.2 [version history](https://docs.joomla.org/Special:MyLanguage/Joomla_5.2_version_history).
* Joomla! 5.3 [version history](https://docs.joomla.org/Special:MyLanguage/Joomla_5.3_version_history).
* Detailed changes are in the [changelog](https://github.com/joomla/joomla-cms/commits/5.2-dev).

What is Joomla?
Expand Down
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The Joomla! 5.2 branch is under heavy development and not all links in this docu
1- Overview
* This is a Joomla! 5.x installation/upgrade package.
* Joomla! Official site: https://www.joomla.org
* Joomla! 5.2 version history - https://docs.joomla.org/Special:MyLanguage/Joomla_5.2_version_history
* Joomla! 5.3 version history - https://docs.joomla.org/Special:MyLanguage/Joomla_5.3_version_history
* Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/5.2-dev

2- What is Joomla?
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_actionlogs/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
label="COM_ACTIONLOGS_LOG_EXTENSIONS_LABEL"
multiple="true"
layout="joomla.form.field.list-fancy-select"
default="com_banners,com_cache,com_categories,com_checkin,com_config,com_contact,com_content,com_fields,com_installer,com_media,com_menus,com_messages,com_modules,com_newsfeeds,com_plugins,com_redirect,com_scheduler,com_tags,com_templates,com_users"
default="com_banners,com_cache,com_categories,com_checkin,com_config,com_contact,com_content,com_fields,com_guidedtours,com_installer,com_media,com_menus,com_messages,com_modules,com_newsfeeds,com_plugins,com_redirect,com_scheduler,com_tags,com_templates,com_users"
/>
<field
name="loggable_api"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ class ActionlogsController extends AdminController
/**
* Constructor.
*
* @param array $config An optional associative array of configuration settings.
* @param array $config An optional associative array of configuration settings.
* Recognized key values include 'name', 'default_task', 'model_path', and
* 'view_path' (this list is not meant to be comprehensive).
* @param MVCFactoryInterface $factory The factory.
* @param CMSApplication $app The Application for the dispatcher
* @param Input $input Input
* @param ?MVCFactoryInterface $factory The factory.
* @param CMSApplication $app The Application for the dispatcher
* @param Input $input Input
*
* @since 3.9.0
*
* @throws \Exception
*/
public function __construct($config = [], MVCFactoryInterface $factory = null, $app = null, $input = null)
public function __construct($config = [], ?MVCFactoryInterface $factory = null, $app = null, $input = null)
{
parent::__construct($config, $factory, $app, $input);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// phpcs:enable PSR1.Files.SideEffects

/**
* Plugins display controller.
* Actionlogs display controller.
*
* @since 4.0.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static function getCsvData($data): \Generator
{
if (!is_iterable($data)) {
throw new \InvalidArgumentException(
sprintf(
\sprintf(
'%s() requires an array or object implementing the Traversable interface, a %s was given.',
__METHOD__,
\is_object($data) ? \get_class($data) : \gettype($data)
Expand Down Expand Up @@ -274,6 +274,12 @@ public static function getContentTypeLink($component, $contentType, $id, $urlVar
*/
public static function loadActionLogPluginsLanguage()
{
static $loaded;
if ($loaded) {
return;
}
$loaded = true;

$lang = Factory::getLanguage();
$db = Factory::getDbo();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ActionlogModel extends BaseDatabaseModel implements UserFactoryAwareInterf
public function addLog($messages, $messageLanguageKey, $context, $userId = 0)
{
if (!is_numeric($userId)) {
@trigger_error(sprintf('User ID must be an integer in %s.', __METHOD__), E_USER_DEPRECATED);
@trigger_error(\sprintf('User ID must be an integer in %s.', __METHOD__), E_USER_DEPRECATED);
}

$user = $userId ? $this->getUserFactory()->loadUserById($userId) : $this->getCurrentUser();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Actionlogs\Administrator\Helper\ActionlogsHelper;
use Joomla\Component\Actionlogs\Administrator\Model\ActionlogsModel;
Expand Down Expand Up @@ -134,7 +133,7 @@ public function display($tpl = null)
protected function addToolbar()
{
ToolbarHelper::title(Text::_('COM_ACTIONLOGS_MANAGER_USERLOGS'), 'icon-list-2');
$toolbar = Toolbar::getInstance();
$toolbar = $this->getDocument()->getToolbar();

$toolbar->standardButton('download', 'COM_ACTIONLOGS_EXPORT_CSV', 'actionlogs.exportSelectedLogs')
->icon('icon-download')
Expand Down
23 changes: 20 additions & 3 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ protected function updateManifestCaches()
if (!$installer->refreshManifestCache($extension->extension_id)) {
$this->collectError(
__METHOD__,
new \Exception(sprintf(
new \Exception(\sprintf(
'Error on updating manifest cache: (type, element, folder, client) = (%s, %s, %s, %s)',
$extension->type,
$extension->element,
Expand Down Expand Up @@ -2333,6 +2333,23 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
'/libraries/vendor/cweagans/composer-patches/src/Patches.php',
'/libraries/vendor/cweagans/composer-patches/tests/PatchEventTest.php',
'/libraries/vendor/laminas/laminas-diactoros/PATCHES.txt',
// From 5.1.2 to 5.1.3
'/libraries/vendor/joomla/application/rector.php',
'/libraries/vendor/joomla/console/.drone.jsonnet',
'/libraries/vendor/joomla/console/.drone.yml',
'/libraries/vendor/joomla/database/.drone.jsonnet',
'/libraries/vendor/joomla/database/.drone.yml',
'/libraries/vendor/joomla/database/phpunit.appveyor_sql2012sp1.xml.dist',
'/libraries/vendor/joomla/database/phpunit.appveyor_sql2014.xml.dist',
'/libraries/vendor/joomla/database/phpunit.appveyor_sql2017.xml.dist',
'/libraries/vendor/joomla/database/phpunit.mariadb.xml.dist',
'/libraries/vendor/joomla/database/phpunit.mysql.xml.dist',
'/libraries/vendor/joomla/database/phpunit.mysqli.xml.dist',
'/libraries/vendor/joomla/database/phpunit.pgsql.xml.dist',
'/libraries/vendor/joomla/database/phpunit.sqlite.xml.dist',
'/libraries/vendor/joomla/database/phpunit.sqlsrv.xml.dist',
'/libraries/vendor/joomla/session/.drone.jsonnet',
'/libraries/vendor/joomla/session/.drone.yml',
// From 5.2.0-alpha2 to 5.2.0-alpha3
'/libraries/vendor/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/fonts/FontAwesome.otf',
'/libraries/vendor/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.eot',
Expand Down Expand Up @@ -2619,7 +2636,7 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
if (File::delete(JPATH_ROOT . $file)) {
$status['files_deleted'][] = $file;
} else {
$status['files_errors'][] = sprintf('Error on deleting file or folder %s', $file);
$status['files_errors'][] = \sprintf('Error on deleting file or folder %s', $file);
}
}
}
Expand All @@ -2633,7 +2650,7 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
if (Folder::delete(JPATH_ROOT . $folder)) {
$status['folders_deleted'][] = $folder;
} else {
$status['folders_errors'][] = sprintf('Error on deleting file or folder %s', $folder);
$status['folders_errors'][] = \sprintf('Error on deleting file or folder %s', $folder);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- Add mod_articles module
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`) VALUES
(0, 'mod_articles', 'module', 'mod_articles', '', 0, 1, 0, 0, 1, '', '', '');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
--
-- Add the Guided Tours selectable option to the User Action Logs
--
INSERT INTO `#__action_logs_extensions` (`extension`) VALUES ('com_guidedtours');

INSERT INTO `#__action_log_config` (`type_title`, `type_alias`, `id_holder`, `title_holder`, `table_name`, `text_prefix`) VALUES
('guidedtour', 'com_guidedtours.state', 'id', 'title', '#__guidedtours', 'PLG_ACTIONLOG_JOOMLA');
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
INSERT INTO `#__guidedtours` (`title`, `description`, `extensions`, `url`, `published`, `language`, `note`, `access`, `uid`, `autostart`, `created`, `created_by`, `modified`, `modified_by`) VALUES
('COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_TITLE', 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_DESCRIPTION', '["com_cpanel"]', 'administrator/index.php', 1, '*', '', 1, 'joomla-whatsnew-5-2', 1, CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0);
INSERT INTO `#__guidedtour_steps` (`title`, `description`, `position`, `target`, `type`, `interactive_type`, `url`, `published`, `language`, `note`, `params`, `tour_id`, `created`, `created_by`, `modified`, `modified_by`)
SELECT 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_STEP_0_TITLE', 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_STEP_0_DESCRIPTION', 'right', '#sidebarmenu nav > ul:first-of-type > li:last-child', 0, 1, '', 1, '*', '', '{"required":1,"requiredvalue":""}', MAX(`id`), CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0
FROM `#__guidedtours`
WHERE `uid` = 'joomla-whatsnew-5-2';
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
UPDATE `#__guidedtour_steps`
SET `ordering` = `ordering` + 1
WHERE `title` IN ('COM_GUIDEDTOURS_TOUR_GUIDEDTOURS_STEP_SAVECLOSE_TITLE', 'COM_GUIDEDTOURS_TOUR_GUIDEDTOURS_STEP_CONGRATULATIONS_TITLE');

INSERT INTO `#__guidedtour_steps` (`title`, `description`, `position`, `target`, `type`, `interactive_type`, `url`, `published`, `language`, `note`, `tour_id`, `created`, `created_by`, `modified`, `modified_by`, `ordering`)
SELECT 'COM_GUIDEDTOURS_TOUR_GUIDEDTOURS_STEP_AUTOSTART_TITLE', 'COM_GUIDEDTOURS_TOUR_GUIDEDTOURS_STEP_AUTOSTART_DESCRIPTION', 'bottom', '#jform_autostart0', 2, 3, '', 1, '*', '', `tour_id`, CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0, `ordering` + 1
FROM `#__guidedtour_steps`
WHERE `title` = 'COM_GUIDEDTOURS_TOUR_GUIDEDTOURS_STEP_COMPONENT_TITLE';
Loading

0 comments on commit edf53e8

Please sign in to comment.