Skip to content

Commit e666432

Browse files
committed
Merge branch '6.0-dev' into config-envs
2 parents 25262ae + 4795624 commit e666432

File tree

122 files changed

+2440
-1195
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+2440
-1195
lines changed

.drone.yml

Lines changed: 26 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ clone:
66

77
steps:
88
- name: setup
9-
image: joomlaprojects/docker-images:php8.3
9+
image: joomlaprojects/docker-images:php8.4
1010
volumes:
1111
- name: certificates
1212
path: /certificates
1313
commands:
1414
- cp -v tests/certs/* /certificates/
1515

1616
- name: composer
17-
image: joomlaprojects/docker-images:php8.3
17+
image: joomlaprojects/docker-images:php8.4
1818
volumes:
1919
- name: composer-cache
2020
path: /tmp/composer-cache
@@ -70,6 +70,13 @@ steps:
7070
- php -v
7171
- ./libraries/vendor/bin/phpunit --testsuite Unit
7272

73+
- name: php84-unit
74+
depends_on: [ phpcs ]
75+
image: joomlaprojects/docker-images:php8.4
76+
commands:
77+
- php -v
78+
- ./libraries/vendor/bin/phpunit --testsuite Unit
79+
7380
- name: php81-integration
7481
depends_on: [ npm ]
7582
image: joomlaprojects/docker-images:php8.1
@@ -91,6 +98,13 @@ steps:
9198
- php -v
9299
- ./libraries/vendor/bin/phpunit --testsuite Integration
93100

101+
- name: php84-integration
102+
depends_on: [ npm ]
103+
image: joomlaprojects/docker-images:php8.4
104+
commands:
105+
- php -v
106+
- ./libraries/vendor/bin/phpunit --testsuite Integration
107+
94108
- name: php81-integration-pgsql
95109
depends_on: [ npm ]
96110
image: joomlaprojects/docker-images:php8.1
@@ -112,6 +126,13 @@ steps:
112126
- php -v
113127
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
114128

129+
- name: php84-integration-pgsql
130+
depends_on: [ npm ]
131+
image: joomlaprojects/docker-images:php8.4
132+
commands:
133+
- php -v
134+
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
135+
115136
- name: scss-cs
116137
depends_on: [ npm ]
117138
image: node:current-alpine
@@ -154,7 +175,7 @@ steps:
154175
- name: phpmax-system-mysql
155176
depends_on:
156177
- phpmin-system-mysql
157-
image: joomlaprojects/docker-images:cypress8.3
178+
image: joomlaprojects/docker-images:cypress8.4
158179
volumes:
159180
- name: cypress-cache
160181
path: /root/.cache/Cypress
@@ -167,24 +188,6 @@ steps:
167188
exclude:
168189
- pull_request
169190

170-
- name: phpnext-system-mysql
171-
depends_on:
172-
- phpmax-system-mysql
173-
image: joomlaprojects/docker-images:cypress8.4
174-
volumes:
175-
- name: cypress-cache
176-
path: /root/.cache/Cypress
177-
environment:
178-
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
179-
failure: ignore
180-
commands:
181-
- echo "This test is disabled because php next is not stable yet"
182-
- exit 1
183-
- bash tests/System/entrypoint.sh "$(pwd)" cmysqlnext mysqli mysql
184-
when:
185-
event:
186-
exclude:
187-
- pull_request
188191

189192
- name: phpmin-system-postgres
190193
depends_on:
@@ -205,39 +208,18 @@ steps:
205208
- name: phpmax-system-postgres
206209
depends_on:
207210
- phpmin-system-postgres
208-
image: joomlaprojects/docker-images:cypress8.3
209-
volumes:
210-
- name: cypress-cache
211-
path: /root/.cache/Cypress
212-
environment:
213-
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
214-
commands:
215-
- bash tests/System/entrypoint.sh "$(pwd)" cpostgresmax pgsql postgres
216-
217-
- name: phpnext-system-postgres
218-
depends_on:
219-
- phpmax-system-postgres
220211
image: joomlaprojects/docker-images:cypress8.4
221212
volumes:
222213
- name: cypress-cache
223214
path: /root/.cache/Cypress
224215
environment:
225216
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
226-
failure: ignore
227217
commands:
228-
- echo "This test is disabled because php next is not stable yet"
229-
- exit 1
230-
- bash tests/System/entrypoint.sh "$(pwd)" cpostgresnext pgsql postgres
231-
when:
232-
event:
233-
exclude:
234-
- pull_request
218+
- bash tests/System/entrypoint.sh "$(pwd)" cpostgresmax pgsql postgres
235219

236220
- name: artifacts-system-tests
237221
image: joomlaprojects/docker-images:packager
238222
depends_on:
239-
- phpnext-system-mysql
240-
- phpnext-system-postgres
241223
- phpmax-system-mysql
242224
- phpmax-system-postgres
243225
- phpmin-system-mysql
@@ -433,6 +415,6 @@ trigger:
433415

434416
---
435417
kind: signature
436-
hmac: fedcefde305c98f4dfc926b9039f83692827337da9e689e423c9de93a97248dd
418+
hmac: 99da78521b10f37ddf6731e695fe52f85ee3db142bccac66901ae5372e332aae
437419

438420
...

administrator/components/com_admin/script.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,10 +440,14 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
440440
'/administrator/components/com_admin/sql/updates/mysql/5.2.0-2024-08-22.sql',
441441
'/administrator/components/com_admin/sql/updates/mysql/5.2.0-2024-09-17.sql',
442442
'/administrator/components/com_admin/sql/updates/mysql/5.2.2-2024-09-24.sql',
443+
'/administrator/components/com_admin/sql/updates/mysql/5.2.3-2025-01-09.sql',
443444
'/administrator/components/com_admin/sql/updates/mysql/5.3.0-2024-10-13.sql',
444445
'/administrator/components/com_admin/sql/updates/mysql/5.3.0-2024-10-26.sql',
445446
'/administrator/components/com_admin/sql/updates/mysql/5.3.0-2024-12-09.sql',
446447
'/administrator/components/com_admin/sql/updates/mysql/5.3.0-2024-12-19.sql',
448+
'/administrator/components/com_admin/sql/updates/mysql/5.3.0-2025-02-09.sql',
449+
'/administrator/components/com_admin/sql/updates/mysql/5.3.0-2025-02-22.sql',
450+
'/administrator/components/com_admin/sql/updates/mysql/5.3.0-2025-03-14.sql',
447451
'/administrator/components/com_admin/sql/updates/postgresql/5.0.0-2023-03-11.sql',
448452
'/administrator/components/com_admin/sql/updates/postgresql/5.0.0-2023-03-17.sql',
449453
'/administrator/components/com_admin/sql/updates/postgresql/5.0.0-2023-07-12.sql',
@@ -470,9 +474,19 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
470474
'/administrator/components/com_admin/sql/updates/postgresql/5.2.0-2024-08-22.sql',
471475
'/administrator/components/com_admin/sql/updates/postgresql/5.2.0-2024-09-17.sql',
472476
'/administrator/components/com_admin/sql/updates/postgresql/5.2.2-2024-09-24.sql',
477+
'/administrator/components/com_admin/sql/updates/postgresql/5.2.3-2025-01-09.sql',
473478
'/administrator/components/com_admin/sql/updates/postgresql/5.3.0-2024-10-26.sql',
474479
'/administrator/components/com_admin/sql/updates/postgresql/5.3.0-2024-12-09.sql',
475480
'/administrator/components/com_admin/sql/updates/postgresql/5.3.0-2024-12-19.sql',
481+
'/administrator/components/com_admin/sql/updates/postgresql/5.3.0-2025-02-09.sql',
482+
'/administrator/components/com_admin/sql/updates/postgresql/5.3.0-2025-02-22.sql',
483+
'/administrator/components/com_admin/sql/updates/postgresql/5.3.0-2025-03-14.sql',
484+
'/administrator/components/com_content/forms/filter_featured.xml',
485+
'/administrator/components/com_content/tmpl/featured/default.php',
486+
'/administrator/components/com_content/tmpl/featured/default.xml',
487+
'/administrator/components/com_content/tmpl/featured/default_stage_body.php',
488+
'/administrator/components/com_content/tmpl/featured/default_stage_footer.php',
489+
'/administrator/components/com_content/tmpl/featured/emptystate.php',
476490
'/administrator/components/com_finder/helpers/indexer/adapter.php',
477491
'/administrator/components/com_finder/helpers/indexer/helper.php',
478492
'/administrator/components/com_finder/helpers/indexer/parser.php',
@@ -489,18 +503,41 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
489503
'/libraries/src/Application/CLI/Output/Stdout.php',
490504
'/libraries/src/Application/CLI/Output/Xml.php',
491505
'/libraries/src/Application/CliApplication.php',
506+
'/libraries/src/Filesystem/File.php',
507+
'/libraries/src/Filesystem/FilesystemHelper.php',
508+
'/libraries/src/Filesystem/Folder.php',
509+
'/libraries/src/Filesystem/Meta/language/en-GB/en-GB.lib_joomla_filesystem_patcher.ini',
510+
'/libraries/src/Filesystem/Patcher.php',
511+
'/libraries/src/Filesystem/Path.php',
512+
'/libraries/src/Filesystem/Stream.php',
513+
'/libraries/src/Filesystem/Streams/StreamString.php',
514+
'/libraries/src/Filesystem/Support/StringController.php',
492515
'/libraries/src/Input/Cookie.php',
493516
'/libraries/src/Input/Files.php',
494517
'/libraries/src/Input/Input.php',
495518
'/libraries/src/Input/Json.php',
519+
'/media/legacy/joomla.asset.json',
520+
'/media/legacy/js/jquery-noconflict.js',
521+
'/media/legacy/js/jquery-noconflict.min.js',
522+
'/media/legacy/js/jquery-noconflict.min.js.gz',
523+
'/media/legacy/js/tabs-state.js',
524+
'/media/legacy/js/tabs-state.min.js',
525+
'/media/legacy/js/tabs-state.min.js.gz',
496526
];
497527

498528
$folders = [
499529
// From 5.x to 6.0
530+
'/libraries/src/Filesystem/Support',
531+
'/libraries/src/Filesystem/Streams',
532+
'/libraries/src/Filesystem/Meta/language/en-GB',
533+
'/libraries/src/Filesystem/Meta/language',
534+
'/libraries/src/Filesystem/Meta',
535+
'/libraries/src/Filesystem',
500536
'/libraries/src/Application/CLI/Output/Processor',
501537
'/libraries/src/Application/CLI/Output',
502538
'/libraries/src/Application/CLI',
503539
'/administrator/components/com_finder/helpers/indexer',
540+
'/administrator/components/com_content/tmpl/featured',
504541
];
505542

506543
$status['files_checked'] = $files;

administrator/components/com_categories/src/Field/CategoryeditField.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,13 @@ protected function getOptions()
152152
// Let's get the id for the current item, either category or content item.
153153
$jinput = Factory::getApplication()->getInput();
154154

155+
// Is this field used to select parent category for a category ?
156+
$isParentCategoryField = isset($this->element['parent']) || $jinput->getCmd('option') === 'com_categories';
157+
155158
// Load the category options for a given extension.
156159

157160
// For categories the old category is the category id or 0 for new category.
158-
if ($this->element['parent'] || $jinput->get('option') == 'com_categories') {
161+
if ($isParentCategoryField) {
159162
$oldCat = $jinput->get('id', 0);
160163
$oldParent = $this->form->getValue($name, 0);
161164
$extension = $this->element['extension'] ? (string) $this->element['extension'] : (string) $jinput->get('extension', 'com_content');
@@ -186,7 +189,7 @@ protected function getOptions()
186189
->from($db->quoteName('#__categories', 'a'));
187190

188191
// Filter by the extension type
189-
if ($this->element['parent'] == true || $jinput->get('option') == 'com_categories') {
192+
if ($isParentCategoryField) {
190193
$query->where('(' . $db->quoteName('a.extension') . ' = :extension OR ' . $db->quoteName('a.parent_id') . ' = 0)')
191194
->bind(':extension', $extension);
192195
} else {
@@ -195,7 +198,7 @@ protected function getOptions()
195198
}
196199

197200
// Filter language
198-
if (!empty($this->element['language'])) {
201+
if (isset($this->element['language'])) {
199202
if (str_contains($this->element['language'], ',')) {
200203
$language = explode(',', $this->element['language']);
201204
} else {
@@ -219,7 +222,7 @@ protected function getOptions()
219222
$query->order($db->quoteName('a.lft') . ' ASC');
220223

221224
// If parent isn't explicitly stated but we are in com_categories assume we want parents
222-
if ($oldCat != 0 && ($this->element['parent'] == true || $jinput->get('option') == 'com_categories')) {
225+
if ($oldCat != 0 && $isParentCategoryField) {
223226
// Prevent parenting to children of this item.
224227
// To rearrange parents and children move the children up, not the parents down.
225228
$query->join(
@@ -244,10 +247,8 @@ protected function getOptions()
244247
// Pad the option text with spaces using depth level as a multiplier.
245248
foreach ($options as $option) {
246249
// Translate ROOT
247-
if ($this->element['parent'] == true || $jinput->get('option') == 'com_categories') {
248-
if ($option->level == 0) {
249-
$option->text = Text::_('JGLOBAL_ROOT_PARENT');
250-
}
250+
if ($isParentCategoryField && $option->level == 0) {
251+
$option->text = Text::_('JGLOBAL_ROOT_PARENT');
251252
}
252253

253254
if ($option->published == 1) {
@@ -311,7 +312,7 @@ protected function getOptions()
311312
}
312313

313314
if (
314-
$oldCat != 0 && ($this->element['parent'] == true || $jinput->get('option') == 'com_categories')
315+
$oldCat != 0 && $isParentCategoryField
315316
&& !isset($options[0])
316317
&& isset($this->element['show_root'])
317318
) {

administrator/components/com_config/src/Model/ApplicationModel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -745,10 +745,10 @@ public function save($data)
745745
$config = new Registry($data);
746746

747747
// Overwrite webservices cors settings
748-
$app->set('cors', $data['cors']);
749-
$app->set('cors_allow_origin', $data['cors_allow_origin']);
750-
$app->set('cors_allow_headers', $data['cors_allow_headers']);
751-
$app->set('cors_allow_methods', $data['cors_allow_methods']);
748+
$app->set('cors', $data['cors'] ?? 0);
749+
$app->set('cors_allow_origin', $data['cors_allow_origin'] ?? '*');
750+
$app->set('cors_allow_headers', $data['cors_allow_headers'] ?? 'Content-Type,X-Joomla-Token');
751+
$app->set('cors_allow_methods', $data['cors_allow_methods'] ?? '');
752752

753753
// Clear cache of com_config component.
754754
$this->cleanCache('_system');

administrator/components/com_installer/src/View/Updatesite/HtmlView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function display($tpl = null): void
7070

7171
// Remove the extra_query field if it's a free download extension
7272
$dlidSupportingSites = InstallerHelper::getDownloadKeySupportedSites(false);
73-
$update_site_id = $this->item->get('update_site_id');
73+
$update_site_id = $this->item->update_site_id;
7474

7575
if (!\in_array($update_site_id, $dlidSupportingSites)) {
7676
$this->form->removeField('extra_query');

administrator/components/com_media/src/Model/ApiModel.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Joomla\CMS\Factory;
1515
use Joomla\CMS\Language\Text;
1616
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
17-
use Joomla\CMS\Object\CMSObject;
1817
use Joomla\CMS\Plugin\PluginHelper;
1918
use Joomla\Component\Media\Administrator\Event\FetchMediaItemEvent;
2019
use Joomla\Component\Media\Administrator\Event\FetchMediaItemsEvent;
@@ -180,7 +179,7 @@ public function createFolder($adapter, $name, $path, $override)
180179
}
181180

182181
$app = Factory::getApplication();
183-
$object = new CMSObject();
182+
$object = new \stdClass();
184183
$object->adapter = $adapter;
185184
$object->name = $name;
186185
$object->path = $path;
@@ -235,7 +234,7 @@ public function createFile($adapter, $name, $path, $data, $override)
235234
}
236235

237236
$app = Factory::getApplication();
238-
$object = new CMSObject();
237+
$object = new \stdClass();
239238
$object->adapter = $adapter;
240239
$object->name = $name;
241240
$object->path = $path;
@@ -283,7 +282,7 @@ public function updateFile($adapter, $name, $path, $data)
283282
}
284283

285284
$app = Factory::getApplication();
286-
$object = new CMSObject();
285+
$object = new \stdClass();
287286
$object->adapter = $adapter;
288287
$object->name = $name;
289288
$object->path = $path;
@@ -330,7 +329,7 @@ public function delete($adapter, $path)
330329

331330
$type = $file->type === 'file' ? 'file' : 'folder';
332331
$app = Factory::getApplication();
333-
$object = new CMSObject();
332+
$object = new \stdClass();
334333
$object->adapter = $adapter;
335334
$object->path = $path;
336335

administrator/components/com_messages/src/Model/MessageModel.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,12 @@ public function getItem($pk = null)
163163
return false;
164164
}
165165

166-
$this->item->set('user_id_to', $message->user_id_from);
166+
$this->item->user_id_to = $message->user_id_from;
167+
167168
$re = Text::_('COM_MESSAGES_RE');
168169

169170
if (stripos($message->subject, $re) !== 0) {
170-
$this->item->set('subject', $re . ' ' . $message->subject);
171+
$this->item->subject = $re . ' ' . $message->subject;
171172
}
172173
}
173174
} elseif ($this->item->user_id_to != $this->getCurrentUser()->id) {
@@ -188,7 +189,7 @@ public function getItem($pk = null)
188189

189190
// Get the user name for an existing message.
190191
if ($this->item->user_id_from && $fromUser = new User($this->item->user_id_from)) {
191-
$this->item->set('from_user_name', $fromUser->name);
192+
$this->item->from_user_name = $fromUser->name;
192193
}
193194
}
194195

administrator/components/com_messages/tmpl/message/default.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<div class="card-body">
3434
<dl class="mb-0">
3535
<dt><?php echo Text::_('COM_MESSAGES_FIELD_USER_ID_FROM_LABEL'); ?></dt>
36-
<dd><?php echo $this->item->get('from_user_name'); ?></dd>
36+
<dd><?php echo $this->item->from_user_name; ?></dd>
3737

3838
<dt><?php echo Text::_('COM_MESSAGES_FIELD_DATE_TIME_LABEL'); ?></dt>
3939
<dd><?php echo HTMLHelper::_('date', $this->item->date_time, Text::_('DATE_FORMAT_LC2')); ?></dd>

administrator/components/com_modules/src/Controller/ModuleController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ public function save($key = null, $urlVar = null)
232232
$model = $this->getModel();
233233
$data = $this->input->post->get('jform', [], 'array');
234234
$item = $model->getItem($this->input->get('id'));
235-
$properties = $item->getProperties();
235+
$properties = get_object_vars($item);
236236

237237
if (isset($data['params'])) {
238238
unset($properties['params']);

0 commit comments

Comments
 (0)