@@ -39,11 +39,12 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
39
39
'^call_user_func_array$ ' => null ,
40
40
'^chdir$ ' => null ,
41
41
'^chgrp$ ' => null ,
42
- '^chmod$ ' => null ,
42
+ '^chmod$ ' => 'Magento\Framework\Filesystem\DriverInterface::changePermissions()
43
+ or Magento\Framework\Filesystem\DriverInterface::changePermissionsRecursively() ' ,
43
44
'^chown$ ' => null ,
44
45
'^chroot$ ' => null ,
45
46
'^com_load_typelib$ ' => null ,
46
- '^copy$ ' => null ,
47
+ '^copy$ ' => ' Magento\Framework\Filesystem\DriverInterface::copy() ' ,
47
48
'^curl_.*$ ' => null ,
48
49
'^cyrus_connect$ ' => null ,
49
50
'^dba_.*$ ' => null ,
@@ -53,17 +54,17 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
53
54
'^dcngettext$ ' => null ,
54
55
'^dgettext$ ' => null ,
55
56
'^dio_.*$ ' => null ,
56
- '^dirname$ ' => null ,
57
+ '^dirname$ ' => ' Magento\Framework\Filesystem\DriverInterface::getParentDirectory() ' ,
57
58
'^dngettext$ ' => null ,
58
59
'^domxml_.*$ ' => null ,
59
60
'^fbsql_.*$ ' => null ,
60
61
'^fdf_add_doc_javascript$ ' => null ,
61
62
'^fdf_open$ ' => null ,
62
- '^fopen$ ' => null ,
63
- '^fclose$ ' => null ,
63
+ '^fopen$ ' => ' Magento\Framework\Filesystem\DriverInterface::fileOpen() ' ,
64
+ '^fclose$ ' => ' Magento\Framework\Filesystem\DriverInterface::fileClose() ' ,
64
65
'^fsockopen$ ' => null ,
65
66
'^ftp_.*$ ' => null ,
66
- '^fwrite$ ' => null ,
67
+ '^fwrite$ ' => ' Magento\Framework\Filesystem\DriverInterface::fileWrite() ' ,
67
68
'^gettext$ ' => null ,
68
69
'^gz.*$ ' => null ,
69
70
'^header$ ' => null ,
@@ -79,7 +80,7 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
79
80
'^link$ ' => null ,
80
81
'^mail$ ' => null ,
81
82
'^mb_send_mail$ ' => null ,
82
- '^mkdir$ ' => null ,
83
+ '^mkdir$ ' => ' Magento\Framework\Filesystem\DriverInterface::createDirectory() ' ,
83
84
'^move_uploaded_file$ ' => null ,
84
85
'^msession_.*$ ' => null ,
85
86
'^msg_send$ ' => null ,
@@ -96,7 +97,7 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
96
97
'^parse_str$ ' => null ,
97
98
'^parse_url$ ' => null ,
98
99
'^parsekit_compile_string$ ' => null ,
99
- '^pathinfo$ ' => null ,
100
+ '^pathinfo$ ' => ' Magento\Framework\Filesystem\Io\File::getPathInfo() ' ,
100
101
'^pcntl_.*$ ' => null ,
101
102
'^posix_.*$ ' => null ,
102
103
'^pfpro_.*$ ' => null ,
@@ -106,14 +107,14 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
106
107
'^print_r$ ' => null ,
107
108
'^printf$ ' => null ,
108
109
'^putenv$ ' => null ,
109
- '^readfile$ ' => null ,
110
+ '^readfile$ ' => ' Magento\Framework\Filesystem\DriverInterface::fileRead() ' ,
110
111
'^readgzfile$ ' => null ,
111
- '^readline$ ' => null ,
112
+ '^readline$ ' => ' Magento\Framework\Filesystem\DriverInterface::fileReadLine() ' ,
112
113
'^readlink$ ' => null ,
113
114
'^register_shutdown_function$ ' => null ,
114
115
'^register_tick_function$ ' => null ,
115
- '^rename$ ' => null ,
116
- '^rmdir$ ' => null ,
116
+ '^rename$ ' => ' Magento\Framework\Filesystem\DriverInterface::raname() ' ,
117
+ '^rmdir$ ' => ' Magento\Framework\Filesystem\DriverInterface::deleteDirectory() ' ,
117
118
'^scandir$ ' => null ,
118
119
'^session_.*$ ' => null ,
119
120
'^set_include_path$ ' => null ,
@@ -126,9 +127,9 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
126
127
'^socket_.*$ ' => null ,
127
128
'^stream_.*$ ' => null ,
128
129
'^sybase_.*$ ' => null ,
129
- '^symlink$ ' => null ,
130
+ '^symlink$ ' => ' Magento\Framework\Filesystem\DriverInterface::symlink() ' ,
130
131
'^syslog$ ' => null ,
131
- '^touch$ ' => null ,
132
+ '^touch$ ' => ' Magento\Framework\Filesystem\DriverInterface::touch() ' ,
132
133
'^trigger_error$ ' => null ,
133
134
'^unlink$ ' => null ,
134
135
'^vprintf$ ' => null ,
@@ -149,7 +150,7 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
149
150
'^fdf_.*$ ' => null ,
150
151
'^fget.*$ ' => null ,
151
152
'^fread$ ' => null ,
152
- '^fflush$ ' => null ,
153
+ '^fflush$ ' => ' Magento\Framework\Filesystem\DriverInterface::fileFlush() ' ,
153
154
'^get_browser$ ' => null ,
154
155
'^get_headers$ ' => null ,
155
156
'^get_meta_tags$ ' => null ,
@@ -194,24 +195,24 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
194
195
'^gettype$ ' => null ,
195
196
'^var_dump$ ' => null ,
196
197
'^tempnam$ ' => null ,
197
- '^realpath$ ' => null ,
198
+ '^realpath$ ' => ' Magento\Framework\Filesystem\DriverInterface::getRealPath() ' ,
198
199
'^linkinfo$ ' => null ,
199
- '^lstat$ ' => null ,
200
+ '^lstat$ ' => ' Magento\Framework\Filesystem\DriverInterface::stat() ' ,
200
201
'^stat$ ' => null ,
201
202
'^lchgrp$ ' => null ,
202
203
'^lchown$ ' => null ,
203
204
'^show_source$ ' => null ,
204
- '^is_dir$ ' => null ,
205
+ '^is_dir$ ' => ' Magento\Framework\Filesystem\DriverInterface::isDirectory() ' ,
205
206
'^is_executable$ ' => null ,
206
- '^is_file$ ' => null ,
207
+ '^is_file$ ' => ' Magento\Framework\Filesystem\DriverInterface::isFile() ' ,
207
208
'^is_link$ ' => null ,
208
- '^is_readable$ ' => null ,
209
- '^is_writable$ ' => null ,
210
- '^is_writeable$ ' => null ,
209
+ '^is_readable$ ' => ' Magento\Framework\Filesystem\DriverInterface::isReadable() ' ,
210
+ '^is_writable$ ' => ' Magento\Framework\Filesystem\DriverInterface::isWritable() ' ,
211
+ '^is_writeable$ ' => ' Magento\Framework\Filesystem\DriverInterface::isWritable() ' ,
211
212
'^is_uploaded_file$ ' => null ,
212
- '^glob$ ' => null ,
213
+ '^glob$ ' => ' Magento\Framework\Filesystem\Glob::glob() ' ,
213
214
'^ssh2_.*$ ' => null ,
214
- '^delete$ ' => null ,
215
+ '^delete$ ' => ' Magento\Framework\Filesystem\DriverInterface::deleteFile() ' ,
215
216
'^file.*$ ' => null ,
216
217
'^chop$ ' => 'rtrim() ' ,
217
218
'^sizeof$ ' => 'count() ' ,
0 commit comments