Skip to content

Commit 8c6f9cb

Browse files
author
Felix Arntz
committed
Use 5.2-compatible autoloader in 5.2 dependencies directory.
1 parent c53652f commit 8c6f9cb

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

load-files.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function wpephpcompat_load_files() {
99
require_once dirname( __FILE__ ) . '/src/wpephpcompat.php';
1010

1111
if ( version_compare( phpversion(), '5.3', '<' ) ) {
12-
$autoload_file = dirname( __FILE__ ) . '/php52/vendor/autoload.php';
12+
$autoload_file = dirname( __FILE__ ) . '/php52/vendor/autoload_52.php';
1313
} else {
1414
$autoload_file = dirname( __FILE__ ) . '/vendor/autoload.php';
1515
}

php52/composer.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
{
22
"require": {
33
"squizlabs/php_codesniffer": "2.9.*",
4-
"wimg/php-compatibility": "7.1.5"
4+
"wimg/php-compatibility": "7.1.5",
5+
"xrstf/composer-php52": "1.*"
56
},
67
"scripts": {
7-
"post-update-cmd": "vendor/bin/phpcs --config-delete installed_paths; rm -rf vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility; cp -rp vendor/wimg/php-compatibility vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility",
8-
"post-install-cmd": "vendor/bin/phpcs --config-delete installed_paths; rm -rf vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility; cp -rp vendor/wimg/php-compatibility vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility"
8+
"post-update-cmd": [
9+
"xrstf\\Composer52\\Generator::onPostInstallCmd",
10+
"vendor/bin/phpcs --config-delete installed_paths; rm -rf vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility; cp -rp vendor/wimg/php-compatibility vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility"
11+
],
12+
"post-install-cmd": [
13+
"xrstf\\Composer52\\Generator::onPostInstallCmd",
14+
"vendor/bin/phpcs --config-delete installed_paths; rm -rf vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility; cp -rp vendor/wimg/php-compatibility vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility"
15+
],
16+
"post-autoload-dump": [
17+
"xrstf\\Composer52\\Generator::onPostInstallCmd"
18+
]
919
}
1020
}

0 commit comments

Comments
 (0)