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