Skip to content

Commit

Permalink
Merge branch '5.1-dev' into 5.1/custom-fields-form
Browse files Browse the repository at this point in the history
  • Loading branch information
bembelimen committed Mar 2, 2024
2 parents 343863b + 477ff5b commit a86650f
Show file tree
Hide file tree
Showing 873 changed files with 14,866 additions and 5,461 deletions.
33 changes: 27 additions & 6 deletions .drone.yml
Expand Up @@ -6,15 +6,15 @@ clone:

steps:
- name: setup
image: joomlaprojects/docker-images:php8.2
image: joomlaprojects/docker-images:php8.3
volumes:
- name: certificates
path: /certificates
commands:
- cp -v tests/certs/* /certificates/

- name: composer
image: joomlaprojects/docker-images:php8.2
image: joomlaprojects/docker-images:php8.3
volumes:
- name: composer-cache
path: /tmp/composer-cache
Expand Down Expand Up @@ -63,6 +63,13 @@ steps:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Unit

- name: php83-unit
depends_on: [ phpcs ]
image: joomlaprojects/docker-images:php8.3
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Unit

- name: php81-integration
depends_on: [ npm ]
image: joomlaprojects/docker-images:php8.1
Expand All @@ -77,6 +84,13 @@ steps:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration

- name: php83-integration
depends_on: [ npm ]
image: joomlaprojects/docker-images:php8.3
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration

- name: php81-integration-pgsql
depends_on: [ npm ]
image: joomlaprojects/docker-images:php8.1
Expand All @@ -91,6 +105,13 @@ steps:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist

- name: php83-integration-pgsql
depends_on: [ npm ]
image: joomlaprojects/docker-images:php8.3
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist

- name: scss-cs
depends_on: [ npm ]
image: node:current-alpine
Expand Down Expand Up @@ -145,7 +166,7 @@ steps:
- name: phpnext-system-mysql
depends_on:
- phpmax-system-mysql
image: joomlaprojects/docker-images:cypress8.2
image: joomlaprojects/docker-images:cypress8.3
volumes:
- name: cypress-cache
path: /root/.cache/Cypress
Expand Down Expand Up @@ -184,7 +205,7 @@ steps:
- name: phpnext-system-postgres
depends_on:
- phpmax-system-postgres
image: joomlaprojects/docker-images:cypress8.2
image: joomlaprojects/docker-images:cypress8.3
volumes:
- name: cypress-cache
path: /root/.cache/Cypress
Expand Down Expand Up @@ -333,7 +354,7 @@ steps:
- mkdir -p transfer
- date +%s > transfer/$MINORVERSION-time.txt
- git rev-parse origin/$MINORVERSION-dev > transfer/$MINORVERSION.txt
- php build/build.php --remote=origin/$MINORVERSION-dev --exclude-gzip --exclude-bzip2 --disable-patch-packages
- php build/build.php --remote=origin/$MINORVERSION-dev --exclude-gzip --disable-patch-packages
- mv build/tmp/packages/* transfer/

- name: upload
Expand Down Expand Up @@ -382,6 +403,6 @@ trigger:

---
kind: signature
hmac: 5814cadc441b90eec51da0aa32cd29ff1014c4d759841cc70063b5e9245d2b08
hmac: c1434b09300896f8627ccb11c92e97878caf7a303772db01a647dca53a92fa3f

...
49 changes: 0 additions & 49 deletions .github/workflows/cacert-update.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/create-translation-pull-request-v4.yml
Expand Up @@ -28,7 +28,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20

- name: Fetch latest cms changes
run: |
Expand All @@ -37,7 +37,7 @@ jobs:
git remote add upstream https://github.com/joomla/joomla-cms.git
git fetch upstream
git checkout --progress --force -B translation refs/remotes/origin/translation
git merge upstream/4.3-dev
git merge upstream/4.4-dev
- name: Fetch and extract translations
run: |
Expand Down Expand Up @@ -73,5 +73,5 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
run: |
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "Translation Update" | grep -v "No pull" || \
gh pr create --title "Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 4.3-dev
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "[4.x] Translation Update" | grep -v "No pull" || \
gh pr create --title "[4.x] Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 4.4-dev
77 changes: 77 additions & 0 deletions .github/workflows/create-translation-pull-request-v5.yml
@@ -0,0 +1,77 @@
name: Create translation pull request

on:
push:
branches: [ translation ]

workflow_dispatch:

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

permissions:
contents: read

jobs:
build:
permissions:
contents: write # for Git to git push
runs-on: ubuntu-latest
# Only run this action the translation-bot repository in the translation branch
if: ${{ github.repository == 'joomla-translation-bot/joomla-cms' && github.ref == 'refs/heads/translation5' }}

steps:
- uses: actions/checkout@v3
# We need the full depth to create / update the pull request against the main repo
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 20

- name: Fetch latest cms changes
run: |
git config user.name Translation Bot
git config user.email release+translation-bot@joomla.org
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.0-dev
- name: Fetch and extract translations
run: |
cd ..
wget -nv "https://github.com/joomla/core-translations/archive/refs/heads/main.zip"
unzip main.zip
- name: Syncing directories
# 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}
- name: Update static error pages
run: |
npm ci --ignore-scripts && node build/build.js --build-pages
- name: Create commit
continue-on-error: true
run: |
git config user.name Translation Bot
git config user.email release+translation-bot@joomla.org
git add .
git commit -m "Language update"
git push --force
- name: Create pull request
if: ${{ success() }}
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.0-dev
4 changes: 2 additions & 2 deletions .php-cs-fixer.dist.php
Expand Up @@ -70,8 +70,8 @@
'@PSR12' => true,
// Short array syntax
'array_syntax' => ['syntax' => 'short'],
// Lists should not have a trailing comma like list($foo, $bar,) = ...
'no_trailing_comma_in_list_call' => true,
// 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,
// Arrays on multiline should have a trailing comma
'trailing_comma_in_multiline' => ['elements' => ['arrays']],
// Align elements in multiline array and variable declarations on new lines below each other
Expand Down
Expand Up @@ -330,6 +330,12 @@ public static function loadActionLogPluginsLanguage()
// Load plg_system_actionlogs too
$lang->load('plg_system_actionlogs', JPATH_ADMINISTRATOR);

// Load plg_system_privacyconsent too
$lang->load('plg_system_privacyconsent', JPATH_ADMINISTRATOR);

// Load plg_user_terms too
$lang->load('plg_user_terms', JPATH_ADMINISTRATOR);

// Load com_privacy too.
$lang->load('com_privacy', JPATH_ADMINISTRATOR);
}
Expand Down
26 changes: 15 additions & 11 deletions administrator/components/com_admin/script.php
Expand Up @@ -22,6 +22,7 @@
use Joomla\CMS\Table\Table;
use Joomla\CMS\Uri\Uri;
use Joomla\Database\ParameterType;
use Joomla\Filesystem\Path;
use Joomla\Registry\Registry;

// phpcs:disable PSR1.Files.SideEffects
Expand Down Expand Up @@ -387,10 +388,10 @@ private function migrateLogRotationPlugin($data)
return;
}

/** @var SchedulerComponent $component */
/** @var \Joomla\Component\Scheduler\Administrator\Extension\SchedulerComponent $component */
$component = Factory::getApplication()->bootComponent('com_scheduler');

