Skip to content

Commit

Permalink
Merge branch '4.4-dev' into patch-54
Browse files Browse the repository at this point in the history
  • Loading branch information
obuisard committed Sep 8, 2023
2 parents b668fc2 + 61ff226 commit 145606e
Show file tree
Hide file tree
Showing 1,180 changed files with 20,074 additions and 23,309 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ services:
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\Codeception\_data\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
- 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
- >
"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u root -p"Password12!" -e "CREATE DATABASE IF NOT EXISTS test_joomla;"
Expand Down
83 changes: 24 additions & 59 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ steps:
- name: certificates
path: /certificates
commands:
- cp -v tests/Codeception/_data/certs/* /certificates/
- cp -v tests/certs/* /certificates/

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

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

- name: php72-integration
depends_on: [ npm ]
image: joomlaprojects/docker-images:php7.2
Expand Down Expand Up @@ -179,6 +186,7 @@ steps:
image: node:current-alpine
commands:
- npm run lint:js
- npm run lint:testjs

- name: prepare_system_tests
depends_on:
Expand All @@ -187,76 +195,36 @@ steps:
volumes:
- name: cypress-cache
path: /root/.cache/Cypress
environment:
CYPRESS_VERIFY_TIMEOUT: 100000
commands:
- sed -i 's/tests\\/Codeception\\/_output/\\/drone\\/src\\/tests\\/cypress\\/output/' codeception.yml
- mv cypress.config.dist.js cypress.config.js
- php libraries/vendor/bin/codecept build
- npx cypress install
- npx cypress verify

- name: phpmin-api-mysql
depends_on:
- prepare_system_tests
image: joomlaprojects/docker-images:systemtests
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/Codeception/drone-api-run.sh "$(pwd)" mysql mysqli mysql jos_

- name: phpmin-api-postgres
depends_on:
- prepare_system_tests
image: joomlaprojects/docker-images:systemtests
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/Codeception/drone-api-run.sh "$(pwd)" postgres pgsql postgres jos_

- name: phpmax-api-mysql
depends_on:
- phpmin-api-mysql
- phpmin-api-postgres
image: joomlaprojects/docker-images:systemtests8.1
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/Codeception/drone-api-run.sh "$(pwd)" mysqlphpmax mysqli mysql phpmax_

- name: phpmax-api-postgres
depends_on:
- phpmin-api-mysql
- phpmin-api-postgres
image: joomlaprojects/docker-images:systemtests8.1
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/Codeception/drone-api-run.sh "$(pwd)" postgresphpmax pgsql postgres phpmax_

- name: phpmin-system-mysql
depends_on:
- phpmax-api-mysql
- phpmax-api-postgres
- prepare_system_tests
image: joomlaprojects/docker-images:cypress
volumes:
- name: cypress-cache
path: /root/.cache/Cypress
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/cypress/drone-system-run.sh "$(pwd)" cmysql mysqli mysql
- bash tests/System/drone-system-run.sh "$(pwd)" cmysql mysqli mysql

- name: phpmin-system-postgres
depends_on:
- phpmax-api-mysql
- phpmax-api-postgres
- prepare_system_tests
image: joomlaprojects/docker-images:cypress
volumes:
- name: cypress-cache
path: /root/.cache/Cypress
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/cypress/drone-system-run.sh "$(pwd)" cpostgres pgsql postgres
- bash tests/System/drone-system-run.sh "$(pwd)" cpostgres pgsql postgres

- name: phpmax-system-mysql
depends_on:
Expand All @@ -269,7 +237,7 @@ steps:
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/cypress/drone-system-run.sh "$(pwd)" cmysqlmax mysqli mysql
- bash tests/System/drone-system-run.sh "$(pwd)" cmysqlmax mysqli mysql

- name: phpmax-system-postgres
depends_on:
Expand All @@ -282,7 +250,7 @@ steps:
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/cypress/drone-system-run.sh "$(pwd)" cpostgresmax pgsql postgres
- bash tests/System/drone-system-run.sh "$(pwd)" cpostgresmax pgsql postgres

- name: phpmin-system-mysql8
depends_on:
Expand All @@ -295,19 +263,20 @@ steps:
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/cypress/drone-system-run.sh "$(pwd)" cmysql8 mysqli mysql8
- bash tests/System/drone-system-run.sh "$(pwd)" cmysql8 mysqli mysql8

- name: phpmax-system-mysql8
depends_on:
- phpmin-system-mysql8
- phpmax-system-mysql
- phpmax-system-postgres
image: joomlaprojects/docker-images:cypress8.1
volumes:
- name: cypress-cache
path: /root/.cache/Cypress
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/cypress/drone-system-run.sh "$(pwd)" cmysql8max mysqli mysql8
- bash tests/System/drone-system-run.sh "$(pwd)" cmysql8max mysqli mysql8

- name: artifacts-system-tests
image: joomlaprojects/docker-images:packager
Expand All @@ -318,10 +287,6 @@ steps:
- phpmin-system-mysql
- phpmin-system-mysql8
- phpmin-system-postgres
- phpmax-api-mysql
- phpmax-api-postgres
- phpmin-api-mysql
- phpmin-api-postgres
environment:
FTP_USERNAME:
from_secret: ftpusername
Expand All @@ -334,7 +299,7 @@ steps:
- echo https://ci.joomla.org$PLUGIN_DEST_DIR
- rclone config create artifacts ftp host ci.joomla.org user $FTP_USERNAME port 21 pass $FTP_PASSWORD
- rclone mkdir artifacts:$PLUGIN_DEST_DIR
- rclone copy tests/cypress/output/ artifacts:$PLUGIN_DEST_DIR
- rclone copy tests/System/output/ artifacts:$PLUGIN_DEST_DIR
- 'curl -X POST "https://api.github.com/repos/$DRONE_REPO/statuses/$DRONE_COMMIT" -H "Content-Type: application/json" -H "Authorization: token $GITHUB_TOKEN" -d "{\"state\":\"failure\", \"context\": \"Artifacts from Failure\", \"description\": \"You can find artifacts from the failure of the build here:\", \"target_url\": \"https://ci.joomla.org$PLUGIN_DEST_DIR\"}" > /dev/null'
when:
status:
Expand Down Expand Up @@ -433,7 +398,7 @@ steps:
path: /reference
when:
branch:
- 4.3-dev
- 4.4-dev

---
kind: pipeline
Expand Down Expand Up @@ -497,6 +462,6 @@ trigger:

---
kind: signature
hmac: c9d665d46d44aaa66798ce2e9bf7122e7824ba6dd5ebe4a4e7aff05e4e7c7816
hmac: 06ecea6156e9c3f4cbb17d5e5e876a8c2b256e0e98412ce6351c914b2adbda97

...
5 changes: 1 addition & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,9 @@ libraries/src/Updater/* @rdeutz @zero-24

# Automated Testing
tests/* @hackwar @fancyFranci
tests/Codeception/* @rdeutz
tests/javascript/* @rdeutz
tests/Unit/* @rdeutz
tests/Unit/* @rdeutz @fancyFranci
.appveyor.yml @rdeutz @hackwar @fancyFranci
.drone.yml @rdeutz @hackwar @fancyFranci
codeception.yml @rdeutz @hackwar @fancyFranci
phpunit.xml.dist @rdeutz @hackwar @fancyFranci
phpunit-pgsql.xml.dist @rdeutz @hackwar @fancyFranci

Expand Down
8 changes: 4 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ If it is a PR, include what the issue is, what the PR is addressing, testing ins
Please be patient as not all items will be tested immediately (remember, all bug testing for the Joomla! CMS is done by volunteers) and be receptive to feedback about your code.

#### Branches
PRs should usually be made to the `4.2-dev` branch as this contains the most recent version of the code.
PRs should usually be made to the `4.3-dev` branch as this contains the most recent version of the code.
There are other branches available which serve specific purposes.

| Branch | Purpose |
| ------ | ------- |
| 3.10-dev | Branch for the Joomla 3.x series. The 3.10 series release will now only include security patches. |
| 4.2-dev | Branch for the current minor Joomla version.|
| 4.3-dev | Branch for the next minor Joomla version. New features go into this branch. Commits to 4.2-dev will be applied to this branch as well. |
| 5.0-dev | Branch for the next major Joomla version. |
| 4.3-dev | Branch for the current minor Joomla version.|
| 4.4-dev | Branch for the next minor Joomla version. Commits to 4.3-dev will be applied to this branch as well. |
| 5.0-dev | Branch for the next major Joomla version. New features go into this branch. |
12 changes: 4 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,9 @@

# Test Related Files
/phpunit.xml
selenium.log
composer.phar
/test-install
/.phpunit.result.cache
/tests/Codeception/acceptance.suite.yml
/tests/Codeception/_output/
/tests/Codeception/api.suite.yml


# Vendor directory handling
Expand Down Expand Up @@ -103,10 +99,10 @@ RoboFile.ini
/media/com_media/css/mediamanager.min.css.map

#cypress
/tests/cypress/output/screenshots
!/tests/cypress/output/screenshots/.gitkeep
/tests/cypress/output/videos
!/tests/cypress/output/videos/.gitkeep
/tests/System/output/screenshots
!/tests/System/output/screenshots/.gitkeep
/tests/System/output/videos
!/tests/System/output/videos/.gitkeep
cypress.config.js

# WebAuthn FIDO metadata cache
Expand Down
6 changes: 6 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@
'binary_operator_spaces' => ['operators' => ['=>' => 'align_single_space_minimal', '=' => 'align']],
// The "No break" comment in switch statements
'no_break_comment' => ['comment_text' => 'No break'],
// Remove unused imports
'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],
// Alpha order imports
'ordered_imports' => ['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha'],
]
)
->setFinder($finder);
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ Build Status
---------------------
| Drone-CI | AppVeyor | PHP | Node | npm |
| ------------- | ------------- | ------------- | ------------- | ------------- |
| [![Build Status](https://ci.joomla.org/api/badges/joomla/joomla-cms/status.svg?branch=4.3-dev)](https://ci.joomla.org/joomla/joomla-cms) | [![Build status](https://ci.appveyor.com/api/projects/status/ru6sxal8jmfckvjc/branch/4.3-dev?svg=true)](https://ci.appveyor.com/project/release-joomla/joomla-cms) | [![PHP](https://img.shields.io/badge/PHP-V7.2.5-green)](https://www.php.net/) | [![node-lts](https://img.shields.io/badge/Node-V16.0-green)](https://nodejs.org/en/) | [![npm](https://img.shields.io/badge/npm-v8.6.0-green)](https://nodejs.org/en/) |
| [![Build Status](https://ci.joomla.org/api/badges/joomla/joomla-cms/status.svg?branch=4.4-dev)](https://ci.joomla.org/joomla/joomla-cms) | [![Build status](https://ci.appveyor.com/api/projects/status/ru6sxal8jmfckvjc/branch/4.4-dev?svg=true)](https://ci.appveyor.com/project/release-joomla/joomla-cms) | [![PHP](https://img.shields.io/badge/PHP-V7.2.5-green)](https://www.php.net/) | [![node-lts](https://img.shields.io/badge/Node-V16.0-green)](https://nodejs.org/en/) | [![npm](https://img.shields.io/badge/npm-v8.6.0-green)](https://nodejs.org/en/) |

Overview
---------------------
* This is the source of Joomla! 4.x.
* Joomla's [Official website](https://www.joomla.org).
* Joomla! 4.3 [version history](https://docs.joomla.org/Special:MyLanguage/Joomla_4.3_version_history).
* Detailed changes are in the [changelog](https://github.com/joomla/joomla-cms/commits/4.2-dev).
* Joomla! 4.4 [version history](https://docs.joomla.org/Special:MyLanguage/Joomla_4.4_version_history).
* Detailed changes are in the [changelog](https://github.com/joomla/joomla-cms/commits/4.4-dev).

What is Joomla?
---------------------
Expand Down Expand Up @@ -45,9 +45,9 @@ git clone https://github.com/joomla/joomla-cms.git
```bash
cd joomla-cms
```
- Go to the 4.3-dev branch:
- Go to the 4.4-dev branch:
```bash
git checkout 4.3-dev
git checkout 4.4-dev
```
- Install all the needed composer packages:
```bash
Expand Down
4 changes: 2 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Joomla! CMS™
1- Overview
* This is a Joomla! 4.x installation/upgrade package.
* Joomla! Official site: https://www.joomla.org
* Joomla! 4.3 version history - https://docs.joomla.org/Special:MyLanguage/Joomla_4.3_version_history
* Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/4.2-dev
* Joomla! 4.4 version history - https://docs.joomla.org/Special:MyLanguage/Joomla_4.4_version_history
* Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/4.4-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 @@ -10,9 +10,6 @@

namespace Joomla\Component\Actionlogs\Administrator\Controller;

use DateTimeZone;
use Exception;
use InvalidArgumentException;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Date\Date;
Expand Down Expand Up @@ -48,7 +45,7 @@ class ActionlogsController extends AdminController
*
* @since 3.9.0
*
* @throws Exception
* @throws \Exception
*/
public function __construct($config = [], MVCFactoryInterface $factory = null, $app = null, $input = null)
{
Expand All @@ -64,7 +61,7 @@ public function __construct($config = [], MVCFactoryInterface $factory = null, $
*
* @since 3.9.0
*
* @throws Exception
* @throws \Exception
*/
public function exportLogs()
{
Expand All @@ -89,7 +86,7 @@ public function exportLogs()
if (\count($data)) {
try {
$rows = ActionlogsHelper::getCsvData($data);
} catch (InvalidArgumentException $exception) {
} catch (\InvalidArgumentException $exception) {
$this->setMessage(Text::_('COM_ACTIONLOGS_ERROR_COULD_NOT_EXPORT_DATA'), 'error');
$this->setRedirect(Route::_('index.php?option=com_actionlogs&view=actionlogs', false));

Expand All @@ -99,7 +96,7 @@ public function exportLogs()
// Destroy the iterator now
unset($data);

$date = new Date('now', new DateTimeZone('UTC'));
$date = new Date('now', new \DateTimeZone('UTC'));
$filename = 'logs_' . $date->format('Y-m-d_His_T');

$csvDelimiter = ComponentHelper::getComponent('com_actionlogs')->getParams()->get('csv_delimiter', ',');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// phpcs:enable PSR1.Files.SideEffects

/**
* Plugins master display controller.
* Plugins display controller.
*
* @since 4.0.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
// phpcs:enable PSR1.Files.SideEffects

/**
* ComponentDispatcher class for com_admin
* ComponentDispatcher class for com_actionlogs
*
* @since 4.2.7
*/
class Dispatcher extends ComponentDispatcher
{
/**
* com_admin does not require check permission, so we override checkAccess method and have it empty
* Method to check component access permission
*
* @return void
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// phpcs:enable PSR1.Files.SideEffects

/**
* Field to load a list of all users that have logged actions
* Field to load a list of all extensions that have logged actions
*
* @since 3.9.0
*/
Expand Down

0 comments on commit 145606e

Please sign in to comment.