[英]How to ignore a specific phar file under a PhpStorm project?
I have a composer.phar
under my Symfony project.我的 Symfony 项目下有一个
composer.phar
。 I shall not delete this file.我不会删除这个文件。
PhpStorm analyzes this file to index its contained functions and classes. PhpStorm 分析此文件以索引其包含的函数和类。 This file is indexed and I see some troubles like "Multiple declaration".
这个文件被索引了,我看到了一些像“多重声明”这样的麻烦。
I know how to ignore a directory , but I'm searching how to ignore a specific phar
file to avoid indexing.我知道如何忽略目录,但我正在搜索如何忽略特定的
phar
文件以避免索引。
For phar extension file:对于 phar 扩展文件:
Such file is shown as plain text in the editor, and is marked with a special icon Plain text file in the Project Tool Window.此类文件在编辑器中显示为纯文本,并在项目工具窗口中标有特殊图标纯文本文件。
In the context of a PHP project, you can also exclude entire PHP archives (phar files) to prevent multiple declaration conflicts between classes in a phar archive and the corresponding classes in the installed vendors directory.在 PHP 项目的上下文中,您还可以排除整个PHP 存档(phar 文件),以防止phar 存档中的类与已安装的供应商目录中的相应类之间发生多次声明冲突。 Right-click on file and select " Exclude phar from project "
右键单击文件并选择“从项目中排除 phar ”
For any file extension:对于任何文件扩展名:
If you mark the file as plain
file then PhpStorm will ignore it.如果您将文件标记为
plain
文件,则 PhpStorm 将忽略它。
Select the file from the Project Tool Window从项目工具窗口中选择文件
Select Mark as plain text选择标记为纯文本
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.