Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
Symfony version | 3.2.0+ |
Cache:clear as well as cache:warmup have a weird output (see screenshot).
In several projects the webpages (in prod or dev environment) show many unicode characters, followed by an error stating that the headers have already been send (see screenshot).
Every file is UTF8 without BOM, except for var/cache/prod/annotations.php, which is ANSI, and which sends the headers. The file is also not executed (throw Exception('test') in it doesn't do anything). web/app.php is executed (echo's in it are visible, above the unicode mess), and the controller action is also executed (echo's are displayed after the unicode mess).
These errors don't happen in 3.1.*, but do happen in 3.2.0 and beyond.
The way to quickly test it is this:
php composer create-project symfony/framework-standard-edition TestProject "3.2.0"
cd TestProject
SET SYMFONY_ENV=prod
php composer install --no-dev --optimize-autoloader
php bin/console cache:clear --env=prod --no-debug
If the cache:clear produces many random characters, as in the screenshot, then it has bugged.
The screenshots:
The webpage in 3.2.* in production (production, debian 8 server)
The error in sentry (production, debian 8 server)
Grep to see which php file starts with something else than <?php
(caused by ANSI encoding of annotaitons.php file)
(production, debian 8 server)
Content of var/cache/prod/annotations.php
(production, debian 8 server)