1 | <?php |
||
2 | /** |
||
3 | * @link https://www.yiiframework.com/ |
||
4 | * @copyright Copyright (c) 2008 Yii Software LLC |
||
5 | * @license https://www.yiiframework.com/license/ |
||
6 | * |
||
7 | * @var YiiRequirementChecker $this |
||
8 | * |
||
9 | * These are the Yii core requirements for the [[YiiRequirementChecker]] instance. |
||
10 | * These requirements are mandatory for any Yii application. |
||
11 | */ |
||
12 | return array( |
||
13 | array( |
||
14 | 'name' => 'PHP version', |
||
15 | 'mandatory' => true, |
||
16 | 'condition' => version_compare(PHP_VERSION, '7.3.0', '>='), |
||
17 | 'by' => '<a href="https://www.yiiframework.com">Yii Framework</a>', |
||
18 | 'memo' => 'PHP 7.3.0 or higher is required.', |
||
19 | ), |
||
20 | array( |
||
21 | 'name' => 'Reflection extension', |
||
22 | 'mandatory' => true, |
||
23 | 'condition' => class_exists('Reflection', false), |
||
24 | 'by' => '<a href="https://www.yiiframework.com">Yii Framework</a>', |
||
25 | ), |
||
26 | array( |
||
27 | 'name' => 'PCRE extension', |
||
28 | 'mandatory' => true, |
||
29 | 'condition' => extension_loaded('pcre'), |
||
30 | 'by' => '<a href="https://www.yiiframework.com">Yii Framework</a>', |
||
31 | ), |
||
32 | array( |
||
33 | 'name' => 'SPL extension', |
||
34 | 'mandatory' => true, |
||
35 | 'condition' => extension_loaded('SPL'), |
||
36 | 'by' => '<a href="https://www.yiiframework.com">Yii Framework</a>', |
||
37 | ), |
||
38 | array( |
||
39 | 'name' => 'Ctype extension', |
||
40 | 'mandatory' => true, |
||
41 | 'condition' => extension_loaded('ctype'), |
||
42 | 'by' => '<a href="https://www.yiiframework.com">Yii Framework</a>' |
||
43 | ), |
||
44 | array( |
||
45 | 'name' => 'MBString extension', |
||
46 | 'mandatory' => true, |
||
47 | 'condition' => extension_loaded('mbstring'), |
||
48 | 'by' => '<a href="https://www.php.net/manual/en/book.mbstring.php">Multibyte string</a> processing', |
||
49 | 'memo' => 'Required for multibyte encoding string processing.' |
||
50 | ), |
||
51 | array( |
||
52 | 'name' => 'OpenSSL extension', |
||
53 | 'mandatory' => false, |
||
54 | 'condition' => extension_loaded('openssl'), |
||
55 | 'by' => '<a href="https://www.yiiframework.com/doc-2.0/yii-base-security.html">Security Component</a>', |
||
56 | 'memo' => 'Required by encrypt and decrypt methods.' |
||
57 | ), |
||
58 | array( |
||
59 | 'name' => 'Intl extension', |
||
60 | 'mandatory' => false, |
||
61 | 'condition' => $this->checkPhpExtensionVersion('intl', '1.0.2', '>='), |
||
62 | 'by' => '<a href="https://www.php.net/manual/en/book.intl.php">Internationalization</a> support', |
||
63 | 'memo' => 'PHP Intl extension 1.0.2 or higher is required when you want to use advanced parameters formatting |
||
64 | in <code>Yii::t()</code>, non-latin languages with <code>Inflector::slug()</code>, |
||
65 | <abbr title="Internationalized domain names">IDN</abbr>-feature of |
||
66 | <code>EmailValidator</code> or <code>UrlValidator</code> or the <code>yii\i18n\Formatter</code> class.' |
||
67 | ), |
||
68 | array( |
||
69 | 'name' => 'ICU version', |
||
70 | 'mandatory' => false, |
||
71 | 'condition' => defined('INTL_ICU_VERSION') && version_compare(INTL_ICU_VERSION, '49', '>='), |
||
72 | 'by' => '<a href="https://www.php.net/manual/en/book.intl.php">Internationalization</a> support', |
||
73 | 'memo' => 'ICU 49.0 or higher is required when you want to use <code>#</code> placeholder in plural rules |
||
74 | (for example, plural in |
||
75 | <a href=\"https://www.yiiframework.com/doc-2.0/yii-i18n-formatter.html#asRelativeTime%28%29-detail\"> |
||
76 | Formatter::asRelativeTime()</a>) in the <code>yii\i18n\Formatter</code> class. Your current ICU version is ' . |
||
77 | (defined('INTL_ICU_VERSION') ? INTL_ICU_VERSION : '(ICU is missing)') . '.' |
||
78 | ), |
||
79 | array( |
||
80 | 'name' => 'ICU Data version', |
||
81 | 'mandatory' => false, |
||
82 | 'condition' => defined('INTL_ICU_DATA_VERSION') && version_compare(INTL_ICU_DATA_VERSION, '49.1', '>='), |
||
83 | 'by' => '<a href="https://www.php.net/manual/en/book.intl.php">Internationalization</a> support', |
||
84 | 'memo' => 'ICU Data 49.1 or higher is required when you want to use <code>#</code> placeholder in plural rules |
||
85 | (for example, plural in |
||
86 | <a href=\"https://www.yiiframework.com/doc-2.0/yii-i18n-formatter.html#asRelativeTime%28%29-detail\"> |
||
87 | Formatter::asRelativeTime()</a>) in the <code>yii\i18n\Formatter</code> class. Your current ICU Data version is ' . |
||
88 | (defined('INTL_ICU_DATA_VERSION') ? INTL_ICU_DATA_VERSION : '(ICU Data is missing)') . '.' |
||
89 | ), |
||
90 | array( |
||
91 | 'name' => 'Fileinfo extension', |
||
92 | 'mandatory' => false, |
||
93 | 'condition' => extension_loaded('fileinfo'), |
||
94 | 'by' => '<a href="https://www.php.net/manual/en/book.fileinfo.php">File Information</a>', |
||
95 | 'memo' => 'Required for files upload to detect correct file mime-types.' |
||
96 | ), |
||
97 | array( |
||
98 | 'name' => 'DOM extension', |
||
99 | 'mandatory' => false, |
||
100 | 'condition' => extension_loaded('dom'), |
||
101 | 'by' => '<a href="https://www.php.net/manual/en/book.dom.php">Document Object Model</a>', |
||
102 | 'memo' => 'Required for REST API to send XML responses via <code>yii\web\XmlResponseFormatter</code>.' |
||
103 | ), |
||
104 | array( |
||
105 | 'name' => 'IPv6 support', |
||
106 | 'mandatory' => false, |
||
107 | 'condition' => strlen(@inet_pton('2001:db8::1')) === 16, |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
108 | 'by' => 'IPv6 expansion in <a href="https://www.yiiframework.com/doc-2.0/yii-validators-ipvalidator.html">IpValidator</a>', |
||
109 | 'memo' => 'When <a href="https://www.yiiframework.com/doc-2.0/yii-validators-ipvalidator.html#$expandIPv6-detail">IpValidator::expandIPv6</a> |
||
110 | property is set to <code>true</code>, PHP must support IPv6 protocol stack. Currently PHP constant <code>AF_INET6</code> is not defined |
||
111 | and IPv6 is probably unsupported.' |
||
112 | ), |
||
113 | array( |
||
114 | 'name' => 'pcntl', |
||
115 | 'mandatory' => false, |
||
116 | 'condition' => extension_loaded('pcntl'), |
||
117 | 'by' => '<a href="https://www.php.net/manual/de/book.pcntl.php">Process Control</a>', |
||
118 | 'memo' => 'Recommended for yii2-queue CLI operations' |
||
119 | ) |
||
120 | ); |
||
121 |