Docker/Symfony/PhpUnit - 当 运行 容器中的 PhpUnit 时,控制台中不显示任何日志

Docker/Symfony/PhpUnit - No logs displaying in console when running PhpUnit in container

在我的 web 容器中的控制台上 运行ning bin/phpunit 时,我没有日志。

我的 web dockerfile:

FROM php:7.4-apache

RUN apt-get update && apt-get install -y \
        libfreetype6-dev \
        libjpeg62-turbo-dev \
        libpng-dev \
        libzip-dev \
        sudo \
        unzip \
        zip \
        git \
        nano \
    && docker-php-ext-configure gd --with-freetype --with-jpeg \
    && docker-php-ext-install -j$(nproc) gd \
    && docker-php-ext-install zip pdo pdo_mysql opcache \
    && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN pecl install xdebug && docker-php-ext-enable xdebug

COPY ./apache/chat-app.conf /etc/apache2/sites-available/000-default.conf
COPY ./php/php.ini /usr/local/etc/php/conf.d/app.ini

RUN curl --silent --show-error https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

RUN rm /etc/localtime
RUN ln -s /usr/share/zoneinfo/Europe/Paris /etc/localtime
RUN "date"

RUN sed -ri -e 's!/var/www/html!/var/www!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!/var/www!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf

RUN a2enmod rewrite
RUN a2enmod headers

当我运行 phpunit:

怎么了?

我尝试添加 xdebug,但它也不起作用。 我在 ubuntu 20.04 上使用 Tilix 控制台。

最后,我删除了 symfony/phpunit-bridge 包并改用 phpunit/phpunit

composer remove --dev symfony/phpunit-bridge
composer require --dev phpunit/phpunit

现在,日志显示在我的 web 容器中的控制台上。