/** @var TaskModel $model */
/** @var \Joomla\Component\Scheduler\Administrator\Model\TaskModel $model */
$model = $component->getMVCFactory()->createModel('Task', 'Administrator', ['ignore_request' => true]);

// Get the timeout, as configured in plg_system_logrotation
Expand Down Expand Up @@ -433,10 +434,10 @@ private function migrateSessionGCPlugin($data)
// Get the plugin parameters
$params = new Registry($data->params);

/** @var SchedulerComponent $component */
/** @var \Joomla\Component\Scheduler\Administrator\Extension\SchedulerComponent $component */
$component = Factory::getApplication()->bootComponent('com_scheduler');

/** @var TaskModel $model */
/** @var \Joomla\Component\Scheduler\Administrator\Model\TaskModel $model */
$model = $component->getMVCFactory()->createModel('Task', 'Administrator', ['ignore_request' => true]);
$task = [
'title' => 'Session GC',
Expand Down Expand Up @@ -478,10 +479,10 @@ private function migrateUpdatenotificationPlugin($data)
$params = new Registry($data->params);
$lastrun = (int) $params->get('lastrun', time());

/** @var SchedulerComponent $component */
/** @var \Joomla\Component\Scheduler\Administrator\Extension\SchedulerComponent $component */
$component = Factory::getApplication()->bootComponent('com_scheduler');

/** @var TaskModel $model */
/** @var \Joomla\Component\Scheduler\Administrator\Model\TaskModel $model */
$model = $component->getMVCFactory()->createModel('Task', 'Administrator', ['ignore_request' => true]);
$task = [
'title' => 'Update Notification',
Expand Down Expand Up @@ -2204,6 +2205,9 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
'/administrator/components/com_newsfeeds/tmpl/newsfeeds/default_batch_footer.php',
'/administrator/components/com_tags/tmpl/tags/default_batch_footer.php',
'/administrator/components/com_users/tmpl/users/default_batch_footer.php',
// From 5.1.0-alpha3 to 5.1.0-alpha4
'/administrator/components/com_redirect/tmpl/links/default_batch_footer.php',
'/modules/mod_banners/mod_banners.php',
];

$folders = [
Expand Down Expand Up @@ -2458,7 +2462,7 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
}

foreach ($folders as $folder) {
if ($folderExists = Folder::exists(JPATH_ROOT . $folder)) {
if ($folderExists = is_dir(Path::clean(JPATH_ROOT . $folder))) {
$status['folders_exist'][] = $folder;

if ($dryRun === false) {
Expand Down Expand Up @@ -2632,10 +2636,10 @@ private function migrateDeleteActionlogsConfiguration(): bool
return true;
}

/** @var SchedulerComponent $component */
/** @var \Joomla\Component\Scheduler\Administrator\Extension\SchedulerComponent $component */
$component = Factory::getApplication()->bootComponent('com_scheduler');

/** @var TaskModel $model */
/** @var \Joomla\Component\Scheduler\Administrator\Model\TaskModel $model */
$model = $component->getMVCFactory()->createModel('Task', 'Administrator', ['ignore_request' => true]);
$task = [
'title' => 'Delete Action Logs',
Expand Down Expand Up @@ -2701,10 +2705,10 @@ private function migratePrivacyconsentConfiguration(): bool
return true;
}

/** @var SchedulerComponent $component */
/** @var \Joomla\Component\Scheduler\Administrator\Extension\SchedulerComponent $component */
$component = Factory::getApplication()->bootComponent('com_scheduler');

/** @var TaskModel $model */
/** @var \Joomla\Component\Scheduler\Administrator\Model\TaskModel $model */
$model = $component->getMVCFactory()->createModel('Task', 'Administrator', ['ignore_request' => true]);
$task = [
'title' => 'Privacy Consent',
Expand Down
@@ -0,0 +1,2 @@
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`) VALUES
(0, 'plg_schemaorg_article', 'plugin', 'article', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 0, 0);
@@ -0,0 +1 @@
ALTER TABLE `#__fields_values` MODIFY `value` MEDIUMTEXT;
@@ -0,0 +1 @@
ALTER TABLE `#__guidedtour_steps` ADD COLUMN `params` text NULL /** CAN FAIL **/;
@@ -0,0 +1,23 @@
--
-- Table structure for table `#__tuf_metadata`
--

CREATE TABLE IF NOT EXISTS `#__tuf_metadata` (
`id` int NOT NULL AUTO_INCREMENT,
`update_site_id` int DEFAULT 0,
`root` text DEFAULT NULL,
`targets` text DEFAULT NULL,
`snapshot` text DEFAULT NULL,
`timestamp` text DEFAULT NULL,
`mirrors` text DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci COMMENT='Secure TUF Updates';

-- --------------------------------------------------------
INSERT INTO `#__tuf_metadata` (`update_site_id`, `root`)
VALUES ((SELECT ue.`update_site_id` FROM `#__update_sites_extensions` AS ue JOIN `#__extensions` AS e ON (e.`extension_id` = ue.`extension_id`) WHERE e.`type`='file' AND e.`element`='joomla'), '{"signed":{"_type":"root","spec_version":"1.0","version":2,"expires":"2025-03-02T11:22:17Z","keys":{"07eb082f367c034a95878687f6648aa76d93652b6ee73e58817053d89af6c44f":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"9b2af2d9b9727227735253d795bd27ea8f0e294a5f3603e822dc5052b44802b9"}},"1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"a18e5ebabc19d5d5984b601a292ece61ba3662ab2d071dc520da5bd4f8948799"}},"2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"cb0a7a131961a20edea051d6dc2b091fb650bd399bd8514adb67b3c60db9f8f9"}},"31dd7c7290d664c9b88c0dead2697175293ea7df81b7f24153a37370fd3901c3":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"589d029a68b470deff1ca16dbf3eea6b5b3fcba0ae7bb52c468abc7fb058b2a2"}},"9e41a9d62d94c6a1c8a304f62c5bd72d84a9f286f27e8327cedeacb09e5156cc":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"6043c8bacc76ac5c9750f45454dd865c6ca1fc57d69e14cc192cfd420f6a66a9"}}},"roles":{"root":{"keyids":["1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669","2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e"],"threshold":1},"snapshot":{"keyids":["07eb082f367c034a95878687f6648aa76d93652b6ee73e58817053d89af6c44f","2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e"],"threshold":1},"targets":{"keyids":["31dd7c7290d664c9b88c0dead2697175293ea7df81b7f24153a37370fd3901c3"],"threshold":1},"timestamp":{"keyids":["9e41a9d62d94c6a1c8a304f62c5bd72d84a9f286f27e8327cedeacb09e5156cc"],"threshold":1}},"consistent_snapshot":true},"signatures":[{"keyid":"2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e","sig":"2a225a560ec0837b721d4c5e379fedbd3c7c9079a94e6b31e47e0184c8b95421b6036b4286c5d90f29ab4c468d79a712fdb65e96511394ceb3aa8e2b3983a501"},{"keyid":"1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669","sig":"8ce0b2a7bdc1e6dcba12081f440510df0a593c072dcf591631c2dd0f456844a7da63be8e8ac31ffbddf42641fde84dc733a336031d182c2163b4c1eaf2117005"}]}');

-----------------------------------------------------------
UPDATE `#__update_sites`
SET `type` = 'tuf', `location` = 'https://update.joomla.org/cms/'
WHERE `update_site_id` = (SELECT ue.`update_site_id` FROM `#__update_sites_extensions` AS ue JOIN `#__extensions` AS e ON (e.`extension_id` = ue.`extension_id`) WHERE e.`type`='file' AND e.`element`='joomla');
@@ -0,0 +1,2 @@
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`) VALUES
(0, 'plg_schemaorg_custom', 'plugin', 'custom', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 0, 0);

0 comments on commit a86650f

Please sign in to comment.