小编Sru*_*ons的帖子

如何在Git Bash for Windows中设置别名?

如何在从git-scm.com下载的Git Bash for Windows中使用别名命令?

我的意思是Bash命令不是Git.

(Windows 7的)


编辑:

.bashrc文件中编写别名(由@gturri建议)不在控制台中添加它(在系统重启后)(我从未为ls命令编写别名,所以它应该是一些默认别名.)

.bashrc中.

git bash

90
推荐指数
7
解决办法
7万
查看次数

PHPUnit的.错误:没有可用的代码覆盖率驱动程序.(已安装xdebug)

对于类似问题Laravel 5有一个答案:PHPUnit并没有可用的代码覆盖驱动程序,但我安装了xdebug.

(如果我正在使用这个问题:windows7,netbeans8.1,php7,wamp3)

在Netbeans中显示代码覆盖率会导致:

错误:没有可用的代码覆盖率驱动程序

,输出如下:

"C:\ wamp\www\treningPHPUnitSymfony2.8\bin\phpunit.bat"" - colors"" - log-junit""C:\ Users\chiny\AppData\Local\Temp \nb-phpunit-log. xml""--coverage-clover""C:\ Users\chiny\AppData\Local\Temp \nb-phpunit-coverage.xml""C:\ Program Files\NetBeans 8.1\php\phpunit\NetBeansSuite.php"" - ""--run = C:\ wamp\www\treningPHPUnitSymfony2.8\src\TreningBundle\Tests\Controller\RabarbarControllerTest.php"由Sebastian Bergmann和贡献者提供的PHPUnit 5.3.4.

错误:没有可用的代码覆盖率驱动程序

.II 3/3(100%)

时间:1.13秒,内存:4.00MB

好的,但不完整,跳过或有风险的测试!测试:3,断言:1,不完整:2.完成.](网址)

xdebug conf(C:\ wamp\bin\apache\apache2.4.17\bin\php.ini):

[xdebug]
zend_extension ="C:/wamp/bin/php/php7.0.1/zend_ext/php_xdebug-2.4.0rc3-7.0-vc14.dll"

xdebug.remote_enable = off
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = Off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir ="C:/wamp/tmp"
xdebug.show_local_vars=0
Run Code Online (Sandbox Code Playgroud)

加载扩展 WAMP. 加载扩展

(我在同一个Windows分区中有netbeans和项目目录)

php phpunit wamp

30
推荐指数
3
解决办法
4万
查看次数

什么时候使用 Extension 类,什么时候在 Symfony 中使用 Compiler Passes?

在 Symfony 中使用编译器传递有什么意义?

我们什么时候应该使用扩展类,什么时候编译器通过 Symfony?

symfony

6
推荐指数
1
解决办法
1111
查看次数

没有能够加载配置的扩展

我正在尝试加载自定义配置但出现异常:

YamlFileLoader.php 中的 1/2 InvalidArgumentException

没有扩展能够加载“cwiczenia”的配置(在 ..\app/config\config.yml 中)。查找命名空间“cwiczenia”,找到“framework”、“security”、...

2/2 FileLoaderLoadException

没有扩展能够加载“cwiczenia”的配置......

..\src\CwiczeniaDependencyInjectionBundle\DependencyInjection\Configuration.php

namespace CwiczeniaDependencyInjectionBundle\DependencyInjection;

use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;

class Configuration implements ConfigurationInterface{

public function getConfigTreeBuilder()
{
    $treeBuilder = new TreeBuilder();
    $rootNode = $treeBuilder->root('cwiczenia');
    
    $rootNode
        ->children()
            ->scalarNode('teamName')->end()
        ->end();
            
    return $treeBuilder;
Run Code Online (Sandbox Code Playgroud)

..\src\CwiczeniaDependencyInjectionBundle\DependencyInjection\CwiczeniaExtension.php

namespace CwiczeniaDependencyInjectionBundle\DependencyInjection;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\Config\FileLocator;

class CwiczeniaExtension extends Extension
{
    protected function load(array $configs, ContainerBuilder $container) 
    {
        $configuration = $this->getConfiguration($configs, $container);
        $config = $this->processConfiguration($configuration, $configs);
        
        $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
        $loader->load('services.yml');
    }
    public function …
Run Code Online (Sandbox Code Playgroud)

symfony

6
推荐指数
1
解决办法
1万
查看次数

错误:“在phpunit.xml中设置KERNEL_DIR”,但在phpunit.xml.dist中将KERNEL_DIR设置为“ <服务器名称=“ KERNEL_DIR” value =“ ./”>”

在trynig到PHPUnit功能测试时,出现错误:

1) TreningBundle\Tests\Controller\DefaultControllerTest::testIndex
RuntimeException: Either set KERNEL_DIR in your phpunit.xml according to https://symfony.com/doc/current/book/testing.html#your-first-functional-test or override the WebTestCase::createKernel() method.
Run Code Online (Sandbox Code Playgroud)

http://symfony.com/doc/2.8/book/testing.html说:

如果您的内核位于非标准目录中,则需要修改phpunit.xml.dist

我有文件,phpunit.xml.dist并且AppKErnel.php在目录中不常见的Symfony(2.8)位置app\。无论如何,我在以下行中添加了app/phpunit.xml.dist

<php>
     <server name="KERNEL_DIR" value="./" />
</php>
Run Code Online (Sandbox Code Playgroud)

结果同样错误。

已安装的软件包:

doctrine/annotations                 v1.2.7
doctrine/cache                       v1.6.0
doctrine/collections                 v1.3.0
doctrine/common                      v2.6.1
doctrine/dbal                        v2.5.4
doctrine/doctrine-bundle             1.6.2
doctrine/doctrine-cache-bundle       1.3.0
doctrine/inflector                   v1.1.0
doctrine/instantiator                1.0.5
doctrine/lexer                       v1.0.1
doctrine/orm                         v2.5.4
incenteev/composer-parameter-handler v2.1.2
ircmaxell/password-compat            v1.0.4
jdorn/sql-formatter                  v1.2.17
monolog/monolog                      1.19.0
myclabs/deep-copy                    1.5.1
paragonie/random_compat              v2.0.2
phpdocumentor/reflection-docblock    2.0.4
phpspec/prophecy                     v1.6.0
phpunit/php-code-coverage            3.3.2
phpunit/php-file-iterator            1.4.1 …
Run Code Online (Sandbox Code Playgroud)

phpunit symfony

3
推荐指数
1
解决办法
2264
查看次数

标签 统计

symfony ×3

phpunit ×2

bash ×1

git ×1

php ×1

wamp ×1