diff --git a/.drone.yml b/.drone.yml
new file mode 100644
index 00000000000..6c0a49e58f0
--- /dev/null
+++ b/.drone.yml
@@ -0,0 +1,197 @@
+workspace:
+ base: /var/www/owncloud
+ path: apps/firstrunwizard
+
+branches: [master, release*, release/*, stable10]
+
+pipeline:
+ install-core:
+ image: owncloudci/core
+ version: ${OC_VERSION}
+ pull: true
+ exclude: "apps/firstrunwizard"
+ db_type: ${DB_TYPE}
+ db_name: ${DB_NAME}
+ db_host: ${DB_TYPE}
+ db_username: autotest
+ db_password: owncloud
+ when:
+ matrix:
+ NEED_CORE: true
+
+ install-app:
+ image: owncloudci/php:${PHP_VERSION}
+ pull: true
+ commands:
+ - cd /var/www/owncloud/
+ - php occ a:l
+ - php occ a:e firstrunwizard
+ - php occ a:e testing
+ - php occ a:l
+ - php occ config:system:set trusted_domains 1 --value=owncloud
+ - php occ log:manage --level 0
+ when:
+ matrix:
+ NEED_INSTALL_APP: true
+
+ fix-permissions:
+ image: owncloudci/php:${PHP_VERSION}
+ pull: true
+ commands:
+ - chown www-data /var/www/owncloud -R
+ - chmod 777 /var/www/owncloud/tests/acceptance/filesForUpload -R
+ - chmod +x /var/www/owncloud/tests/acceptance/run.sh
+ when:
+ matrix:
+ NEED_SERVER: true
+
+ owncloud-log:
+ image: owncloud/ubuntu:16.04
+ detach: true
+ pull: true
+ commands:
+ - tail -f /var/www/owncloud/data/owncloud.log
+ when:
+ matrix:
+ NEED_SERVER: true
+
+ owncloud-coding-standard:
+ image: owncloudci/php:${PHP_VERSION}
+ pull: true
+ commands:
+ - make test-php-style
+ when:
+ matrix:
+ TEST_SUITE: owncloud-coding-standard
+
+ phpunit-tests:
+ image: owncloudci/php:${PHP_VERSION}
+ pull: true
+ environment:
+ - COVERAGE=${COVERAGE}
+ commands:
+ - if [ -z "${COVERAGE}" ]; then make test-php-unit; fi
+ - if [ "${COVERAGE}" = "true" ]; then make test-php-unit-dbg; fi
+ when:
+ matrix:
+ TEST_SUITE: phpunit
+
+ codecov:
+ image: plugins/codecov:2
+ secrets: [codecov_token]
+ pull: true
+ paths:
+ - tests/output/*.xml
+ when:
+ matrix:
+ COVERAGE: true
+
+ notify:
+ image: plugins/slack:1
+ pull: true
+ secrets: [slack_webhook]
+ channel: builds
+ when:
+ status: [failure, changed]
+ event: [push, tag]
+
+services:
+ mysql:
+ image: mysql:5.5
+ environment:
+ - MYSQL_USER=autotest
+ - MYSQL_PASSWORD=owncloud
+ - MYSQL_DATABASE=${DB_NAME}
+ - MYSQL_ROOT_PASSWORD=owncloud
+ when:
+ matrix:
+ DB_TYPE: mysql
+
+ pgsql:
+ image: postgres:9.4
+ environment:
+ - POSTGRES_USER=autotest
+ - POSTGRES_PASSWORD=owncloud
+ - POSTGRES_DB=${DB_NAME}
+ when:
+ matrix:
+ DB_TYPE: pgsql
+
+ oci:
+ image: deepdiver/docker-oracle-xe-11g
+ environment:
+ - ORACLE_USER=system
+ - ORACLE_PASSWORD=oracle
+ - ORACLE_DB=${DB_NAME}
+ when:
+ matrix:
+ DB_TYPE: oci
+
+ owncloud:
+ image: owncloudci/php:${PHP_VERSION}
+ pull: true
+ environment:
+ - APACHE_WEBROOT=/var/www/owncloud/
+ command: [ "/usr/local/bin/apachectl", "-e", "debug", "-D", "FOREGROUND" ]
+ when:
+ matrix:
+ NEED_SERVER: true
+
+matrix:
+ include:
+ # owncloud-coding-standard
+ - PHP_VERSION: 7.2
+ TEST_SUITE: owncloud-coding-standard
+
+ - PHP_VERSION: 5.6
+ TEST_SUITE: owncloud-coding-standard
+
+ # Unit Tests
+ - PHP_VERSION: 7.1
+ OC_VERSION: daily-master-qa
+ TEST_SUITE: phpunit
+ DB_TYPE: mysql
+ DB_NAME: owncloud
+ NEED_CORE: true
+ NEED_INSTALL_APP: true
+
+ - PHP_VERSION: 7.2
+ OC_VERSION: daily-master-qa
+ TEST_SUITE: phpunit
+ DB_TYPE: mysql
+ DB_NAME: owncloud
+ NEED_CORE: true
+ NEED_INSTALL_APP: true
+
+ - PHP_VERSION: 5.6
+ OC_VERSION: daily-stable10-qa
+ TEST_SUITE: phpunit
+ DB_TYPE: mysql
+ DB_NAME: owncloud
+ NEED_CORE: true
+ NEED_INSTALL_APP: true
+
+ - PHP_VERSION: 7.0
+ OC_VERSION: daily-stable10-qa
+ TEST_SUITE: phpunit
+ DB_TYPE: mysql
+ DB_NAME: owncloud
+ NEED_CORE: true
+ NEED_INSTALL_APP: true
+
+ - PHP_VERSION: 7.1
+ OC_VERSION: daily-stable10-qa
+ TEST_SUITE: phpunit
+ DB_TYPE: mysql
+ DB_NAME: owncloud
+ NEED_CORE: true
+ NEED_INSTALL_APP: true
+ COVERAGE: true
+
+ - PHP_VERSION: 7.2
+ OC_VERSION: daily-stable10-qa
+ TEST_SUITE: phpunit
+ DB_TYPE: mysql
+ DB_NAME: owncloud
+ NEED_CORE: true
+ NEED_INSTALL_APP: true
diff --git a/.gitignore b/.gitignore
index 9ae0879d2fe..178467ff314 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,16 @@
-# test coverage
-tests/clover.xml
+# build dir
+/build/
+/l10n/.transifexrc
+.php_cs.cache
+
+# Composer
+vendor/
+vendor-bin/**/vendor
+vendor-bin/**/composer.lock
+
+# Mac OS
+.DS_Store
+
+# Tests - auto-generated files
+/tests/acceptance/output
+/tests/output
diff --git a/.phan/config.php b/.phan/config.php
new file mode 100644
index 00000000000..6004d6e189f
--- /dev/null
+++ b/.phan/config.php
@@ -0,0 +1,109 @@
+
+ *
+ * @copyright Copyright (c) 2018, ownCloud GmbH
+ * @license GPL-2.0
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+return [
+
+ // Supported values: '7.0', '7.1', '7.2', null.
+ // If this is set to null,
+ // then Phan assumes the PHP version which is closest to the minor version
+ // of the php executable used to execute phan.
+ 'target_php_version' => null,
+
+ // A list of directories that should be parsed for class and
+ // method information. After excluding the directories
+ // defined in exclude_analysis_directory_list, the remaining
+ // files will be statically analyzed for errors.
+ //
+ // Thus, both first-party and third-party code being used by
+ // your application should be included in this list.
+ 'directory_list' => [
+ 'appinfo',
+ 'lib',
+ 'vendor',
+ '../../lib',
+ '../../core'
+ ],
+
+ // A directory list that defines files that will be excluded
+ // from static analysis, but whose class and method
+ // information should be included.
+ //
+ // Generally, you'll want to include the directories for
+ // third-party code (such as "vendor/") in this list.
+ //
+ // n.b.: If you'd like to parse but not analyze 3rd
+ // party code, directories containing that code
+ // should be added to both the `directory_list`
+ // and `exclude_analysis_directory_list` arrays.
+ 'exclude_analysis_directory_list' => [
+ 'vendor',
+ '../../lib',
+ '../../core'
+ ],
+
+ // A regular expression to match files to be excluded
+ // from parsing and analysis and will not be read at all.
+ //
+ // This is useful for excluding groups of test or example
+ // directories/files, unanalyzable files, or files that
+ // can't be removed for whatever reason.
+ // (e.g. '@Test\.php$@', or '@vendor/.*/(tests|Tests)/@')
+ 'exclude_file_regex' => '@.*/[^/]*(tests|Tests|templates)/@',
+
+ // If true, missing properties will be created when
+ // they are first seen. If false, we'll report an
+ // error message.
+ "allow_missing_properties" => false,
+
+ // If enabled, allow null to be cast as any array-like type.
+ // This is an incremental step in migrating away from null_casts_as_any_type.
+ // If null_casts_as_any_type is true, this has no effect.
+ "null_casts_as_any_type" => true,
+
+ // Backwards Compatibility Checking. This is slow
+ // and expensive, but you should consider running
+ // it before upgrading your version of PHP to a
+ // new version that has backward compatibility
+ // breaks.
+ 'backward_compatibility_checks' => false,
+
+ // The initial scan of the function's code block has no
+ // type information for `$arg`. It isn't until we see
+ // the call and rescan test()'s code block that we can
+ // detect that it is actually returning the passed in
+ // `string` instead of an `int` as declared.
+ 'quick_mode' => false,
+
+ // The minimum severity level to report on. This can be
+ // set to Issue::SEVERITY_LOW, Issue::SEVERITY_NORMAL or
+ // Issue::SEVERITY_CRITICAL. Setting it to only
+ // critical issues is a good place to start on a big
+ // sloppy mature code base.
+ 'minimum_severity' => 5,
+
+ // A set of fully qualified class-names for which
+ // a call to parent::__construct() is required
+ 'parent_constructor_required' => [
+ ],
+
+];
\ No newline at end of file
diff --git a/.php_cs.dist b/.php_cs.dist
new file mode 100644
index 00000000000..a3540ef1c55
--- /dev/null
+++ b/.php_cs.dist
@@ -0,0 +1,10 @@
+setUsingCache(true)
+ ->getFinder()
+ ->exclude('vendor')
+ ->exclude('vendor-bin')
+ ->exclude('l10n')
+ ->in(__DIR__);
+ return $config;
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index cd2a44e559e..00000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-language: php
-php:
- - 5.6
- - 7
-
-env:
- global:
- - CORE_BRANCH=master
- - APP_NAME=firstrunwizard
- matrix:
- - DB=sqlite
-
-branches:
- only:
- - master
- - /^stable\d+(\.\d+)?$/
-
-
-before_install:
- - wget https://raw.githubusercontent.com/owncloud/administration/master/travis-ci/before_install.sh
- - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
-
- # Add some output debugging information
- - cd ../core
- - ./occ app:enable firstrunwizard
-
-before_script:
- - cd apps/$APP_NAME/
-
-script:
- - cd tests
- - phpunit --configuration phpunit.xml
-
-matrix:
- fast_finish: true
diff --git a/Makefile b/Makefile
new file mode 100644
index 00000000000..d3976b389f4
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,154 @@
+# Makefile for building the project
+
+SHELL := /bin/bash
+
+COMPOSER_BIN := $(shell command -v composer 2> /dev/null)
+ifndef COMPOSER_BIN
+ $(error composer is not available on your system, please install composer)
+endif
+
+app_name=firstrunwizard
+project_directory=$(CURDIR)/../$(app_name)
+build_tools_directory=$(CURDIR)/build/tools
+source_build_directory=$(CURDIR)/build/artifacts/source
+source_package_name=$(source_build_directory)/$(app_name)
+appstore_build_directory=$(CURDIR)/build/artifacts/appstore
+appstore_package_name=$(appstore_build_directory)/$(app_name)
+
+# signing
+occ=$(CURDIR)/../../occ
+private_key=$(HOME)/.owncloud/certificates/$(app_name).key
+certificate=$(HOME)/.owncloud/certificates/$(app_name).crt
+sign=php -f $(occ) integrity:sign-app --privateKey="$(private_key)" --certificate="$(certificate)"
+sign_skip_msg="Skipping signing, either no key and certificate found in $(private_key) and $(certificate) or occ can not be found at $(occ)"
+
+ifneq (,$(wildcard $(private_key)))
+ifneq (,$(wildcard $(certificate)))
+ifneq (,$(wildcard $(occ)))
+ CAN_SIGN=true
+endif
+endif
+endif
+
+# bin file definitions
+PHPUNIT=php -d zend.enable_gc=0 "$(PWD)/../../lib/composer/bin/phpunit"
+PHPUNITDBG=phpdbg -qrr -d memory_limit=4096M -d zend.enable_gc=0 "$(PWD)/../../lib/composer/bin/phpunit"
+PHP_CS_FIXER=php -d zend.enable_gc=0 vendor-bin/owncloud-codestyle/vendor/bin/php-cs-fixer
+PHAN=php -d zend.enable_gc=0 vendor-bin/phan/vendor/bin/phan
+PHPSTAN=php -d zend.enable_gc=0 vendor-bin/phpstan/vendor/bin/phpstan
+
+all: appstore
+
+.PHONY: clean
+clean:
+ rm -rf ./build/artifacts
+
+# Builds the source and appstore package
+.PHONY: dist
+dist: source appstore
+
+# Builds the source package
+.PHONY: source
+source:
+ rm -rf $(source_build_directory)
+ mkdir -p $(source_build_directory)
+ tar cvzf $(source_package_name).tar.gz ../$(app_name) \
+ --exclude-vcs \
+ --exclude="../$(app_name)/build" \
+ --exclude="../$(app_name)/*.log"
+
+# Builds the source package for the app store, ignores php and js tests
+.PHONY: appstore
+appstore:
+ rm -rf $(appstore_build_directory)
+ mkdir -p $(appstore_package_name)
+ cp --parents -r \
+ ajax \
+ appinfo \
+ css \
+ img \
+ js \
+ l10n \
+ lib \
+ templates \
+ COPYING \
+ CHANGELOG.md \
+ wizard.php \
+ $(appstore_package_name)
+
+ifdef CAN_SIGN
+ $(sign) --path="$(appstore_package_name)"
+else
+ @echo $(sign_skip_msg)
+endif
+ tar -czf $(appstore_package_name).tar.gz -C $(appstore_package_name)/../ $(app_name)
+
+##---------------------
+## Tests
+##---------------------
+
+.PHONY: test-php-unit
+test-php-unit: ## Run php unit tests
+test-php-unit:
+ $(PHPUNIT) --configuration ./phpunit.xml --testsuite unit
+
+.PHONY: test-php-unit-dbg
+test-php-unit-dbg: ## Run php unit tests using phpdbg
+test-php-unit-dbg:
+ $(PHPUNITDBG) --configuration ./phpunit.xml --testsuite unit
+
+.PHONY: test-php-style
+test-php-style: ## Run php-cs-fixer and check owncloud code-style
+test-php-style: vendor-bin/owncloud-codestyle/vendor
+ $(PHP_CS_FIXER) fix -v --diff --diff-format udiff --allow-risky yes --dry-run
+
+.PHONY: test-php-style-fix
+test-php-style-fix: ## Run php-cs-fixer and fix code style issues
+test-php-style-fix: vendor-bin/owncloud-codestyle/vendor
+ $(PHP_CS_FIXER) fix -v --diff --diff-format udiff --allow-risky yes
+
+.PHONY: test-php-phan
+test-php-phan: ## Run phan
+test-php-phan: vendor-bin/phan/vendor
+ $(PHAN) --config-file .phan/config.php --require-config-exists
+
+.PHONY: test-php-phpstan
+test-php-phpstan: ## Run phpstan
+test-php-phpstan: vendor-bin/phpstan/vendor
+ $(PHPSTAN) analyse --memory-limit=4G --configuration=./phpstan.neon --no-progress --level=5 appinfo lib
+
+.PHONY: test-acceptance-webui
+test-acceptance-webui: ## Run webUI acceptance tests
+test-acceptance-webui:
+ ../../tests/acceptance/run.sh --remote --type webUI
+
+#
+# Dependency management
+#--------------------------------------
+
+composer.lock: composer.json
+ @echo composer.lock is not up to date.
+
+vendor: composer.lock
+ composer install --no-dev
+
+vendor/bamarni/composer-bin-plugin: composer.lock
+ composer install
+
+vendor-bin/owncloud-codestyle/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/owncloud-codestyle/composer.lock
+ composer bin owncloud-codestyle install --no-progress
+
+vendor-bin/owncloud-codestyle/composer.lock: vendor-bin/owncloud-codestyle/composer.json
+ @echo owncloud-codestyle composer.lock is not up to date.
+
+vendor-bin/phan/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/phan/composer.lock
+ composer bin phan install --no-progress
+
+vendor-bin/phan/composer.lock: vendor-bin/phan/composer.json
+ @echo phan composer.lock is not up to date.
+
+vendor-bin/phpstan/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/phpstan/composer.lock
+ composer bin phpstan install --no-progress
+
+vendor-bin/phpstan/composer.lock: vendor-bin/phpstan/composer.json
+ @echo phpstan composer.lock is not up to date.
diff --git a/README.md b/README.md
index cbfd337e64a..8cb9efb6975 100644
--- a/README.md
+++ b/README.md
@@ -3,4 +3,4 @@ firstrunwizard
A first run wizard that explains the usage of ownCloud to new users
-[](https://travis-ci.org/owncloud/firstrunwizard)
+[](https://drone.owncloud.com/owncloud/firstrunwizard) [](https://codecov.io/gh/owncloud/firstrunwizard)
diff --git a/appinfo/app.php b/appinfo/app.php
index 8f25372a10b..bb579fa4c39 100755
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -4,20 +4,20 @@
*
* @author Frank Karlitschek
* @copyright 2012 Frank Karlitschek karlitschek@kde.org
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
- * License as published by the Free Software Foundation; either
+ * License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
- *
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
- *
+ *
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see
-t('There’s more information in the documentation and on our website.', array(link_to_docs('user_manual')))); ?>
+t('There’s more information in the documentation and on our website.', [link_to_docs('user_manual')])); ?>
t('If you like ownCloud,
spread the word!')); ?>
-© getEntity()); ?>
+© getEntity()); ?>