Issue 1:
Q
A

Bug report?
yes

Feature request?
no

BC Break report?
no

RFC?
no

Symfony version
3.2.2

I am starting a new application and I decide to use Docker for development since it's faster and easy to use. I have build my own stack running Centos 7 with Supervisord, Apache/2.4.6, PHP 7.1.0 and MySQL 5.7.17. The stack is available here and it works as it should be. The instructions to get it up & running are in the README.

The problem I am having is coming from the Web Profiler and I am not able to find out why. As soon as I try to access: http://symfonyapp.local/app_dev.php the default page is shown but the next I get is a message saying:

An error occurred while loading the web debug toolbar (404: Not Found)

I have check the logs in the httpd container and this is what I get from there:

httpd_1 | 172.18.0.1 - - [17/Jan/2017:00:13:43 +0000] "GET /app_dev.php HTTP/1.1" 200 31820 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36"
httpd_1 | 2017-01-17 00:13:44,770 DEBG 'httpd' stdout output:
httpd_1 | [Tue Jan 17 00:13:44.770329 2017] [proxy_fcgi:error] [pid 15:tid 140001497048832] [client 172.18.0.1:54532] AH01071: Got error 'Unable to open primary script: redirect:/app.php/28df54 (No such file or directory)\n', referer: http://symfonyapp.local/app_dev.php

I have checked all this topics and tried all in there:

#12075

#10806 (@xabbuh asked for replication steps I tried to leave them here)

http://stackoverflow.com/questions/31367192/symfony-profiler-throws-404

http://stackoverflow.com/questions/16236623/symfony-2-an-error-occurred-while-loading-the-web-debug-toolbar-404-not-foun

http://stackoverflow.com/questions/21058750/symfony-2-4-an-error-occurred-while-loading-the-web-debug-toolbar-404-not-fou

http://stackoverflow.com/questions/16236623/symfony-2-an-error-occurred-while-loading-the-web-debug-toolbar-404-not-foun

http://stackoverflow.com/questions/41646272/ah01071-got-error-unable-to-open-primary-script-container-permissions-or-sy

http://stackoverflow.com/questions/21058750/symfony-2-4-an-error-occurred-while-loading-the-web-debug-toolbar-404-not-fou

http://stackoverflow.com/questions/12424864/symfony-2-404-not-found-error-when-tryes-to-open-app-dev-php

http://stackoverflow.com/questions/31342255/why-is-the-symfony2-profiler-throwing-404s-when-using-the-memcachedprofilerstora

http://stackoverflow.com/questions/29345720/404-errors-on-acces-to-wdt-token

http://stackoverflow.com/questions/32923216/404-on-wdt-symfony-webprofiler-doesnt-generate-any-profile-data

Can I get some advice on this? Is this a Symfony3 issue, a permission issue, anything else?

I have an active topic open in SO here as well and so far I couldn't fix the issue.

Issue 2:
Symfony version(s) affected: 3.4.24 / 4.2.5

Description

TransformationFailedException thrown when JSON is submitted through HiddenType field. I have one form that is passing a JSON which is a canvas map of a captured signature.

This commit creates the breaking change for us:

symfony/form@4f7d286#diff-9c65c1fe9e9fce8398f48544b0bbf2a5

Specifically this block of code:

} elseif (\is_array($submittedData) && !$this->config->getCompound() && !$this->config->hasOption('multiple')) {
$submittedData = null;
$this->transformationFailure = new TransformationFailedException('Submitted data was expected to be text or number, array given.');
}

This runs before a transformer can clean the data and a mapper does not seem to be a good fit for this.

How to reproduce

Submit JSON through a HiddenType form field

Possible Solution

Check for an additional form option scalar = false or something along those lines.

Example JSON:

[
{
"lx":132,
"ly":67,
"mx":132,
"my":66
},
{
"lx":118,
"ly":27,
"mx":118,
"my":26
},
{
"lx":144,
"ly":19,
"mx":144,
"my":18
}
]

This can get quite large depending on the size of the complexity of the signature. Transformers and mappers seem to run after this exception is thrown.

Thoughts?