diff --git a/.appveyor.yml b/.appveyor.yml
index d5fac65bf107b..60cee9472f7bf 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -33,23 +33,32 @@ install:
$VC = "vc14"
$PHPBuild = "x64"
}
- - cinst -y sqlite
+ - appveyor-retry cinst -y sqlite
- cd C:\tools\php
# Get the MSSQL DLL's
- ps: >-
If ($env:PHP -eq "1") {
If ($env:php_ver_target -eq "5.6") {
- appveyor-retry appveyor DownloadFile https://files.nette.org/misc/php-sqlsrv.zip
+ $source = "https://cdn.joomla.org/ci/php-sqlsrv.zip"
+ $destination = "c:\tools\php\php-sqlsrv.zip"
+ Invoke-WebRequest $source -OutFile $destination
+ #appveyor-retry appveyor DownloadFile https://cdn.joomla.org/ci/php-sqlsrv.zip
7z x -y php-sqlsrv.zip > $null
copy SQLSRV\php_sqlsrv_56_nts.dll ext\php_sqlsrv_nts.dll
copy SQLSRV\php_pdo_sqlsrv_56_nts.dll ext\php_pdo_sqlsrv_nts.dll
Remove-Item C:\tools\php\* -include .zip
} Else {
- $DLLVersion = "4.1.6.1"
+ $DLLVersion = "4.3.0"
cd c:\tools\php\ext
- appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/sqlsrv/$($DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip
+ $source = "http://windows.php.net/downloads/pecl/releases/sqlsrv/$($DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip"
+ $destination = "c:\tools\php\ext\php_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip"
+ Invoke-WebRequest $source -OutFile $destination
+ #appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/sqlsrv/$($DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip
7z x -y php_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip > $null
- appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($DLLVersion)/php_pdo_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip
+ $source = "http://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($DLLVersion)/php_pdo_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip"
+ $destination = "c:\tools\php\ext\php_pdo_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip"
+ Invoke-WebRequest $source -OutFile $destination
+ #appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($DLLVersion)/php_pdo_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip
7z x -y php_pdo_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip > $null
Remove-Item c:\tools\php\ext* -include .zip
cd c:\tools\php}}
@@ -83,7 +92,10 @@ install:
If ($env:PHP -eq "1") {
If ($env:php_ver_target -eq "5.6") {$wincache = "1.3.7.12"} Else {$wincache = "2.0.0.8"}
cd c:\tools\php\ext
- appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/wincache/$($wincache)/php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip
+ $source = "http://windows.php.net/downloads/pecl/releases/wincache/$($wincache)/php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip"
+ $destination = "c:\tools\php\ext\php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip"
+ Invoke-WebRequest $source -OutFile $destination
+ #appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/wincache/$($wincache)/php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip
7z x -y php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip > $null
Remove-Item C:\tools\php\ext* -include .zip
cd c:\tools\php}
@@ -91,6 +103,7 @@ install:
- IF %PHP%==1 echo wincache.enablecli = 1 >> php.ini
- IF %PHP%==1 echo zend_extension=php_opcache.dll >> php.ini
- IF %PHP%==1 echo opcache.enable_cli=1 >> php.ini
+ - IF %PHP%==1 echo extension=php_ldap.dll >> php.ini
- IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
- appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar
- cd C:\projects\joomla-cms
diff --git a/.drone.yml b/.drone.yml
index 85f368db19b48..da8e3fda4a91b 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -7,7 +7,7 @@ pipeline:
image: joomlaprojects/docker-phpcs
commands:
- echo $(date)
- - /root/.composer/vendor/bin/phpcs --report=full --extensions=php -p --standard=build/phpcs/Joomla .
+ - /root/.composer/vendor/bin/phpcs --report=full --encoding=utf-8 --extensions=php -p --standard=build/phpcs/Joomla .
- echo $(date)
javascript:
@@ -26,3 +26,12 @@ pipeline:
- tests/javascript/node_modules/karma/bin/karma start karma.conf.js --single-run
- echo $(date)
+ analysis:
+ image: rips/rips-cli
+ secrets: [rips_username, rips_password]
+ commands:
+ - export RIPS_BASE_URI='https://api.rips.joomla.org'
+ - export RIPS_USERNAME=$RIPS_USERNAME
+ - export RIPS_PASSWORD=$RIPS_PASSWORD
+ - rips-cli rips:scan:start -a 1 -t 1 -p $(pwd) -t 1 -T $DRONE_REPO_OWNER-$DRONE_BRANCH || { echo "Please contact the security team at security@joomla.org"; exit 1; }
+
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
new file mode 100644
index 0000000000000..3af433d8336f1
--- /dev/null
+++ b/.github/CODEOWNERS
@@ -0,0 +1,60 @@
+# Custom Fields
+administrator/components/com_fields/* @laoneo
+components/com_fields/* @laoneo
+plugins/content/fields/* @laoneo
+plugins/editors-xtd/fields/* @laoneo
+plugins/fields/* @laoneo
+plugins/systems/fields/* @laoneo
+
+# Smart Search
+administrator/components/com_finder/* @mbabker
+components/com_finder/* @mbabker
+modules/mod_finder/* @mbabker
+plugins/content/finder/* @mbabker
+plugins/finder/* @mbabker
+
+# Language strings
+administrator/language/en-GB/* @brianteeman
+installation/language/en-GB/* @brianteeman
+language/en-GB/* @brianteeman
+README.md @brianteeman
+README.txt @brianteeman
+
+# CodeMirror
+media/editors/codemirror/* @okonomiyaki3000
+plugins/editors/codemirror/* @okonomiyaki3000
+
+# Statistics Server
+plugins/system/stats/* @mbabker @wilsonge
+
+# Release Tools
+build.xml @mbabker
+build/build.php @mbabker @rdeutz @wilsonge
+build/bump.php @mbabker @rdeutz @wilsonge
+build/deleted_file_check.php @mbabker @rdeutz @wilsonge
+
+# Core/Extension Install/Update Tools
+administrator/components/com_joomlaupdate/* @mbabker @rdeutz @wilsonge @zero-24
+libraries/src/Installer/* @mbabker @rdeutz @wilsonge @zero-24
+libraries/src/Updater/* @mbabker @rdeutz @wilsonge @zero-24
+
+# Automated Testing
+build/jenkins/* @mbabker @rdeutz
+build/travis/* @mbabker @rdeutz
+tests/codeception/* @rdeutz
+tests/javascript/* @dgt41 @rdeutz
+tests/unit/* @mbabker @rdeutz
+.appveyor.yml @mbabker @rdeutz
+.drone.yml @rdeutz
+.hound.yml @mbabker
+.travis.yml @mbabker @rdeutz
+appveyor-phpunit.xml @mbabker @rdeutz
+codeception.yml @rdeutz
+karma.conf.js @dgt41 @rdeutz
+phpunit.xml.dist @mbabker @rdeutz
+RoboFile.dist.ini @rdeutz
+RoboFile.php @rdeutz
+travis-phpunit.xml @mbabker @rdeutz
+
+# Core JS
+media/*/js/* @dgt41
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index a569407e7d792..8de2598070b5a 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -20,6 +20,6 @@ There are other branches available which serve specific purposes.
| Branch | Purpose |
| ------ | ------- |
| staging | Current codebase. Branch for the next minor Joomla version. New backward compatible features go into this branch. |
-| master | Each commit made to staging gets tested if it passes unit tests and codestyle rules. It is then merged into master. This is done automatically. |
-| 3.8-dev | Branch for the next minor Joomla version. The 3.8.0 release will only include compatibility features for 4.0. Commits to staging will be applied to this branch as well. |
+| 3.9-dev | Branch for the next minor Joomla version. The 3.9.0 release will include the Privacy Tools Suite features. Commits to staging will be applied to this branch as well. |
+| 3.10-dev | Branch for the next minor Joomla version. The 3.10.0 release will only include compatibility features for 4.0. Commits to staging will be applied to this branch as well. |
| 4.0-dev | Branch for the next major Joomla version. New features go into this branch. Commits to staging will be applied to this branch as well. |
diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md
new file mode 100644
index 0000000000000..f234699b23618
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/Bug_report.md
@@ -0,0 +1,23 @@
+---
+name: Bug report
+about: Create a report to help us improve
+
+---
+
+### Steps to reproduce the issue
+
+
+
+### Expected result
+
+
+
+### Actual result
+
+
+
+### System information (as much as possible)
+
+
+
+### Additional comments
diff --git a/.github/ISSUE_TEMPLATE/Custom.md b/.github/ISSUE_TEMPLATE/Custom.md
new file mode 100644
index 0000000000000..1c32a221edc25
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/Custom.md
@@ -0,0 +1,16 @@
+---
+name: Fix this template
+about: Suggest a fix it
+
+---
+
+### What needs to be fixed
+
+
+### Why this should be fixed
+
+
+### How would you fix it
+
+
+### Side Effects expected
diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/Feature_request.md
new file mode 100644
index 0000000000000..e853c4610a791
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/Feature_request.md
@@ -0,0 +1,15 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+
+---
+
+### Is your feature request related to a problem? Please describe.
+
+
+
+### Describe the solution you'd like
+
+
+
+### Additional context
diff --git a/.github/ISSUE_TEMPLATE/Security.md b/.github/ISSUE_TEMPLATE/Security.md
new file mode 100644
index 0000000000000..d7ff7ea26e670
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/Security.md
@@ -0,0 +1,11 @@
+---
+name: Security
+about: Report a security issue
+
+---
+
+Security issues should **NOT** be reported on this repository.
+
+If you believe you have found a security issue, please contact the Joomla Security Strike Team via email at security@joomla.org or through the contact form at https://developer.joomla.org/security/contact-the-team.html.
+
+Please see https://developer.joomla.org/security.html for more information on how the Joomla project responds to security issues.
diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md
new file mode 100644
index 0000000000000..f716bd5f7e8e5
--- /dev/null
+++ b/.github/SUPPORT.md
@@ -0,0 +1,8 @@
+Where can you get support and help?
+====================
+* [The Joomla! Documentation](https://docs.joomla.org/Special:MyLanguage/Main_Page);
+* [Frequently Asked Questions](https://docs.joomla.org/Special:MyLanguage/Category:FAQ) (FAQ);
+* Find the [information you need](https://docs.joomla.org/Special:MyLanguage/Start_here);
+* Find [help and other users](https://www.joomla.org/about-joomla/create-and-share.html);
+* Post questions at [our forums](https://forum.joomla.org);
+* [Joomla Resources Directory](https://resources.joomla.org) (JRD).
diff --git a/.gitignore b/.gitignore
index bbfb1deaa049f..fea6b1c925bcc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,8 @@
/administrator/logs
/cache
/installation/cache
+/installation/sessions
+/libraries/autoload_psr4.php
/tmp
/configuration.php
/.htaccess
@@ -21,6 +23,9 @@
# Test Related Files #
/phpunit.xml
+# Stubs file holding mapped classes
+/stubs.php
+
# Node modules #
node_modules/
@@ -36,6 +41,16 @@ phpdoc-*
# Install from Web plugin #
/plugins/installer/webinstaller
+# Languages #
+administrator/language/*
+!administrator/language/en-GB
+administrator/manifests/packages/*
+!administrator/manifests/packages/pkg_en-GB.xml
+!administrator/language/overrides/index.html
+language/*
+!language/en-GB
+!language/overrides/index.html
+
# OSX #
._*
.Spotlight-V100
@@ -61,17 +76,20 @@ Desktop.ini
/libraries/vendor/ircmaxell/password-compat/phpunit.xml.dist
/libraries/vendor/ircmaxell/password-compat/README.md
/libraries/vendor/ircmaxell/password-compat/version-test.php
+/libraries/vendor/joomla/*/.gitattributes
/libraries/vendor/joomla/*/.github
/libraries/vendor/joomla/*/.gitignore
/libraries/vendor/joomla/*/.gitmodules
/libraries/vendor/joomla/*/docs
/libraries/vendor/joomla/*/Tests
/libraries/vendor/joomla/*/vendor
+/libraries/vendor/joomla/*/.scrutinizer.yml
/libraries/vendor/joomla/*/.travis.yml
/libraries/vendor/joomla/*/CONTRIBUTING.md
/libraries/vendor/joomla/*/composer.json
/libraries/vendor/joomla/*/phpunit.xml.dist
/libraries/vendor/joomla/*/README.md
+/libraries/vendor/joomla/*/ruleset.xml
/libraries/vendor/joomla/session/Joomla/Session/.github
/libraries/vendor/joomla/session/Joomla/Session/_Tests
/libraries/vendor/joomla/session/Joomla/Session/build
@@ -95,10 +113,23 @@ Desktop.ini
/libraries/vendor/paragonie/random_compat/other
/libraries/vendor/paragonie/random_compat/CHANGELOG.md
/libraries/vendor/paragonie/random_compat/ERRATA.md
+/libraries/vendor/paragonie/random_compat/RATIONALE.md
/libraries/vendor/paragonie/random_compat/README.md
/libraries/vendor/paragonie/random_compat/SECURITY.md
+/libraries/vendor/paragonie/random_compat/build-phar.sh
/libraries/vendor/paragonie/random_compat/composer.json
+/libraries/vendor/paragonie/random_compat/psalm-autoload.php
+/libraries/vendor/paragonie/random_compat/psalm.xml
/libraries/vendor/paragonie/random_compat/tests
+/libraries/vendor/paragonie/sodium_compat/.gitignore
+/libraries/vendor/paragonie/sodium_compat/appveyor.yml
+/libraries/vendor/paragonie/sodium_compat/build-phar.sh
+/libraries/vendor/paragonie/sodium_compat/composer.json
+/libraries/vendor/paragonie/sodium_compat/composer.lock
+/libraries/vendor/paragonie/sodium_compat/dist
+/libraries/vendor/paragonie/sodium_compat/phpunit.xml.dist
+/libraries/vendor/paragonie/sodium_compat/README.md
+/libraries/vendor/paragonie/sodium_compat/src/Core/Curve25519/README.md
/libraries/vendor/phpmailer/phpmailer/docs
/libraries/vendor/phpmailer/phpmailer/examples
/libraries/vendor/phpmailer/phpmailer/language
@@ -108,21 +139,33 @@ Desktop.ini
/libraries/vendor/phpmailer/phpmailer/.travis.yml
/libraries/vendor/phpmailer/phpmailer/changelog.md
/libraries/vendor/phpmailer/phpmailer/composer.json
+/libraries/vendor/phpmailer/phpmailer/ISSUE_TEMPLATE.md
+/libraries/vendor/phpmailer/phpmailer/phpdoc.dist.xml
/libraries/vendor/phpmailer/phpmailer/README.md
/libraries/vendor/phpmailer/phpmailer/travis.phpunit.xml.dist
+/libraries/vendor/phpmailer/phpmailer/UPGRADING.md
/libraries/vendor/phpmailer/phpmailer/extras/README.md
/libraries/vendor/phpmailer/phpmailer/get_oauth_token.php
+/libraries/vendor/psr/container/.gitignore
+/libraries/vendor/psr/container/composer.json
+/libraries/vendor/psr/container/README.md
/libraries/vendor/psr/log/Psr/Log/Test
/libraries/vendor/psr/log/.gitignore
/libraries/vendor/psr/log/composer.json
/libraries/vendor/psr/log/README.md
+/libraries/vendor/symfony/polyfill-ctype/composer.json
+/libraries/vendor/symfony/polyfill-ctype/README.md
/libraries/vendor/symfony/polyfill-php55/composer.json
/libraries/vendor/symfony/polyfill-php55/README.md
/libraries/vendor/symfony/polyfill-php56/composer.json
/libraries/vendor/symfony/polyfill-php56/README.md
+/libraries/vendor/symfony/polyfill-php73/composer.json
+/libraries/vendor/symfony/polyfill-php73/README.md
/libraries/vendor/symfony/polyfill-util/composer.json
/libraries/vendor/symfony/polyfill-util/README.md
+/libraries/vendor/symfony/polyfill-util/LegacyTestListener.php
/libraries/vendor/symfony/polyfill-util/TestListener.php
+/libraries/vendor/symfony/polyfill-util/TestListenerTrait.php
/libraries/vendor/symfony/yaml/Tests
/libraries/vendor/symfony/yaml/.gitignore
/libraries/vendor/symfony/yaml/CHANGELOG.md
@@ -139,3 +182,19 @@ Desktop.ini
/libraries/vendor/simplepie/simplepie/build
/libraries/vendor/simplepie/simplepie/idn/ReadMe.txt
/libraries/vendor/simplepie/simplepie/composer.json
+
+# System Test related files
+tests/codeception/acceptance.suite.yml
+tests/codeception/_support/_generated/*TesterActions.php
+tests/codeception/joomla-cms*
+tests/codeception/_output*
+selenium-server-standalone.jar
+selenium.log
+tests/codeception/cache
+tests/codeception/_output
+tests/codeception/vendor
+composer.phar
+
+# Build related
+RoboFile.ini
+
diff --git a/.hound.yml b/.hound.yml
new file mode 100644
index 0000000000000..87a3326e2f952
--- /dev/null
+++ b/.hound.yml
@@ -0,0 +1,13 @@
+fail_on_violations: false
+
+scss:
+ enabled: false
+
+jshint:
+ enabled: false
+
+eslint:
+ enabled: false
+
+ruby:
+ enabled: false
diff --git a/.travis.yml b/.travis.yml
index 8595f2f766792..070893c5e55d0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,35 +13,29 @@ env:
matrix:
fast_finish: true
include:
+ - php: 7.0
+ env: INSTALL_APCU="yes" INSTALL_MEMCACHE="no"
+ - php: 7.1
+ env: INSTALL_APCU="yes" INSTALL_MEMCACHE="no"
+ # Requires older Precise image
- php: 5.3
env: INSTALL_APC="yes"
+ sudo: true
+ dist: precise
+ # The new Trusty image has issues with running APC, do not enable it here
- php: 5.4
- env: INSTALL_APC="yes"
+ env: INSTALL_APC="no"
- php: 5.5
env: INSTALL_APCU="yes"
- php: 5.6
env: INSTALL_APCU="yes"
- - php: 7.0
- env: INSTALL_APCU="yes" INSTALL_APCU_BC_BETA="no" INSTALL_MEMCACHE="no" INSTALL_MEMCACHED="no" INSTALL_REDIS="no" # Disabled apcu_bc install until https://github.com/travis-ci/travis-ci/issues/5207 is resolved
- - php: 7.1
- env: INSTALL_APCU="yes" INSTALL_APCU_BC_BETA="no" INSTALL_MEMCACHE="no" INSTALL_MEMCACHED="no" INSTALL_REDIS="no" # Disabled apcu_bc install until https://github.com/travis-ci/travis-ci/issues/5207 is resolved
- - php: hhvm
- sudo: true
- dist: trusty
- group: edge # until the next update
- addons:
- apt:
- packages:
- - mysql-server-5.6
- - mysql-client-core-5.6
- - mysql-client-5.6
- services:
- - mysql
- - postgresql
- - redis-server
- env: INSTALL_APCU_BC_BETA="no" INSTALL_MEMCACHE="no" INSTALL_MEMCACHED="no" # Disabled items that currently do not work in travis-ci hhvm
+ - php: 7.2
+ env: INSTALL_APCU="yes" INSTALL_MEMCACHE="no"
+ - php: nightly
+ env: INSTALL_APCU="yes" INSTALL_MEMCACHE="no"
allow_failures:
- - php: hhvm
+ - php: 7.2
+ - php: nightly
services:
- memcache
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000000000..5b7fd8f3ce9e2
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,75 @@
+#!groovy
+
+pipeline {
+ agent any
+
+ stages {
+
+ stage('codestyles') {
+ agent {
+ docker 'joomlaprojects/docker-phpcs'
+ }
+ steps {
+ sh '/usr/local/vendor/bin/phpcs --report=full --extensions=php -p --standard=build/phpcs/Joomla .'
+ }
+ }
+
+ stage("Testing PHP") {
+ steps {
+ // You can only use the parallel step if it's the *only* step in the stage.
+ parallel(
+ PHP53: {
+ sh 'export PHPVERSION=php53;/usr/local/bin/docker-compose --project-name php53-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml run --rm test bash build/jenkins/unit-tests.sh'
+ },
+ PHP54: {
+ sh 'export PHPVERSION=php54;/usr/local/bin/docker-compose --project-name php54-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml run --rm test bash build/jenkins/unit-tests.sh'
+ },
+ PHP55: {
+ sh 'export PHPVERSION=php55;/usr/local/bin/docker-compose --project-name php55-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml run --rm test bash build/jenkins/unit-tests.sh'
+ },
+ PHP56: {
+ sh 'export PHPVERSION=php56;/usr/local/bin/docker-compose --project-name php56-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml run --rm test bash build/jenkins/unit-tests.sh'
+ },
+ PHP70: {
+ sh 'export PHPVERSION=php70;/usr/local/bin/docker-compose --project-name php70-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml run --rm test bash build/jenkins/unit-tests.sh'
+ },
+ PHP71: {
+ sh 'export PHPVERSION=php71;/usr/local/bin/docker-compose --project-name php71-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml run --rm test bash build/jenkins/unit-tests.sh'
+ }
+ )
+ }
+ post {
+ always {
+ // Spin down containers no matter what happens
+ sh 'export PHPVERSION=php53;/usr/local/bin/docker-compose --project-name php53-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml down'
+ sh 'export PHPVERSION=php54;/usr/local/bin/docker-compose --project-name php54-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml down'
+ sh 'export PHPVERSION=php55;/usr/local/bin/docker-compose --project-name php55-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml down'
+ sh 'export PHPVERSION=php56;/usr/local/bin/docker-compose --project-name php56-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml down'
+ sh 'export PHPVERSION=php70;/usr/local/bin/docker-compose --project-name php70-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml down'
+ sh 'export PHPVERSION=php71;/usr/local/bin/docker-compose --project-name php71-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml down'
+ }
+ }
+ }
+
+ stage('Testing-Javascript') {
+ agent {
+ docker {
+ image 'joomlaprojects/docker-systemtests'
+ args '--user 0'
+ }
+ }
+ steps {
+ sh '''
+ ln -s /usr/bin/nodejs /usr/bin/node && \
+ export DISPLAY=:0 && \
+ (Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset &) && \
+ sleep 3 && \
+ (fluxbox &) && \
+ cd tests/javascript && npm install --no-optional && cd ../.. && \
+ tests/javascript/node_modules/karma/bin/karma start karma.conf.js --single-run
+ '''
+ }
+ }
+ }
+
+}
diff --git a/README.md b/README.md
index 00e0c5964b458..0fe606fe5be58 100644
--- a/README.md
+++ b/README.md
@@ -1,22 +1,18 @@
-Joomla! CMS™ [![Analytics](https://ga-beacon.appspot.com/UA-544070-3/joomla-cms/readme)](https://github.com/igrigorik/ga-beacon)
+Joomla! CMS™ [![Analytics](https://ga-beacon.appspot.com/UA-544070-3/joomla-cms/readme)](https://github.com/igrigorik/ga-beacon) [![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)
====================
Build Status
---------------------
-Travis-CI: [![Build Status](https://travis-ci.org/joomla/joomla-cms.svg?branch=staging)](https://travis-ci.org/joomla/joomla-cms)
-
-Drone -CI: [![Build Status](http://213.160.72.75/api/badges/joomla/joomla-cms/status.svg)](http://213.160.72.75/joomla/joomla-cms)
-
-AppVeyor: [![Build status](https://ci.appveyor.com/api/projects/status/bpcxulw6nnxlv8kb/branch/staging?svg=true)](https://ci.appveyor.com/project/joomla/joomla-cms)
-
-Jenkins: [![Build Status](http://build.joomla.org/job/cms/badge/icon)](http://build.joomla.org/job/cms/)
+| Travis-CI | Drone-CI | AppVeyor | Jenkins |
+| ------------- | ------------- | ------------- | ------------- |
+| [![Build Status](https://travis-ci.org/joomla/joomla-cms.svg?branch=staging)](https://travis-ci.org/joomla/joomla-cms) | [![Build Status](http://213.160.72.75/api/badges/joomla/joomla-cms/status.svg)](http://213.160.72.75/joomla/joomla-cms) | [![Build status](https://ci.appveyor.com/api/projects/status/bpcxulw6nnxlv8kb/branch/staging?svg=true)](https://ci.appveyor.com/project/joomla/joomla-cms) | [![Build Status](http://build.joomla.org/job/cms/badge/icon)](http://build.joomla.org/job/cms/) |
What is this?
---------------------
* This is a Joomla! 3.x installation/upgrade package.
* Joomla's [Official website](https://www.joomla.org).
-* Joomla! 3.7 [version history](https://docs.joomla.org/Joomla_3.7_version_history).
-* Detailed changes are in the [changelog](https://github.com/joomla/joomla-cms/commits/master).
+* Joomla! 3.8 [version history](https://docs.joomla.org/Special:MyLanguage/Joomla_3.8_version_history).
+* Detailed changes are in the [changelog](https://github.com/joomla/joomla-cms/commits/staging).
What is Joomla?
---------------------
@@ -26,20 +22,20 @@ What is Joomla?
Is Joomla! for you?
---------------------
-* Joomla! is [the right solution for most content web projects](https://docs.joomla.org/Portal:Learn_More).
+* Joomla! is [the right solution for most content web projects](https://docs.joomla.org/Special:MyLanguage/Portal:Learn_More).
* View Joomla's [core features here](https://www.joomla.org/core-features.html).
* Try it out for yourself in our [online demo](https://demo.joomla.org).
How to find a Joomla! translation?
---------------------
* Repository of [accredited language packs](https://community.joomla.org/translations.html).
-* You can also [add languages](https://docs.joomla.org/J3.x:Setup_a_Multilingual_Site/Installing_New_Language) directly to your website via your Joomla! administration panel.
-* Learn how to [setup a Multilingual Joomla! Site](https://docs.joomla.org/J3.x:Setup_a_Multilingual_Site)
+* You can also [add languages](https://docs.joomla.org/Special:MyLanguage/J3.x:Setup_a_Multilingual_Site/Installing_New_Language) directly to your website via your Joomla! administration panel.
+* Learn how to [setup a Multilingual Joomla! Site](https://docs.joomla.org/Special:MyLanguage/J3.x:Setup_a_Multilingual_Site)
Learn Joomla!
---------------------
-* Read ['Getting Started with Joomla!'](https://docs.joomla.org/J3.x:Getting_Started_with_Joomla!) to learn the basics.
-* Before installing, read the ['Beginners' Guide'](https://docs.joomla.org/Portal:Beginners).
+* Read ['Getting Started with Joomla!'](https://docs.joomla.org/Special:MyLanguage/J3.x:Getting_Started_with_Joomla!) to learn the basics.
+* Before installing, read the ['Beginners' Guide'](https://docs.joomla.org/Special:MyLanguage/Portal:Beginners).
What are the benefits of Joomla?
---------------------
@@ -51,13 +47,13 @@ Is it easy to change the layout display?
---------------------
* The layout is controlled by templates that you can edit.
* There are a lot of ready-made professional templates that you can download.
-* Template management information is [available here](https://docs.joomla.org/Portal:Template_Management).
+* Template management information is [available here](https://docs.joomla.org/Special:MyLanguage/Portal:Template_Management).
Ready to install Joomla?
---------------------
* Check the [minimum requirements](https://downloads.joomla.org/technical-requirements).
-* How do you [install Joomla](https://docs.joomla.org/J3.x:Installing_Joomla)?
-* You could start your Joomla! experience by [building your site on a local test server](https://docs.joomla.org/Installing_Joomla_locally).
+* How do you [install Joomla](https://docs.joomla.org/Special:MyLanguage/J3.x:Installing_Joomla)?
+* You could start your Joomla! experience by [building your site on a local test server](https://docs.joomla.org/Special:MyLanguage/Installing_Joomla_locally).
When ready, it can be moved to an online hosting account of your choice.
Updates are free!
@@ -66,31 +62,31 @@ Updates are free!
Where can you get support and help?
---------------------
-* [The Joomla! Documentation](https://docs.joomla.org/Main_Page);
-* [Frequently Asked Questions](https://docs.joomla.org/Category:FAQ) (FAQ);
-* Find the [information you need](https://docs.joomla.org/Start_here);
+* [The Joomla! Documentation](https://docs.joomla.org/Special:MyLanguage/Main_Page);
+* [Frequently Asked Questions](https://docs.joomla.org/Special:MyLanguage/Category:FAQ) (FAQ);
+* Find the [information you need](https://docs.joomla.org/Special:MyLanguage/Start_here);
* Find [help and other users](https://www.joomla.org/about-joomla/create-and-share.html);
* Post questions at [our forums](https://forum.joomla.org);
-* [Joomla Resources Directory](https://resources.joomla.org/) (JRD).
+* [Joomla Resources Directory](https://resources.joomla.org) (JRD).
Do you already have a Joomla! site that isn't built with Joomla! 3.x?
---------------------
* What's [new in Joomla! 3.x](https://www.joomla.org/3)?
-* What are the [main differences between 2.5 and 3.x](https://docs.joomla.org/What_are_the_major_differences_between_Joomla!_2.5_and_3.x%3F)?
-* How to [migrate from 2.5.x to 3.x](https://docs.joomla.org/Joomla_2.5_to_3.x_Step_by_Step_Migration).
-* How to [migrate from 1.5.x to 3.x](https://docs.joomla.org/Joomla_1.5_to_3.x_Step_by_Step_Migration).
+* What are the [main differences between 2.5 and 3.x](https://docs.joomla.org/Special:MyLanguage/What_are_the_major_differences_between_Joomla!_2.5_and_3.x%3F)?
+* How to [migrate from 2.5.x to 3.x](https://docs.joomla.org/Special:MyLanguage/Joomla_2.5_to_3.x_Step_by_Step_Migration).
+* How to [migrate from 1.5.x to 3.x](https://docs.joomla.org/Special:MyLanguage/Joomla_1.5_to_3.x_Step_by_Step_Migration).
Do you want to improve Joomla?
--------------------
-* Where to [request a feature](https://issues.joomla.org/)?
-* How do you [report a bug](https://docs.joomla.org/Filing_bugs_and_issues) on the [Issue Tracker](https://issues.joomla.org/)?
-* Get Involved: Joomla! is community developed software. [Join the community](https://volunteers.joomla.org/).
-* Documentation for [Developers](https://docs.joomla.org/Portal:Developers).
-* Documentation for [Web designers](https://docs.joomla.org/Web_designers).
+* Where to [request a feature](https://issues.joomla.org)?
+* How do you [report a bug](https://docs.joomla.org/Special:MyLanguage/Filing_bugs_and_issues) on the [Issue Tracker](https://issues.joomla.org)?
+* Get Involved: Joomla! is community developed software. [Join the community](https://volunteers.joomla.org).
+* Documentation for [Developers](https://docs.joomla.org/Special:MyLanguage/Portal:Developers).
+* Documentation for [Web designers](https://docs.joomla.org/Special:MyLanguage/Web_designers).
Copyright
---------------------
-* Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved.
-* [Special Thanks](https://docs.joomla.org/Joomla!_Credits_and_Thanks)
+* Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.
+* [Special Thanks](https://docs.joomla.org/Special:MyLanguage/Joomla!_Credits_and_Thanks)
* Distributed under the GNU General Public License version 2 or later
-* See [License details](https://docs.joomla.org/Joomla_Licenses)
+* See [License details](https://docs.joomla.org/Special:MyLanguage/Joomla_Licenses)
diff --git a/README.txt b/README.txt
index 9881b46597896..6d93aedcc1e61 100644
--- a/README.txt
+++ b/README.txt
@@ -1,8 +1,8 @@
1- What is this?
* This is a Joomla! installation/upgrade package to version 3.x
* Joomla! Official site: https://www.joomla.org
- * Joomla! 3.7 version history - https://docs.joomla.org/Joomla_3.7_version_history
- * Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/master
+ * Joomla! 3.8 version history - https://docs.joomla.org/Special:MyLanguage/Joomla_3.8_version_history
+ * Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/staging
2- What is Joomla?
* Joomla! is a Content Management System (CMS) which enables you to build Web sites and powerful online applications.
@@ -11,18 +11,18 @@
You can find full technical requirements here: https://downloads.joomla.org/technical-requirements.
3- Is Joomla! for you?
- * Joomla! is the right solution for most content web projects: https://docs.joomla.org/Portal:Learn_More
+ * Joomla! is the right solution for most content web projects: https://docs.joomla.org/Special:MyLanguage/Portal:Learn_More
* See Joomla's core features - https://www.joomla.org/core-features.html
- * Try out our online demo: https://demo.joomla.org/
+ * Try out our online demo: https://demo.joomla.org
4- How to find a Joomla! translation?
* Repository of accredited language packs: https://community.joomla.org/translations.html
- * You can also add languages directly to your website via your Joomla! administration panel: https://docs.joomla.org/J3.x:Setup_a_Multilingual_Site/Installing_New_Language
- * Learn how to setup a Multilingual Joomla! Site: https://docs.joomla.org/J3.x:Setup_a_Multilingual_Site
+ * You can also add languages directly to your website via your Joomla! administration panel: https://docs.joomla.org/Special:MyLanguage/J3.x:Setup_a_Multilingual_Site/Installing_New_Language
+ * Learn how to setup a Multilingual Joomla! Site: https://docs.joomla.org/Special:MyLanguage/J3.x:Setup_a_Multilingual_Site
5- Learn Joomla!
- * Read Getting Started with Joomla to find out the basics: https://docs.joomla.org/J3.x:Getting_Started_with_Joomla!
- * Before installing, read the beginners guide: https://docs.joomla.org/Portal:Beginners
+ * Read Getting Started with Joomla to find out the basics: https://docs.joomla.org/Special:MyLanguage/J3.x:Getting_Started_with_Joomla!
+ * Before installing, read the beginners guide: https://docs.joomla.org/Special:MyLanguage/Portal:Beginners
6- What are the benefits of Joomla?
* The functionality of a Joomla! website can be extended by installing extensions that you can create (or download) to suit your needs.
@@ -32,41 +32,41 @@
7- Is it easy to change the layout display?
* The layout is controlled by templates that you can edit.
* There are a lot of ready-made professional templates that you can download.
- * Check out the template management information: https://docs.joomla.org/Portal:Template_Management
+ * Check out the template management information: https://docs.joomla.org/Special:MyLanguage/Portal:Template_Management
8- Ready to install Joomla?
* Check the minimum requirements here: https://downloads.joomla.org/technical-requirements
- * How do you install Joomla - https://docs.joomla.org/J3.x:Installing_Joomla
+ * How do you install Joomla - https://docs.joomla.org/Special:MyLanguage/J3.x:Installing_Joomla
* You could start your Joomla! experience building your site on a local test server.
When ready it can be moved to an online hosting account of your choice.
- See the tutorial: https://docs.joomla.org/Installing_Joomla_locally
+ See the tutorial: https://docs.joomla.org/Special:MyLanguage/Installing_Joomla_locally
9- Updates are free!
* Always use the latest version: https://downloads.joomla.org/latest
10- Where can you get support and help?
- * The Joomla! Documentation: https://docs.joomla.org/Main_Page
- * FAQ Frequently Asked Questions: https://docs.joomla.org/Category:FAQ
- * Find the information you need: https://docs.joomla.org/Start_here
+ * The Joomla! Documentation: https://docs.joomla.org/Special:MyLanguage/Main_Page
+ * FAQ Frequently Asked Questions: https://docs.joomla.org/Special:MyLanguage/Category:FAQ
+ * Find the information you need: https://docs.joomla.org/Special:MyLanguage/Start_here
* Find help and other users: https://www.joomla.org/about-joomla/create-and-share.html
* Post questions at our forums: https://forum.joomla.org
* Joomla! Resources Directory (JRD): https://resources.joomla.org/
11- Do you already have a Joomla! site that's not built with Joomla! 3.x ?
* What's new in Joomla! 3.x: https://www.joomla.org/3
- * What are the main differences from 2.5 to 3? https://docs.joomla.org/What_are_the_major_differences_between_Joomla!_2.5_and_3.x%3F
- * How to migrate from 2.5.x to 3.x? Tutorial: https://docs.joomla.org/Joomla_2.5_to_3.x_Step_by_Step_Migration
- * How to migrate from 1.5.x to 3.x? Tutorial: https://docs.joomla.org/Joomla_1.5_to_3.x_Step_by_Step_Migration
+ * What are the main differences from 2.5 to 3? https://docs.joomla.org/Special:MyLanguage/What_are_the_major_differences_between_Joomla!_2.5_and_3.x%3F
+ * How to migrate from 2.5.x to 3.x? Tutorial: https://docs.joomla.org/Special:MyLanguage/Joomla_2.5_to_3.x_Step_by_Step_Migration
+ * How to migrate from 1.5.x to 3.x? Tutorial: https://docs.joomla.org/Special:MyLanguage/Joomla_1.5_to_3.x_Step_by_Step_Migration
12- Do you want to improve Joomla?
- * Where to request a feature? https://issues.joomla.org/
- * How do you report a bug? https://docs.joomla.org/Filing_bugs_and_issues
- * Get Involved: Joomla! is a community developed software. Join the community at https://volunteers.joomla.org/
- * Documentation for Developers: https://docs.joomla.org/Portal:Developers
- * Documentation for Web designers: https://docs.joomla.org/Web_designers
+ * Where to request a feature? https://issues.joomla.org
+ * How do you report a bug? https://docs.joomla.org/Special:MyLanguage/Filing_bugs_and_issues
+ * Get Involved: Joomla! is a community developed software. Join the community at https://volunteers.joomla.org
+ * Documentation for Developers: https://docs.joomla.org/Special:MyLanguage/Portal:Developers
+ * Documentation for Web designers: https://docs.joomla.org/Special:MyLanguage/Web_designers
Copyright:
- * Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved.
- * Special Thanks: https://docs.joomla.org/Joomla!_Credits_and_Thanks
+ * Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.
+ * Special Thanks: https://docs.joomla.org/Special:MyLanguage/Joomla!_Credits_and_Thanks
* Distributed under the GNU General Public License version 2 or later
- * See Licenses details at https://docs.joomla.org/Joomla_Licenses
+ * See Licenses details at https://docs.joomla.org/Special:MyLanguage/Joomla_Licenses
diff --git a/RoboFile.dist.ini b/RoboFile.dist.ini
new file mode 100644
index 0000000000000..ea5cafda52596
--- /dev/null
+++ b/RoboFile.dist.ini
@@ -0,0 +1,6 @@
+; If you want to setup your test website (document root) in a different folder, you can do that here.
+; You can also set an absolute path, i.e. /path/to/my/cms/folder
+cmsPath = tests/codeception/joomla-cms
+
+; (Linux / Mac only) If you want to set a different owner for the CMS root folder, you can set it here.
+localUser =
diff --git a/RoboFile.php b/RoboFile.php
new file mode 100644
index 0000000000000..e271464e187ec
--- /dev/null
+++ b/RoboFile.php
@@ -0,0 +1,558 @@
+configuration = $this->getConfiguration();
+ $this->cmsPath = $this->getTestingPath();
+
+ // Set default timezone (so no warnings are generated if it is not set)
+ date_default_timezone_set('UTC');
+ }
+
+ /**
+ * Get (optional) configuration from an external file
+ *
+ * @since 3.7.3
+ *
+ * @return \stdClass|null
+ */
+ public function getConfiguration()
+ {
+ $configurationFile = __DIR__ . '/RoboFile.ini';
+
+ if (!file_exists($configurationFile))
+ {
+ $this->say('No local configuration file');
+
+ return null;
+ }
+
+ $configuration = parse_ini_file($configurationFile);
+
+ if ($configuration === false)
+ {
+ $this->say('Local configuration file is empty or wrong (check is it in correct .ini format');
+
+ return null;
+ }
+
+ return json_decode(json_encode($configuration));
+ }
+
+ /**
+ * Get the correct CMS root path
+ *
+ * @since 3.7.3
+ *
+ * @return string
+ */
+ private function getTestingPath()
+ {
+ if (empty($this->configuration->cmsPath))
+ {
+ return $this->testsPath . 'joomla-cms';
+ }
+
+ if (!file_exists(dirname($this->configuration->cmsPath)))
+ {
+ $this->say('CMS path written in local configuration does not exists or is not readable');
+
+ return $this->testsPath . 'joomla-cms';
+ }
+
+ return $this->configuration->cmsPath;
+ }
+
+ /**
+ * Creates a testing Joomla site for running the tests (use it before run:test)
+ *
+ * @param bool $useHtaccess (1/0) Rename and enable embedded Joomla .htaccess file
+ *
+ * @since 3.7.3
+ *
+ * @return void
+ */
+ public function createTestingSite($useHtaccess = false)
+ {
+ // Clean old testing site
+ if (is_dir($this->cmsPath))
+ {
+ try
+ {
+ $this->taskDeleteDir($this->cmsPath)->run();
+ }
+ catch (Exception $e)
+ {
+ // Sorry, we tried :(
+ $this->say('Sorry, you will have to delete ' . $this->cmsPath . ' manually.');
+
+ exit(1);
+ }
+ }
+
+ $exclude = ['tests', 'tests-phpunit', '.run', '.github', '.git'];
+
+ $this->copyJoomla($this->cmsPath, $exclude);
+
+ // Optionally change owner to fix permissions issues
+ if (!empty($this->configuration->localUser))
+ {
+ $this->_exec('chown -R ' . $this->configuration->localUser . ' ' . $this->cmsPath);
+ }
+
+ // Optionally uses Joomla default htaccess file. Used by TravisCI
+ if ($useHtaccess == true)
+ {
+ $this->say('Renaming htaccess.txt to .htaccess');
+ $this->_copy('./htaccess.txt', $this->cmsPath . '/.htaccess');
+ $this->_exec('sed -e "s,# RewriteBase /,RewriteBase /tests/codeception/joomla-cms,g" -in-place tests/codeception/joomla-cms/.htaccess');
+ }
+ }
+
+ /**
+ * Copy the Joomla installation excluding folders
+ *
+ * @param string $dst Target folder
+ * @param array $exclude Exclude list of folders
+ *
+ * @throws Exception
+ *
+ * @since 3.7.3
+ *
+ * @return void
+ */
+ protected function copyJoomla($dst, $exclude = array())
+ {
+ $dir = @opendir(".");
+
+ if (false === $dir)
+ {
+ throw new Exception($this, "Cannot open source directory");
+ }
+
+ if (!is_dir($dst))
+ {
+ mkdir($dst, 0755, true);
+ }
+
+ while (false !== ($file = readdir($dir)))
+ {
+ if (in_array($file, $exclude))
+ {
+ continue;
+ }
+
+ if (($file !== '.') && ($file !== '..'))
+ {
+ $srcFile = "." . '/' . $file;
+ $destFile = $dst . '/' . $file;
+
+ if (is_dir($srcFile))
+ {
+ $this->_copyDir($srcFile, $destFile);
+ }
+ else
+ {
+ copy($srcFile, $destFile);
+ }
+ }
+ }
+
+ closedir($dir);
+ }
+
+ /**
+ * Downloads Composer
+ *
+ * @since 3.7.3
+ *
+ * @return void
+ */
+ private function getComposer()
+ {
+ // Make sure we have Composer
+ if (!file_exists($this->testsPath . 'composer.phar'))
+ {
+ $this->_exec('curl -o ' . $this->testsPath . 'composer.phar --retry 3 --retry-delay 5 -sS https://getcomposer.org/installer | php');
+ }
+ }
+
+ /**
+ * Runs Selenium Standalone Server.
+ *
+ * @since 3.7.3
+ *
+ * @return void
+ */
+ public function runSelenium()
+ {
+ if (!$this->isWindows())
+ {
+ $this->_exec($this->testsPath . "vendor/bin/selenium-server-standalone " . $this->getWebDriver() . ' >> selenium.log 2>&1 &');
+ }
+ else
+ {
+ $this->_exec("START java.exe -jar " . $this->getWebDriver() . ' tests\codeception\vendor\joomla-projects\selenium-server-standalone\bin\selenium-server-standalone.jar ');
+ }
+
+ sleep(3);
+ }
+
+ /**
+ * Executes all the Selenium System Tests in a suite on your machine
+ *
+ * @param array $opts Array of configuration options:
+ * - 'use-htaccess': renames and enable embedded Joomla .htaccess file
+ * - 'env': set a specific environment to get configuration from
+ *
+ * @since 3.7.3
+ *
+ * @return mixed
+ */
+ public function runTests($opts = ['use-htaccess' => false, 'env' => 'desktop'])
+ {
+ $this->say("Running tests");
+
+ $this->createTestingSite($opts['use-htaccess']);
+
+ $this->getComposer();
+ $this->taskComposerInstall($this->testsPath . 'composer.phar')->run();
+
+ $this->runSelenium();
+
+ // Make sure to run the build command to generate AcceptanceTester
+ if ($this->isWindows())
+ {
+ $this->_exec('php ' . $this->getWindowsPath($this->testsPath . 'vendor/bin/codecept') . ' build');
+ $pathToCodeception = $this->getWindowsPath($this->testsPath . 'vendor/bin/codecept');
+ }
+ else
+ {
+ $this->_exec('php ' . $this->testsPath . 'vendor/bin/codecept build');
+
+ $pathToCodeception = $this->testsPath . 'vendor/bin/codecept';
+ }
+
+ $this->taskCodecept($pathToCodeception)
+ ->arg('--steps')
+ ->arg('--debug')
+ ->arg('--fail-fast')
+ ->env($opts['env'])
+ ->arg($this->testsPath . 'acceptance/install/')
+ ->run()
+ ->stopOnFail();
+
+ $this->taskCodecept()
+ ->arg('--steps')
+ ->arg('--debug')
+ ->arg('--fail-fast')
+ ->env($opts['env'])
+ ->arg($this->testsPath . '/acceptance/administrator/components/com_users')
+ ->run()
+ ->stopOnFail();
+ }
+
+ /**
+ * Executes a specific Selenium System Tests in your machine
+ *
+ * @param string $pathToTestFile Optional name of the test to be run
+ * @param string $suite Optional name of the suite containing the tests, Acceptance by default.
+ *
+ * @since 3.7.3
+ *
+ * @return void
+ */
+ public function runTest($pathToTestFile = null, $suite = 'acceptance')
+ {
+ $this->runSelenium();
+
+ // Make sure to run the build command to generate AcceptanceTester
+ $path = 'tests/codeception/vendor/bin/codecept';
+ $this->_exec('php ' . $this->isWindows() ? $this->getWindowsPath($path) : $path . ' build');
+
+ if (!$pathToTestFile)
+ {
+ $this->say('Available tests in the system:');
+
+ $iterator = new RecursiveIteratorIterator(
+ new RecursiveDirectoryIterator(
+ $this->testsPath . $suite,
+ RecursiveDirectoryIterator::SKIP_DOTS
+ ),
+ RecursiveIteratorIterator::SELF_FIRST
+ );
+
+ $tests = array();
+ $i = 1;
+
+ $iterator->rewind();
+
+ while ($iterator->valid())
+ {
+ if (strripos($iterator->getSubPathName(), 'cept.php')
+ || strripos($iterator->getSubPathName(), 'cest.php')
+ || strripos($iterator->getSubPathName(), '.feature')
+ )
+ {
+ $this->say('[' . $i . '] ' . $iterator->getSubPathName());
+
+ $tests[$i] = $iterator->getSubPathName();
+ $i++;
+ }
+
+ $iterator->next();
+ }
+
+ $this->say('');
+ $testNumber = $this->ask('Type the number of the test in the list that you want to run...');
+ $test = $tests[$testNumber];
+ }
+
+ $pathToTestFile = $this->testsPath . $suite . '/' . $test;
+
+ // Loading the class to display the methods in the class
+
+ // Logic to fetch the class name from the file name
+ $fileName = explode("/", $test);
+
+ // If the selected file is cest only then we will give the option to execute individual methods, we don't need this in cept or feature files
+ $i = 1;
+
+ if (isset($fileName[1]) && strripos($fileName[1], 'cest'))
+ {
+ require $this->testsPath . $suite . '/' . $test;
+
+ $className = explode(".", $fileName[1]);
+ $class_methods = get_class_methods($className[0]);
+
+ $this->say('[' . $i . '] ' . 'All');
+
+ $methods[$i] = 'All';
+ $i++;
+
+ foreach ($class_methods as $method_name)
+ {
+ $reflect = new ReflectionMethod($className[0], $method_name);
+
+ if (!$reflect->isConstructor() && $reflect->isPublic())
+ {
+ $this->say('[' . $i . '] ' . $method_name);
+
+ $methods[$i] = $method_name;
+
+ $i++;
+ }
+ }
+
+ $this->say('');
+ $methodNumber = $this->ask('Please choose the method in the test that you would want to run...');
+ $method = $methods[$methodNumber];
+ }
+
+ if (isset($method) && $method != 'All')
+ {
+ $pathToTestFile = $pathToTestFile . ':' . $method;
+ }
+
+ $testPathCodecept = $this->testsPath . 'vendor/bin/codecept';
+
+ $this->taskCodecept($this->isWindows() ? $this->getWindowsPath($testPathCodecept) : $testPathCodecept)
+ ->test($pathToTestFile)
+ ->arg('--steps')
+ ->arg('--debug')
+ ->run()
+ ->stopOnFail();
+ }
+
+ /**
+ * Check if local OS is Windows
+ *
+ * @return bool
+ *
+ * @since 3.7.3
+ */
+ private function isWindows()
+ {
+ return strtoupper(substr(PHP_OS, 0, 3)) === 'WIN';
+ }
+
+ /**
+ * Return the correct path for Windows (needed by CMD)
+ *
+ * @param string $path Linux path
+ *
+ * @return string
+ *
+ * @since 3.7.3
+ */
+ private function getWindowsPath($path)
+ {
+ return str_replace('/', DIRECTORY_SEPARATOR, $path);
+ }
+
+ /**
+ * Detect the correct driver for selenium
+ *
+ * @return string the webdriver string to use with selenium
+ *
+ * @since 3.7.3
+ */
+ public function getWebdriver()
+ {
+ $suiteConfig = $this->getSuiteConfig();
+ $codeceptMainConfig = \Codeception\Configuration::config();
+ $browser = $suiteConfig['modules']['config']['JoomlaBrowser']['browser'];
+
+ if ($browser == 'chrome')
+ {
+ $driver['type'] = 'webdriver.chrome.driver';
+ }
+ elseif ($browser == 'firefox')
+ {
+ $driver['type'] = 'webdriver.gecko.driver';
+ }
+ elseif ($browser == 'MicrosoftEdge')
+ {
+ $driver['type'] = 'webdriver.edge.driver';
+
+ // Check if we are using Windows Insider builds
+ if ($suiteConfig['modules']['config']['AcceptanceHelper']['MicrosoftEdgeInsiders'])
+ {
+ $browser = 'MicrosoftEdgeInsiders';
+ }
+ }
+ elseif ($browser == 'internet explorer')
+ {
+ $driver['type'] = 'webdriver.ie.driver';
+ }
+
+ // Check if we have a path for this browser and OS in the codeception settings
+ if (isset($codeceptMainConfig['webdrivers'][$browser][$this->getOs()]))
+ {
+ $driverPath = $codeceptMainConfig['webdrivers'][$browser][$this->getOs()];
+ }
+ else
+ {
+ $this->yell('No driver for your browser. Check your browser in acceptance.suite.yml and the webDrivers in codeception.yml');
+
+ // We can't do anything without a driver, exit
+ exit(1);
+ }
+
+ $driver['path'] = $driverPath;
+
+ return '-D' . implode('=', $driver);
+ }
+
+ /**
+ * Return the os name
+ *
+ * @return string
+ *
+ * @since 3.7.3
+ */
+ private function getOs()
+ {
+ $os = php_uname('s');
+
+ if (strpos(strtolower($os), 'windows') !== false)
+ {
+ return 'windows';
+ }
+
+ if (strpos(strtolower($os), 'darwin') !== false)
+ {
+ return 'mac';
+ }
+
+ return 'linux';
+ }
+
+ /**
+ * Get the suite configuration
+ *
+ * @param string $suite Name of the test suite
+ *
+ * @return array
+ *
+ * @since 3.7.3
+ */
+ private function getSuiteConfig($suite = 'acceptance')
+ {
+ if (!$this->suiteConfig)
+ {
+ $this->suiteConfig = Symfony\Component\Yaml\Yaml::parse(file_get_contents("tests/codeception/{$suite}.suite.yml"));
+ }
+
+ return $this->suiteConfig;
+ }
+}
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 0000000000000..449c2a5978fdd
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,39 @@
+# Security Policies and Procedures
+
+This document outlines security procedures and policies for the `Joomla! Project`.
+
+ * [Reporting a Bug](#reporting-a-bug)
+ * [Response Handling](#response-handling)
+ * [Security Announcement Policy](#security-announcement-policy)
+ * [Further Details on the Joomla! Security Policies](https://security.joomla.org)
+
+## Reporting a Bug
+
+The `Joomla` team and community take all security bugs in `Joomla` seriously.
+
+The Joomla! Project takes security vulnerabilities very seriously. As such, the Joomla! Security Strike Team (JSST) oversees the project's security issues and follows some specific procedures when dealing with these issues.
+
+If you find a possible vulnerability, please report it to the JSST using the [online form](https://developer.joomla.org/security/contact-the-team.html) or via email at security@joomla.org
+
+We maintain a list of [GPG keys and addresses](https://developer.joomla.org/security/gpg-keys.html) for the security@joomla.org address and members of the JSST to allow signed and encrypted communications.
+
+To report an issue in a Joomla! extension, please submit it to the [Vulnerable Extensions List.](https://vel.joomla.org/submit-vel)
+
+For support with a site which has been attacked, please visit the [Joomla! Forum.](https://forum.joomla.org/viewforum.php?f=714)
+
+Thank you for improving the security of `Joomla`.
+
+## Response Handling
+
+The JSST aims to ensure all issues are handled in a timely manner and for clear communication between the team and issue reporters. As such, we have established the following guidelines for responding to issue reports:
+
+* Within 24 hours every report gets acknowledged
+* Within 7 days every report gets a further response stating either
+ * the issue is closed (and why)
+ * the issue is still under investigation; if needed, additional information will be requested
+* Within 21 days every report must be resolved unless there are exceptional circumstances requiring additional time
+
+## Security Announcement Policy
+* Verified vulnerabilities will only be publicly announced AFTER a release is issued which fixes the vulnerability.
+* All announcements will contain as much information as possible, but will NOT contain step-by-step instructions for the vulnerability.
+* The `Joomla! Project` will properly credit individuals and/or organizations who responsibly disclose security issues to the JSST. You can indicate the way you would like to be referred to in the advisory about the vulnerability. Our preference is to use full names. If you do not specify then we will use the contact name associated with the email address the report was received from. You can also request a pseudonym or having your name withheld.
diff --git a/administrator/components/com_admin/admin.php b/administrator/components/com_admin/admin.php
index e4f61bfbb0ee5..3e0986cdaeed3 100644
--- a/administrator/components/com_admin/admin.php
+++ b/administrator/components/com_admin/admin.php
@@ -3,7 +3,7 @@
* @package Joomla.Administrator
* @subpackage com_admin
*
- * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
+ * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
diff --git a/administrator/components/com_admin/admin.xml b/administrator/components/com_admin/admin.xml
index 9cbd5f7140866..aeeaea2513515 100644
--- a/administrator/components/com_admin/admin.xml
+++ b/administrator/components/com_admin/admin.xml
@@ -3,7 +3,7 @@