-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Form profiler broken after 3.2.8 -> 3.3.0 upgrade #22973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Are you sure its not some PHP Opcache issue?
I tried to reproduce the issue on the If the problem still happens can you create a fork of |
It's disabled (as per profiler). Restarting apache (I'm using public function registerBundles ()
{
$bundles = [
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
new JMS\SerializerBundle\JMSSerializerBundle(),
new FOS\RestBundle\FOSRestBundle(),
new EightPoints\Bundle\GuzzleBundle\GuzzleBundle(),
new Oneup\FlysystemBundle\OneupFlysystemBundle(),
new AppBundle\AppBundle(),
new ApiBundle\ApiBundle(),
new ServerBundle\ServerBundle(),
];
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
}
return $bundles;
} |
@dmaicher Just tested another project and |
Also rebooted the machine |
Can you describe the steps one has to perform to reproduce your issue with the Symfony demo? |
That said I tested this on a new $5 droplet running Ubuntu (PHP 7.0.15) and it was working fine. The problem was observed on Windows (PHP 7.0.4). Both x64 and running Apache 2.4.18. So I guess the problem is either the OS or the patch version... EDIT: enabling/disabling OPcache and xdebug on either makes no difference |
Works for me on OSX. |
@chalasr What PHP version are you running? I'll update PHP later to see if it's a problem that was patched between 7.0.4 and 7.0.15 |
@Xymanek 7.1.5 |
I was able to reproduce the issue with PHP lower than 7.0.8 and did some investigation. The root cause is a bug with serialize/unserialize in PHP, which was fixed in 7.0.8 (https://bugs.php.net/bug.php?id=72229). Due to this bug the data collected by the The issue can be reproduced using this Melody script:
When running with PHP >= 7.0.8 the output is Status: Reviewed |
@xelaris Thanks for investigating, since I didn't even get to it yet. So what is the usual course of action in such cases? Add a note somewhere? I don't suppose it can be fixed to be used pre-7.0.8 php? |
Just to confirm: updated PHP to 7.0.14 and now it works |
Adding a Alternatively the data collector could check for itself when it is loading data with something like:
This would at least explain why it is broken as it would show up in the logs tab of the error. As the code is only run during development, and only once per submitted form, the performance impact would be negligible. |
What about forcing |
Fine, but I'd still combine it with the warning so people know why it's happening. |
Note that adding a conflict won't help as that would only make composer install already released versions and prevent new ones from being installed. |
We did bump the minimum version of PHP to a newer "patch" one in the patch when earlier PHP versions were "too" buggy. So, bumping to 7.0.8 for 3.4 is a no-brainer. I would even say that doing it for 3.3 is also a possibility (as 7.0.8 was released more than a year ago). |
@fabpot it would leave the same issue as @nicolas-grekas described - someone with 7.0.5 installed will then just remain stuck at 3.3.5 and wonder why it's not getting updates. When I suggested the By now the only realistic option is indeed wontfix, or the code level warning that I described. Don't think it would be too much effort to add a single warning message to the form profiler though. |
This PR was merged into the 3.3 branch. Discussion ---------- [Form] Add notice to upgrade to PHP v7.0.8+ | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #22973 | License | MIT | Doc PR | - So that PHP7 < 7.0.8 users get a notice about the issue. Commits ------- 0347e5a [Form] Add notice to upgrade to PHP v7.0.8+
This PR was merged into the 3.3 branch. Discussion ---------- Bump minimal PHP version to ^5.5.9|>=7.0.8 | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #22973 | License | MIT | Doc PR | - As spotted in the linked issue, because of https://bugs.php.net/72229. Commits ------- 2282a6f Bump minimal PHP version to ^5.5.9|>=7.0.8
Happens when you open the
Form
panel (and only form, all other panels are ok) in the profiler and it contains any forms (No forms were submitted for this request
doesn't trigger the exceptions). Clearing the cache doesn't fix it. Here is a the stack trace (very long). This didn't happen before the upgradeExample of forms:
The text was updated successfully, but these errors were encountered: