diff --git a/includes/PHPVersionCheck.php b/includes/PHPVersionCheck.php index 333d04065c6..41e88c29d81 100644 --- a/includes/PHPVersionCheck.php +++ b/includes/PHPVersionCheck.php @@ -40,7 +40,9 @@ function wfEntryPointCheck( $entryPoint ) { wfPHPVersionError( $entryPoint, $mwVersion, $minimumVersionPHP, $phpVersion ); } + // @codingStandardsIgnoreStart MediaWiki.Usage.DirUsage.FunctionFound if ( !file_exists( dirname( __FILE__ ) . '/../vendor/autoload.php' ) ) { + // @codingStandardsIgnoreEnd wfMissingVendorError( $entryPoint, $mwVersion ); } } diff --git a/includes/PHPVersionError.php b/includes/PHPVersionError.php index 007ea8941ed..9fbcf8955b4 100644 --- a/includes/PHPVersionError.php +++ b/includes/PHPVersionError.php @@ -21,4 +21,6 @@ * @deprecated 1.25 * @file */ +// @codingStandardsIgnoreStart MediaWiki.Usage.DirUsage.FunctionFound require_once dirname( __FILE__ ) . '/PHPVersionCheck.php'; +// @codingStandardsIgnoreEnd diff --git a/index.php b/index.php index 67bd0c9aaea..24230923bcf 100644 --- a/index.php +++ b/index.php @@ -32,7 +32,9 @@ // Bail on old versions of PHP, or if composer has not been run yet to install // dependencies. Using dirname( __FILE__ ) here because __DIR__ is PHP5.3+. +// @codingStandardsIgnoreStart MediaWiki.Usage.DirUsage.FunctionFound require_once dirname( __FILE__ ) . '/includes/PHPVersionCheck.php'; +// @codingStandardsIgnoreEnd wfEntryPointCheck( 'index.php' ); require __DIR__ . '/includes/WebStart.php'; diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 8dad5dc1ff4..7825ce950dc 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -22,7 +22,9 @@ // Bail on old versions of PHP, or if composer has not been run yet to install // dependencies. Using dirname( __FILE__ ) here because __DIR__ is PHP5.3+. +// @codingStandardsIgnoreStart MediaWiki.Usage.DirUsage.FunctionFound require_once dirname( __FILE__ ) . '/../includes/PHPVersionCheck.php'; +// @codingStandardsIgnoreEnd wfEntryPointCheck( 'cli' ); /** diff --git a/maintenance/install.php b/maintenance/install.php index 212e42ab386..ae3074a4c8b 100644 --- a/maintenance/install.php +++ b/maintenance/install.php @@ -23,7 +23,9 @@ // Checking for old versions of PHP is done in Maintenance.php // We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+ +// @codingStandardsIgnoreStart MediaWiki.Usage.DirUsage.FunctionFound require_once dirname( __FILE__ ) . '/Maintenance.php'; +// @codingStandardsIgnoreEnd define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' ); define( 'MEDIAWIKI_INSTALL', true ); diff --git a/maintenance/populateFilearchiveSha1.php b/maintenance/populateFilearchiveSha1.php index 850a5a5a4ed..a3099f96154 100644 --- a/maintenance/populateFilearchiveSha1.php +++ b/maintenance/populateFilearchiveSha1.php @@ -21,7 +21,7 @@ * @ingroup Maintenance */ -require_once dirname( __FILE__ ) . '/Maintenance.php'; +require_once __DIR__ . '/Maintenance.php'; /** * Maintenance script to populate the fa_sha1 field. diff --git a/mw-config/index.php b/mw-config/index.php index be811dc980c..31b201c4d24 100644 --- a/mw-config/index.php +++ b/mw-config/index.php @@ -22,7 +22,9 @@ // Bail on old versions of PHP, or if composer has not been run yet to install // dependencies. Using dirname( __FILE__ ) here because __DIR__ is PHP5.3+. +// @codingStandardsIgnoreStart MediaWiki.Usage.DirUsage.FunctionFound require_once dirname( __FILE__ ) . '/../includes/PHPVersionCheck.php'; +// @codingStandardsIgnoreEnd wfEntryPointCheck( 'mw-config/index.php' ); define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' ); diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderFileModuleTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderFileModuleTest.php index 9d97b28270c..a6d1d05effa 100644 --- a/tests/phpunit/includes/resourceloader/ResourceLoaderFileModuleTest.php +++ b/tests/phpunit/includes/resourceloader/ResourceLoaderFileModuleTest.php @@ -21,7 +21,7 @@ class ResourceLoaderFileModuleTest extends ResourceLoaderTestCase { private static function getModules() { $base = array( - 'localBasePath' => realpath( dirname( __FILE__ ) ), + 'localBasePath' => realpath( __DIR__ ), ); return array(