Commit 558a5904 authored by Plugins bot's avatar Plugins bot

PLUGIN-22985 local_codechecker: cibot precheck request

parent 9c350643

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

language: php
os: linux
dist: xenial
services:
- mysql
- postgresql
- docker
cache:
directories:
- $HOME/.composer/cache
- $HOME/.npm
- $HOME/.nvm
jobs:
include:
- php: 7.4
env: MOODLE_BRANCH=master DB=pgsql
- php: 7.4
env: MOODLE_BRANCH=master DB=mysqli
- php: 7.4
env: MOODLE_BRANCH=MOODLE_310_STABLE DB=pgsql
- php: 7.4
env: MOODLE_BRANCH=MOODLE_310_STABLE DB=mysqli
- php: 7.4
env: MOODLE_BRANCH=MOODLE_39_STABLE DB=mysqli
- php: 7.4
env: MOODLE_BRANCH=MOODLE_38_STABLE DB=pgsql
- php: 7.3
env: MOODLE_BRANCH=MOODLE_37_STABLE DB=mysqli
- php: 7.3
env: MOODLE_BRANCH=MOODLE_36_STABLE DB=pgsql
- php: 7.2
env: MOODLE_BRANCH=master DB=pgsql
- php: 7.2
env: MOODLE_BRANCH=master DB=mysqli
- php: 7.2
env: MOODLE_BRANCH=MOODLE_310_STABLE DB=pgsql
- php: 7.2
env: MOODLE_BRANCH=MOODLE_310_STABLE DB=mysqli
- php: 7.2
env: MOODLE_BRANCH=MOODLE_39_STABLE DB=mysqli
- php: 7.2
env: MOODLE_BRANCH=MOODLE_35_STABLE DB=mysqli
- php: 7.2
env: MOODLE_BRANCH=MOODLE_34_STABLE DB=pgsql
- php: 7.1
env: MOODLE_BRANCH=MOODLE_38_STABLE DB=pgsql
- php: 7.1
env: MOODLE_BRANCH=MOODLE_37_STABLE DB=mysqli
# Cannot test with Moodle 3.2 and 3.3 any more because the new composer 2
# does require all components to be named properly (case-sensitively) and
# those branches have phpunit/Dbunit, failing. See MDL-64725.
# Cannot test with PHP 7.0 any more because we are now using the :void return type.
# Note that, still, the plugin will work ok, it's just the phpunit tests which cannot
# be executed with that PHP versions.
before_install:
- phpenv config-rm xdebug.ini
- cd ../..
- composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^3
- export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH"
- export IGNORE_PATHS=moodle/tests/fixtures,moodle/Sniffs
install:
- moodle-plugin-ci install
script:
- moodle-plugin-ci phplint
- moodle-plugin-ci phpcpd
- moodle-plugin-ci phpmd
# - moodle-plugin-ci codechecker # Heh, cannot check codechecker 3 with codechecker 2!
- moodle-plugin-ci validate
- moodle-plugin-ci savepoints
- moodle-plugin-ci mustache
- moodle-plugin-ci grunt
- moodle-plugin-ci phpdoc
- moodle-plugin-ci phpunit
- moodle-plugin-ci behat
This diff is collapsed.
<?php
// phpcs:ignoreFile
/**
* PHPCompatibility, an external standard for PHP_CodeSniffer.
*
* PHPCS cross-version compatibility helper.
*
* @package local_codechecker
* @copyright 2012-2020 PHPCompatibility Contributors
* @license https://opensource.org/licenses/LGPL-3.0 LGPL3
* @link https://github.com/PHPCompatibility/PHPCompatibility
*
* @since 8.0.0
*/
/*
* Alias a number of PHPCS 3.x classes to their PHPCS 2.x equivalents.
*
* This file is auto-loaded by PHPCS 3.x before any sniffs are loaded
* through the PHPCS 3.x `<autoload>` ruleset directive.
*
* {internal The PHPCS file have been reorganized in PHPCS 3.x, quite
* a few "old" classes have been split and spread out over several "new"
* classes. In other words, this will only work for a limited number
* of classes.}
*
* {internal The `class_exists` wrappers are needed to play nice with other
* external PHPCS standards creating cross-version compatibility in the same
* manner.}
*/
if (defined('PHPCOMPATIBILITY_PHPCS_ALIASES_SET') === false) {
if (interface_exists('\PHP_CodeSniffer_Sniff') === false) {
class_alias('PHP_CodeSniffer\Sniffs\Sniff', '\PHP_CodeSniffer_Sniff');
}
if (class_exists('\PHP_CodeSniffer_File') === false) {
class_alias('PHP_CodeSniffer\Files\File', '\PHP_CodeSniffer_File');
}
if (class_exists('\PHP_CodeSniffer_Tokens') === false) {
class_alias('PHP_CodeSniffer\Util\Tokens', '\PHP_CodeSniffer_Tokens');
}
if (class_exists('\PHP_CodeSniffer_Exception') === false) {
class_alias('PHP_CodeSniffer\Exceptions\RuntimeException', '\PHP_CodeSniffer_Exception');
}
if (class_exists('\PHP_CodeSniffer_Standards_AbstractScopeSniff') === false) {
class_alias('PHP_CodeSniffer\Sniffs\AbstractScopeSniff', '\PHP_CodeSniffer_Standards_AbstractScopeSniff');
}
if (class_exists('\Generic_Sniffs_NamingConventions_CamelCapsFunctionNameSniff') === false) {
class_alias('PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions\CamelCapsFunctionNameSniff', '\Generic_Sniffs_NamingConventions_CamelCapsFunctionNameSniff');
}
define('PHPCOMPATIBILITY_PHPCS_ALIASES_SET', true);
/*
* Register an autoloader.
*
* {internal When `installed_paths` is set via the ruleset, this autoloader
* is needed to run the sniffs.
* Upstream issue: {@link https://github.com/squizlabs/PHP_CodeSniffer/issues/1591} }
*
* @since 8.0.0
*/
spl_autoload_register(function ($class) {
// Only try & load our own classes.
if (stripos($class, 'PHPCompatibility') !== 0) {
return;
}
$file = realpath(__DIR__) . DIRECTORY_SEPARATOR . strtr($class, '\\', DIRECTORY_SEPARATOR) . '.php';