@@ -39,11 +39,12 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
3939 '^call_user_func_array$ ' => null ,
4040 '^chdir$ ' => null ,
4141 '^chgrp$ ' => null ,
42- '^chmod$ ' => null ,
42+ '^chmod$ ' => 'Magento\Framework\Filesystem\DriverInterface::changePermissions()
43+ or Magento\Framework\Filesystem\DriverInterface::changePermissionsRecursively() ' ,
4344 '^chown$ ' => null ,
4445 '^chroot$ ' => null ,
4546 '^com_load_typelib$ ' => null ,
46- '^copy$ ' => null ,
47+ '^copy$ ' => ' Magento\Framework\Filesystem\DriverInterface::copy() ' ,
4748 '^curl_.*$ ' => null ,
4849 '^cyrus_connect$ ' => null ,
4950 '^dba_.*$ ' => null ,
@@ -53,17 +54,17 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
5354 '^dcngettext$ ' => null ,
5455 '^dgettext$ ' => null ,
5556 '^dio_.*$ ' => null ,
56- '^dirname$ ' => null ,
57+ '^dirname$ ' => ' Magento\Framework\Filesystem\DriverInterface::getParentDirectory() ' ,
5758 '^dngettext$ ' => null ,
5859 '^domxml_.*$ ' => null ,
5960 '^fbsql_.*$ ' => null ,
6061 '^fdf_add_doc_javascript$ ' => null ,
6162 '^fdf_open$ ' => null ,
62- '^fopen$ ' => null ,
63- '^fclose$ ' => null ,
63+ '^fopen$ ' => ' Magento\Framework\Filesystem\DriverInterface::fileOpen() ' ,
64+ '^fclose$ ' => ' Magento\Framework\Filesystem\DriverInterface::fileClose() ' ,
6465 '^fsockopen$ ' => null ,
6566 '^ftp_.*$ ' => null ,
66- '^fwrite$ ' => null ,
67+ '^fwrite$ ' => ' Magento\Framework\Filesystem\DriverInterface::fileWrite() ' ,
6768 '^gettext$ ' => null ,
6869 '^gz.*$ ' => null ,
6970 '^header$ ' => null ,
@@ -79,7 +80,7 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
7980 '^link$ ' => null ,
8081 '^mail$ ' => null ,
8182 '^mb_send_mail$ ' => null ,
82- '^mkdir$ ' => null ,
83+ '^mkdir$ ' => ' Magento\Framework\Filesystem\DriverInterface::createDirectory() ' ,
8384 '^move_uploaded_file$ ' => null ,
8485 '^msession_.*$ ' => null ,
8586 '^msg_send$ ' => null ,
@@ -96,7 +97,7 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
9697 '^parse_str$ ' => null ,
9798 '^parse_url$ ' => null ,
9899 '^parsekit_compile_string$ ' => null ,
99- '^pathinfo$ ' => null ,
100+ '^pathinfo$ ' => ' Magento\Framework\Filesystem\Io\File::getPathInfo() ' ,
100101 '^pcntl_.*$ ' => null ,
101102 '^posix_.*$ ' => null ,
102103 '^pfpro_.*$ ' => null ,
@@ -106,14 +107,14 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
106107 '^print_r$ ' => null ,
107108 '^printf$ ' => null ,
108109 '^putenv$ ' => null ,
109- '^readfile$ ' => null ,
110+ '^readfile$ ' => ' Magento\Framework\Filesystem\DriverInterface::fileRead() ' ,
110111 '^readgzfile$ ' => null ,
111- '^readline$ ' => null ,
112+ '^readline$ ' => ' Magento\Framework\Filesystem\DriverInterface::fileReadLine() ' ,
112113 '^readlink$ ' => null ,
113114 '^register_shutdown_function$ ' => null ,
114115 '^register_tick_function$ ' => null ,
115- '^rename$ ' => null ,
116- '^rmdir$ ' => null ,
116+ '^rename$ ' => ' Magento\Framework\Filesystem\DriverInterface::raname() ' ,
117+ '^rmdir$ ' => ' Magento\Framework\Filesystem\DriverInterface::deleteDirectory() ' ,
117118 '^scandir$ ' => null ,
118119 '^session_.*$ ' => null ,
119120 '^set_include_path$ ' => null ,
@@ -126,9 +127,9 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
126127 '^socket_.*$ ' => null ,
127128 '^stream_.*$ ' => null ,
128129 '^sybase_.*$ ' => null ,
129- '^symlink$ ' => null ,
130+ '^symlink$ ' => ' Magento\Framework\Filesystem\DriverInterface::symlink() ' ,
130131 '^syslog$ ' => null ,
131- '^touch$ ' => null ,
132+ '^touch$ ' => ' Magento\Framework\Filesystem\DriverInterface::touch() ' ,
132133 '^trigger_error$ ' => null ,
133134 '^unlink$ ' => null ,
134135 '^vprintf$ ' => null ,
@@ -149,7 +150,7 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
149150 '^fdf_.*$ ' => null ,
150151 '^fget.*$ ' => null ,
151152 '^fread$ ' => null ,
152- '^fflush$ ' => null ,
153+ '^fflush$ ' => ' Magento\Framework\Filesystem\DriverInterface::fileFlush() ' ,
153154 '^get_browser$ ' => null ,
154155 '^get_headers$ ' => null ,
155156 '^get_meta_tags$ ' => null ,
@@ -194,24 +195,24 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
194195 '^gettype$ ' => null ,
195196 '^var_dump$ ' => null ,
196197 '^tempnam$ ' => null ,
197- '^realpath$ ' => null ,
198+ '^realpath$ ' => ' Magento\Framework\Filesystem\DriverInterface::getRealPath() ' ,
198199 '^linkinfo$ ' => null ,
199- '^lstat$ ' => null ,
200+ '^lstat$ ' => ' Magento\Framework\Filesystem\DriverInterface::stat() ' ,
200201 '^stat$ ' => null ,
201202 '^lchgrp$ ' => null ,
202203 '^lchown$ ' => null ,
203204 '^show_source$ ' => null ,
204- '^is_dir$ ' => null ,
205+ '^is_dir$ ' => ' Magento\Framework\Filesystem\DriverInterface::isDirectory() ' ,
205206 '^is_executable$ ' => null ,
206- '^is_file$ ' => null ,
207+ '^is_file$ ' => ' Magento\Framework\Filesystem\DriverInterface::isFile() ' ,
207208 '^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() ' ,
211212 '^is_uploaded_file$ ' => null ,
212- '^glob$ ' => null ,
213+ '^glob$ ' => ' Magento\Framework\Filesystem\Glob::glob() ' ,
213214 '^ssh2_.*$ ' => null ,
214- '^delete$ ' => null ,
215+ '^delete$ ' => ' Magento\Framework\Filesystem\DriverInterface::deleteFile() ' ,
215216 '^file.*$ ' => null ,
216217 '^chop$ ' => 'rtrim() ' ,
217218 '^sizeof$ ' => 'count() ' ,
0 commit comments