有没有办法在 PhpStorm 中按模式或名称排除/隐藏文件夹,而不是用完整路径一一排除它们?
我_notes在项目中有大约 200 个 Dreamweaver文件夹(每个文件夹下一个)。这些被我们使用的其他软件中的名称模式忽略/隐藏。我可以隐藏它们而不在 PhpStorm 中实际添加 200 个条目吗?
我尝试自动化我的项目,因为我需要完全:
- 从 SVN 更新文件
-仅将更改的文件上传到默认服务器
是否有任何方法可以通过 PhpStorm(设置..)做到这一点,
或者我是否需要外部工具?
谢谢你的答案
17:18 PHP Code Sniffer
No response from /home/my_user/.composer/vendor/squizlabs/php_codesniffer/bin/phpcs after 5000 ms
Disable inspection
Run Code Online (Sandbox Code Playgroud)
任何的想法?我已经尝试了很多解决方案,比如禁用xdebug,增加响应时间.
它在PhpStorm中不起作用,但在终端中工作.
我没有获得此代码的代码提示:
get_indexes我认为PHPDoc 已正确完成,NetBeans似乎理解它并正确显示提示:
/**
* Get Index
*
* @global object $wpdb
* @param String $extension_table_name
* @return \ZRDN\Recipe[]
*/
public static function get_indexes($extension_table_name) {
global $wpdb;
$db_name = $wpdb->prefix . $extension_table_name;
$selectStatement = "SELECT * FROM `{$db_name}`";
$recipe_indexes = $wpdb->get_results($selectStatement);
return $recipe_indexes;
}
Run Code Online (Sandbox Code Playgroud)
Recipe 在同一名称空间下的同一文件中定义:
class Recipe {
/**
* @var int
*/
public $recipe_id;
/**
* @var int
*/
public $post_id;
...
Run Code Online (Sandbox Code Playgroud)
任何想法可能是什么问题?
我希望PhpStorm默认情况下或使用热键或实时模板插入当前名称空间。
在我创建新的Php类(“ New | PHP Class”对话框)之后,有一个用于命名空间的字段。有没有办法自动填充它?看起来没什么大不了的,因为在我的情况下,名称空间只是从开始的目录路径(我使用composer)src。我的搜索工作根本没有给我任何帮助。看起来PhpStrom没有此功能。但是也许有一些插件或黑客?
正如标题所述:PhpStorm无法识别定制的Laravel外墙.
有没有办法解决这个问题?
通常情况下,使用cmd+shift+f将启动PhpStorm的"Find in Path..."功能,搜索文本默认为任何突出显示的文本IDE.对我来说,在替换为此代码之前,它默认为突出显示的时间为几分之一秒:
2223 2BC9 EA71 DED7 8AAE DB73 C773 21A0 E816 78AE
我不确定这段代码代表什么,但总是一样的.我必须删除并重新键入或粘贴我要搜索的内容才能继续搜索.下次打开"Find in Path"对话框时,会再次发生.
有没有人知道这可能意味着什么?
我有一个使用JobFactory和的单元测试ClientFactory。
<?php
namespace Tests\Unit;
use PHPUnit\Framework\TestCase;
class JobTest extends TestCase
{
/** @test */
function can_display_job_details()
{
$job = create('App\Job', [
'job-number' => 9999,
'site' => 'Homeville',
'client_id' => function(){
return create('App\Client', [
'name' => 'ACME'
])->id;
},
]);
$details = $job->job_details;
$this->assertEquals('EPS-9999-Homeville-RES', $details);
}
}
Run Code Online (Sandbox Code Playgroud)
运行测试时出现此错误
InvalidArgumentException : Unable to locate factory with name [default] [App\Job].
Run Code Online (Sandbox Code Playgroud)
我在功能测试中使用出厂的App \ Job(JobFactory),没有任何问题。我使用PhpStorm的内置PHPUnit测试功能。
我运行创建并通过一个小测试助手
<?php
function create($class, $attributes = [], $times = null)
{
return factory($class, $times)->create($attributes);
}
function …Run Code Online (Sandbox Code Playgroud) 我正在努力让PhpStorm和Xdebug在特定的Vagrant VM上正常播放。
如何为该VM连接PhpStorm和Xdebug时有效地跟踪并解决问题?
虽然我可以看到PhpStorm和Xdebug进行了一定程度的通信,但Xdebug的连接并没有启动PhpStorm的调试窗口,并且无法使用PhpStorm的调试功能。
有问题的工具组合为:
index.php第16行。我可以使这个Vagrant VM连接到Atom的php-debugXdebug集成。我还可以使PhpStorm连接到其他Vagrant实例的Xdebug!
来自相关服务器的Xdebug配置:
# xdebug.idekey = "PHPSTORM"
# xdebug.remote_connect_back = on
xdebug.remote_autostart = off
# xdebug.remote_connect_back = on
xdebug.remote_enable = on
xdebug.remote_handler=dbgp
xdebug.remote_host = 10.0.2.2 # IP of the host system
xdebug.remote_log="/tmp/xdebug.log"
xdebug.remote_mode=req
xdebug.remote_port=9000
Run Code Online (Sandbox Code Playgroud)
/tmp/xdebug.log使用此配置时,我在日志文件中看到输出。
/tmp/xdebug.log。/tmp/xdebug.log。/tmp/xdebug.log:[8264] Log opened at 2019-03-14 01:39:02
[8264] I: Connecting to …Run Code Online (Sandbox Code Playgroud)