Completed
Pull Request — experimental/3.1 (#2231)
by Kiyotaka
152:09 queued 99:26
created

autoload.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
// システム要件チェック
4
if (version_compare(PHP_VERSION, '5.3.9') < 0) {
5
    die('Your PHP installation is too old. EC-CUBE requires at least PHP 5.3.9. See the <a href="http://www.ec-cube.net/product/system.php">system requirements</a> page for more information.');
6
}
7
8
if (extension_loaded('wincache')) {
9
    if (!ini_get('opcache.enable')) {
10
        ini_set('wincache.ocenabled', 1);
11
    }
12
    ini_set('wincache.fcenabled', 1);
13
}
14
15
$autoload = __DIR__.'/vendor/autoload.php';
16
17
if (file_exists($autoload) && is_readable($autoload)) {
18
    $loader = require $autoload;
19
    \Doctrine\Common\Annotations\AnnotationRegistry::registerLoader([$loader, 'loadClass']);
20
} else {
21
    die('Composer is not installed.');
22
}
23
24
// autoloader cache
25
if (extension_loaded('apc') && ini_get('apc.enabled')) {
26
    $apcLoader = new Symfony\Component\ClassLoader\ApcClassLoader(sha1(__FILE__), $loader);
27
    $apcLoader->register();
28
    $loader->unregister();
29
} elseif (extension_loaded('wincache') && ini_get('wincache.fcenabled')) {
30
    $winCacheLoader = new Symfony\Component\ClassLoader\WinCacheClassLoader(sha1(__FILE__), $loader);
31
    $winCacheLoader->register();
32
    $loader->unregister();
33
}
34
35
//[INFO]index.php,install.phpをEC-CUBEルート直下に移動させる場合は、コメントアウトしている行に置き換える
36
define("RELATIVE_PUBLIC_DIR_PATH", '');
37
//define("RELATIVE_PUBLIC_DIR_PATH", '/html');
0 ignored issues
show
Unused Code Comprehensibility introduced by
75% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
38
39
return $loader;
40