小编Chr*_*est的帖子

Symfony Gedmo Blameable 不工作

有没有人找到解决这个问题的方法?我有同样的问题。

我的config.yml:

# Doctrine Configuration
doctrine:
    dbal:
        driver:   "%database_server%"
        host:     "%database_host%"
        port:     "%database_port%"
        dbname:   "%database_name%"
        user:     "%database_user%"
        password: "%database_password%"
        charset:  UTF8
        # if using pdo_sqlite as your database driver:
        #   1. add the path in parameters.yml
        #     e.g. database_path: "%kernel.root_dir%/data/data.db3"
        #   2. Uncomment database_path in parameters.yml.dist
        #   3. Uncomment next line:
        #     path:     "%database_path%"
    orm:
        auto_generate_proxy_classes: "%kernel.debug%"
        naming_strategy: doctrine.orm.naming_strategy.underscore
        auto_mapping: true
        #Gedmo Package extension for Symfony and Doctrine
        mappings:
            gedmo_tree:
                type: annotation
                prefix: Gedmo\Tree\Entity
                dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Tree/Entity"
                alias: GedmoTree
                is_bundle: false …
Run Code Online (Sandbox Code Playgroud)

php doctrine symfony php-5.6

5
推荐指数
1
解决办法
6982
查看次数

PHPUnit代码覆盖率不起作用,总是说不正确的白名单配置

Ich检查了网络上的几个来源,还有堆栈溢出,但到目前为止还无法解决.

继承我的配置:

<?xml version="1.0" encoding="UTF-8"?>

<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.0/phpunit.xsd"
     backupGlobals="false"
     colors="true"
     bootstrap="../../src/test.bootstrap.php"
     convertErrorsToExceptions="true"
     convertNoticesToExceptions="true"
     convertWarningsToExceptions="true"
     processIsolation="false"
     stopOnError="false"
     stopOnFailure="false"
     stopOnIncomplete="false"
     stopOnSkipped="false"
     stopOnRisky="false"
     verbose="true"
>
<!--printerFile="vendor/whatthejeff/emoji-phpunit-resultprinter/src/Emoji/PHPUnit/ResultPrinter.php"-->
<!--printerClass="Emoji\PHPUnit\ResultPrinter"-->
<php>
    <ini name="error_reporting" value="-1" />
    <server name="KERNEL_DIR" value="src/" />
    <env name="BOOTSTRAP_CLEAR_CACHE_ENV" value="testing"/>
</php>

<loggin>
    <log type="coverage-html" target="build/coverage"/>
    <log type="coverage-clover" target="build/logs/clover.xml"/>
    <log type="coverage-crap4j" target="build/logs/crap4j.xml"/>
    <log type="junit" target="build/logs/junit.xml" logIncompleteSkipped="false"/>
</loggin>

<testsuites>
    <testsuite name="Project Test Suite">
        <directory>src/*/*Bundle/Tests</directory>
        <directory>src/*/Bundle/*Bundle/Tests</directory>
    </testsuite>
</testsuites>

<filter>
    <whitelist>
        <directory>../src</directory>
        <exclude>
            <directory>src/*/*Bundle/Resources</directory>
            <directory>src/*/*Bundle/Tests</directory>
            <directory>src/*/Bundle/*Bundle/Resources</directory>
            <directory>src/*/Bundle/*Bundle/Tests</directory>
        </exclude>
    </whitelist>
</filter>
</phpunit>
Run Code Online (Sandbox Code Playgroud)

由于Build Server的限制,我需要使用以下命令调用phpunit:

./build/bin/phpunit.phar -c …
Run Code Online (Sandbox Code Playgroud)

phpunit code-coverage symfony

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

升级到Symfony3后,为什么我的用户登录不再有效

我遇到了一个与Symfony 3的奇怪问题.在Symfony 2下,每个人都可以使用Box(登录).但在Symfony 3下它根本不会验证.Doctrine Layer不加载我的用户对象和存储库.

这是怎么回事?

authentication dao symfony doctrine-orm

2
推荐指数
1
解决办法
895
查看次数

编译PHP7错误

我只是想从Scratch构建PHP7.

我使用了这个命令:

cd php-7.0.0

./configure --prefix=/usr/local/php/7.0.0 --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-gd --with-pgsql --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-pdo-mysql --with-mysqli --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-openssl --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-imap=shared,/usr --with-imap-ssl --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm  --sysconfdir=/etc/php7/ --with-xpm-dir=/usr --enable-intl --with-ldap --enable-mysqlnd --with-pear=/usr/local/php/7.0.0/pear --with-apxs2 --enable-dtrace --disable-phpdbg --enable-zend-signals

make clean

make
Run Code Online (Sandbox Code Playgroud)

但它打破了错误消息:

/bin/sh /usr/src/php7/php-7.0.0/libtool --silent --preserve-dup-deps --mode=compile cc  -Iext/imap/ -I/usr/src/php7/php-7.0.0/ext/imap/ -DPHP_ATOM_INC -I/usr/src/php7/php-7.0.0/include -I/usr/src/php7/php-7.0.0/main -I/usr/src/php7/php-7.0.0 -I/usr/src/php7/php-7.0.0/ext/date/lib -I/usr/include/libxml2 -I/usr/X11 …
Run Code Online (Sandbox Code Playgroud)

php compilation php-7

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