Problem/Motivation
Symfony 3 is here, we decided to adopt it for Drupal 8 in #2395443: [policy, no patch] Follow symfony 2.7 or 3.0., this is the question.
Proposed resolution
While the current patch passes tests, Drush must be updated to use Symfony 3.2 as well - see this PR: https://github.com/drush-ops/drush/pull/2477
Updating to Symfony 3.2 means that Drush will need to update its PHP requirement from PHP 5.4 to PHP 5.5.9 to match Symfony's. This likely requires a new major release of drush, since people on older PHP installs should not update to that new version. There may also be further contributed module updates for Symfony 3 compatibility.
Due to this, we're planning to commit this patch to 8.4.x on May 2nd 2017 and monitor any additional breakage over time. The hope is that Drupal 8.4.0 will ship with an up-to-date release of Symfony 3, but Drupal 8.3.x will stay on Symfony 2.8.* to avoid disruption to contrib and sites.
Remaining tasks
Fix #2712633: Update symfony-cmf/routing to 1.4.0.
Fix #2712637: Update stack/builder for Symfony 3 compatibility.
Fix #2712643: Update behat/* to 1.7.1 and fabpot/goutte to 3.1.2.
Fix #2720869: Remove the use of deprecated CssSelector and use CssSelectorConverter instead.
Fix #2720891: Replace ContainerAware with ContainerAwareTrait
Fix #2721139: Replace deprecated files ParameterBag usage.
Fix #2721179: Replace deprecated Symfony ExecutionContextInterface.
Fix #2726645: Do not @deprecate EntityManager until all usages are removed (helps the Symfony 3 update).
Fix #2728815: Batch API uses request attributes instead of query in Symfony 3.
Fix #2730129: DrupalKernel must never persist service_container for Symfony 3 update.
Fix #2682373: Implement ContainerAwareEventDispatcher::getListenerPriority().
Fix #2776105: Update asm89/stack-cors for Symfony 3 compatibility and revert changes introduced by #1869548.
Fix #2823687: Use isMethodCacheable() instead of isMethodSafe() when checking for GET/HEAD.
Fix fails.
Review.
Commit.
User interface changes
None
API changes
Hopefully none
Data model changes
Not yet
| Comment | File | Size | Author |
|---|---|---|---|
| #355 | 2712647-355.patch | 91.15 KB | mpdonadio |
| #347 | interdiff-343-347.txt | 14.57 KB | mpdonadio |
| #347 | 2712647-347.patch | 91.14 KB | mpdonadio |
| #343 | 2712647-343.patch | 91.33 KB | slasher13 |
| #341 | 2712647-341.patch | 46.31 KB | webflo |
Comments
Comment #2
jibranThis is postponed on #2712633: Update symfony-cmf/routing to 1.4.0, #2712637: Update stack/builder for Symfony 3 compatibility and #2712643: Update behat/* to 1.7.1 and fabpot/goutte to 3.1.2.
Comment #4
jibranPostponing it now on child issues.
Comment #5
dawehnerThank you for creating this issue.
In theory we could directly update because we fixed all BC throws in 2.8, but I just doubt that :)
Comment #6
jibranMaybe we should jump ahead and start fixing the errors.
Comment #8
jibranComment #10
jibranComment #11
dawehnerThe question is basically: how long do we want people to adapt to it. To be clear, the usages of old API (<2.8) got removed from core, but contrib / custom code might still be out there.
When we add it to 8.2, we would choose 6 months ... maybe a year might be better, maybe not.
Comment #13
eric_a commentedIs there a reason the change record was left in draft or did we just forget to publish it?
Something else: if we update drupal/core composer.json we should also update drupal/core-* composer.json files whenever components depend on symfony. I've opened #2720739: [meta] drupal/core-* components and drupal/core requires/replace declarations are broken, which is about the missed
"2.7.*"to"~2.8"updates.Comment #14
dawehnerThat sounds much more likely.
Comment #15
klausiI think we should close this issue as "won't fix". Symfony 3 has many API breaks, see https://github.com/symfony/symfony/blob/master/UPGRADE-3.0.md
API break examples: the ContainerAware class was removed, which is used in core and might potentially be used by contrib modules. The _method setting on routes has been renamed to _methods, so this could potentially break many of our routing definitions (if we use the Symfony routing code part for this, I have not checked).
Drupal 8 will stay on Symfony 2.8 LTS forever, because that is the non API breaking promise of Drupal 8. Symfony 3+ is Drupal 9 material.
Comment #16
dawehnerWe decided before that given the LTS of Drupal is supported for much longer than the LTS of symfony, so there is no way around that: https://www.drupal.org/node/2403135
Comment #17
dawehnerWell, this throws deprecation notes, which is a fatal in any test we have. Its weird that ContainerAware doesn't throw anything.
Comment #18
klausiApologies, I missed #2395443: [policy, no patch] Follow symfony 2.7 or 3.0., this is the question where it was already decided that Drupal 8 will at some point adopt Symfony 3.
The looser is obviously Drupal 8 contrib and custom site modules because they will experience API breaks.
In Drupal 7 we tried to avoid API breaks at all costs, so this is a somewhat cultural change that we need to communicate more.
Comment #19
dawehnerWell yeah ideally symfony 2.8 would have thrown deprecation notices for everything, and then, as said before, we should wait at least for a year to update, if not more.
Comment #20
jibranWe need another follow up for
.
Created #2720869: Remove the use of deprecated CssSelector and use CssSelectorConverter instead.
Comment #21
catchWe should either put this into 8.2.x very soon so there's plenty of time to find and fix bc breaks in contrib/custom. Or wait until 8.3.x is open and do it then to give them even longer.
We essentially said that stuff deprecated in 2.8 was not part of the public Drupal API so people should not be using that or can fix their usages if they are.
Comment #22
jibranPerhaps create some BC library or module.
Comment #23
xanoWould code be able to be fully compatible with both versions of Symfony, even though that is likely a bad idea? If not, that means sites will be forced to go through the trouble of upgrading to 8.2 if they want to receive security updates for core or contrib.
I am concerned about what this does to Drupal's image and its adoption. This is another break of our Semantic Versioning, and even though this change was announced long ago, people still won't care that we did, as it breaks their products as soon as they run
composer update, even though their constraints were all correct.If we do go ahead with this, I suggest we do it right now, or right after 8.2 is released, so contrib has close to six months to test and upgrade.
Comment #24
jibranAdded #2720869-2: Remove the use of deprecated CssSelector and use CssSelectorConverter instead to the patch as well.
Comment #25
catch2.8/3.0 theoretically have 100% compatible APIs, 3.0 just removed things that were already deprecated in 2.8. We'll find out how true that is in practice.
We should probably commit a patch here or in a side issue that is just fixing core to work with 3.0 (i.e. without the update itself). If that works then contrib/custom ought to be able to do the same.
Comment #26
xano2.8 was also released late last year, so long after we were in code freeze.
Comment #27
dawehner#2720891: Replace ContainerAware with ContainerAwareTrait is another issue
Comment #28
dawehnerComment #30
jibranI think we need another child issue for container scope clean up.
Comment #31
xanoCan we test this without running tests multiple times using different
composer.lockfiles? If not, do we need to contact the DA to discuss support for this?Comment #32
klausi@Xano I think jibran's strategy is fine. We should have all the new things in 2.8 already, so we can update our usage before even updating to 3.0. Ideally this issue then only has a patch with the composer updates and nothing breaks. No additional DA support necessary.
Comment #33
jibranWe can't move
Note: The $scope parameter is deprecated since version 2.8 and will be removed in 3.0.to child because in 2.8\Symfony\Component\DependencyInjection\ContainerInterfacecontains scope methods:All these methods are removed in Symfony 3 so to remove these from core we have to bump Symfony.
Comment #34
jibranSome more work.
Comment #35
klausiWorking on #2721139: Replace deprecated files ParameterBag usage in the meantime.
Comment #37
dawehnerI'm happy that we got rid of any of our usages of scope though.
Comment #38
klausiAnd another one: #2721179: Replace deprecated Symfony ExecutionContextInterface
Comment #39
klausiRolling in those 2 issues to see how far we get now on the testbot.
Comment #41
klausiRemoved one more scope test in ContainerTest.
Comment #43
klausiAuto git merge with 8.2.x, no other changes.
Comment #45
klausiI should really execute the phpunit tests locally instead of waiting 110 minutes until the testbot aborts. Wow, our phpunit testbot runner is quite broken.
Comment #46
klausiwhile grepping for IntrospectableContainerInterface I found #2721315: ThemeTestSubscriber::onView() doesn't do what it claims.
Comment #47
klausiMore fixes for the moved ValidatorInterface and the removed IntrospectableContainerInterface.
Something is broken for me with the phpunit execution when running
Looks like includes/errors.inc is not included when it should have been, let's see what the testbot thinks.
Comment #48
dawehnerHow is that related with symfony 3.0, mhhhh
Comment #49
jibranWell I tried to run phpunit on trvias every since we started working ktbng. Now after JTB I ran all the phpunit tests on travis again here. @klausi this might help you.
Comment #51
klausiSome more progress.
* HTTP methods are now not part of the requirements of a route anymore in Symfony 3.
* Request::create() ingores _format query parameter.
Comment #52
klausiAnd I merged in 8.2.x. Feel free to take this over from here.
Comment #54
jibranDo we have to fix these as well?
Comment #55
klausiFiled #2726645: Do not @deprecate EntityManager until all usages are removed (helps the Symfony 3 update).
Comment #57
klausiCurrent status: update.php batching is broken. Somehow Drupal returns HTML when the batch JS expects JSON. This seems to be another instance of the problem that Request in Symfony 3 does not understand _format=json in URL query parameters. I have not figured out yet how and where this is different.
You can test this by adding an empty system_update_8015() function to system.install. Then go to /update.php and Try to run updates => kaboom.
Comment #58
klausiFiled #2728815: Batch API uses request attributes instead of query in Symfony 3
Comment #60
klausiMerged in changes from #2712633: Update symfony-cmf/routing to 1.4.0.
Comment #61
berdirSee also #2682373: Implement ContainerAwareEventDispatcher::getListenerPriority()
Comment #62
klausiFiled #2730129: DrupalKernel must never persist service_container for Symfony 3 update.
Comment #64
klausiThanks Berdir, another depending issue we need to solve.
Comment #65
jibranNice work. Some minor points.
We can use class constant here.
Comment #66
klausiYes, switched to ::class syntax and merged in changes from child issues.
Comment #68
klausiPerfect, now this is postponed on all the remaining child issues.
Removed #2729247: Replace remaining $request->get() usage to prepare core for Symfony 3 because it is not a hard requirement for the Symfony 3 update.
Comment #69
klausiMerging in changes from #2726645: Do not @deprecate EntityManager until all usages are removed (helps the Symfony 3 update) to see if tests still pass on Symfony 3.
Comment #72
cosmicdreams commentedLooks like this is was PP-3 because of #2712637: Update stack/builder for Symfony 3 compatibility #2682373: Implement ContainerAwareEventDispatcher::getListenerPriority() and #2726645: Do not @deprecate EntityManager until all usages are removed (helps the Symfony 3 update).
#2682373: Implement ContainerAwareEventDispatcher::getListenerPriority() and #2726645: Do not @deprecate EntityManager until all usages are removed (helps the Symfony 3 update) are now fixed. So I think this should be PP-1
Comment #73
klausicatch just committed the last one, so this is ready to be rerolled again.
Comment #75
manuel garcia commentedFixed conflicts on:
Comment #77
klausinope, that should not happen. stack/builder should stay on 1.0.4 which is Symfony 3 compatible.
same here, that should not be changed.
Comment #78
manuel garcia commentedRight, let me try that again...
Comment #79
dawehnerthat is no longer needed
If we are switching things anyway here we could use assertCount as well
Comment #80
manuel garcia commentedOK here's a proper reroll + that change to core/composer.json
Comment #81
manuel garcia commentedSettting it to needs work based on #79.2
Comment #82
klausihm, why is this still here? Can you run composer update on the symfony packages only again?
why are we changing that comment? I mean, it is useful to have the @param comments here, but we should also still mention that the method is a direct copy. Or is it not a direct copy anymore? Then we should also mention that and what we modified.
Agreed with dawehner, let's use assertCount() here if we change the lines anyway.
Comment #83
dawehnerOn the other hand there is not a real reason to change these as part of this issue if you are honest.
Comment #84
manuel garcia commentedOK my last attempt at a proper reroll here... I'll get out of your hair now :S
Comment #86
jibransymfony 3.1.0 was released last week.
Comment #87
jibranLet's add a change record for this as well.
Comment #88
klausiwhy are we changing that comment? I mean, it is useful to have the @param comments here, but we should also still mention that the method is a direct copy. "Direct copy of the private parent function." as additional comment I would say.
Otherwise looks good!
I checked http://symfony.com/doc/current/contributing/community/releases.html and it seems no Symfony 3.x version until 3.4 will be an LTS, so I think it is fine to upgrade until Symfony 3 gets into LTS mode. At least we are not experiencing additional breaking changes comparing 3.0 and 3.1, which is a good sign.
Comment #89
dawehnerSadly this is not strictly right. They throw E_USER_DEPRECATED, which we convert to test failures.
Comment #90
naveenvalechahere we go with change record https://www.drupal.org/node/2743809 but it needs polishing before publishing what exact changes has been done.
Comment #91
naveenvalechaAddressed #88.
Added another paragraph for the same.
Comment #92
dawehnershould we still explicit use "~3.1" instead? Feels a bit safer to be honest.
We could just use
{@inheritdoc}and call it a day, can't we?Comment #93
jibran+1 to #92
Comment #94
manuel garcia commentedAddressing #92
Besides what @dawehner mentioned, also bumped the versions for symfony/yaml and symfony/css-selector
Comment #95
klausiPatch looks good.
Now we need to list all the breaking changes from child issues that we had to fix in the change record.
Comment #96
bojanz commentedhttps://twitter.com/dunglas/status/740123859324653568 makes it sound like we should be updating prophecy as well?
Comment #97
naveenvalecha#96 +1
sounds like a followup would be good for it.
Comment #98
dawehner@bojanz
If we haven't run into it yet, we won't do now. Its a pure composer.json thing, see https://github.com/phpspec/prophecy/pull/273
Comment #99
cosmicdreams commentedI don't see how #94 address the concern of being more explicit with Symfony 3.1 support with the related libraries. Many libraries specifically reference Symfony "~3.0"
Comment #100
dawehnerWell that is not a problem in that sense. Its SEMV, so it will use 3.1.
Comment #101
eric_a commentedComment #102
klausiCompleted the list of API breaks we experienced at https://www.drupal.org/node/2743809 , please review!
I think we can ignore the drupal component composer.json files in this issue and leave that to the related issue. Same for the prophecy update, should also be a separate issue.
Comment #103
dawehnerI think its fine as it is. Note: The amount of changes is so small, because we updated to 2.8 before, which throws those exception warnings before, especially see https://www.drupal.org/node/2611816#comment-10578742 so the problems would have caught people before.
Comment #104
jibranI linked the new change notice with old one which is unfortunately still in a draft state.
Comment #105
alexpottAfter discussing with @catch we where wondering if there is a chance that the patch can be done without the library updates. This way we can prove that contrib can be compatible with 2.8 and 3.1 at the same time. This is important because otherwise modules are going to have to start adding requirements checks on core and also DrupalCI tests modules against 8.2.x so they'll need to fix that sooner.
Comment #106
catchI'm particularly interested in the ExecutionContextInterface changes, but also YAML seems not impossible to run into. If we can do those without the update, then it verifies those are 2.8 deprecations and not fresh breaks.
Comment #107
klausiNope, not possible for ExecutionContext, see my comment in #2721179-2: Replace deprecated Symfony ExecutionContextInterface.
Comment #108
catchSo a way they could have done that, would be to leave the old interface in the old place @deprecated, and add the new one - then code could be written for both. However it feels relatively unlikely that 8.x contrib/custom code is using this, or at least the best way to find out is probably to commit this and see what breaks. If we end up with contrib modules that can't have working 8.1.x and 8.2.x versions, we could potentially fork 2.8 in 8.1.x to add back the old interface or something.
Comment #109
dawehnerThey have done that for quite a while since symfony 2.5 or so. The step onto symfony 3 was simply to remove the old deprecated class/interfaces.
Comment #110
catch2.8 doesn't have the new interface though?
Comment #111
alexpott@catch it does have the new interfaces but it's not so useful (unfortunately)... you get errors like...
And this is because the new interface does not extend the old one and so ConstraintValidatorInterface::initialize() can't be satisfied :(
So yeah this patch problem does contain the minimum amount of change. The container changes are tricky too because they remove a param from ContainerInterface::set() so it's not possible just make the changes to our container.
So given this the question no becomes how do we manage this change for the affect contrib modules?
Comment #112
klausiContrib modules that are affected by one of this breaking changes have 2 choices:
1) Make their code compatible with 8.2.x and tell users they must update to 8.2.x (otherwise their sites break on a stable 8.1.x)
2) Start a new branch with a new major version, for example Rules 8.x-3.x compatible with core 8.1.x and Rules 8.x-4.x compatible with core 8.2.x.
We should probably put that in the change notice?
Comment #113
jibranWe should really start semantic versioning for contrib as well. As a module developer, I'm not convinced of releasing a new major version of module due to new Drupal core minor release. Unfortunately, this leave us with and I'd rather do latter then former as module developer.
Comment #114
klausiLooked into the YAML parse() change, but we cannot do that beforehand since there is no replacement in Symfony 2.8. It got simply replaced in 3.0, so it has to be done with this issue.
Managing contrib modules: I think we cannot do anything except documenting the API breaks - the good thing is that probably only a small portion of contrib modules will be affected. I would say we should rather commit this sooner than later so that contrib has time to catch up with the API breaks until 8.2.0 is released and make the decision if they raise their minimum core requirement or start a new major branch.
Let's give this a couple of days for any input we might be missing and then put it back to RTBC.
Comment #115
catchNo I agree with #114. If there had been a change which would affect a lot of contrib modules, then I'd want to strongly consider hacking forward-compatibility into 8.1.x somehow (like subclassing something in both branches and encouraging people to use that instead, or forking 2.8). However there's only theoretical breakage of a small number of modules here, and we won't find out without committing it. I think we'll get more feedback if this is RTBC so moving it there, but I won't commit for a couple of days (if someone else wants to before I get to it that's up to them).
Comment #116
catchSpoke to @alexpott about this and he was concerned about the validator change.
I think I have a workaround which would allow for 8.1.x and 8.2.x compatible modules.
This interface change means if you're using it, you definitely can't have a module that works in both 8.1.x and 8.2.x. I doubt we can do anything upstream, but we can provide a bridge in core.
Would suggest a new issue to do the following:
- Add a new, empty, ExecutionContextnterface to core.
- In 8.1.x it extends the old Symfony interface
- In 8.2.x it extends the new Symfony interface.
- Update all these use statements to use the new interface in core.
Then the actual 3.1.0 patch shouldn't need to change anything in any of these modules, and we've proved it's viable for contrib.
If you're calling methods that have changed then you're out of luck, but core isn't and we can only do so much.
Not pretty but meh. Requires modules to update, but not to branch.
Here's the issue, postponing this one again #2746337: Provide bridge between 2.8 and 3.0 ExecutionContextInterface.
Comment #117
jibran3.1.1 is out now.
Comment #118
klausiReroll to check if this still passes. Updated to Symfony components 3.1.2.
In #2746337: Provide bridge between 2.8 and 3.0 ExecutionContextInterface we had the idea of class aliases, but they cannot be developed in a separate issue and have to be done in this issue as part of the update.
Comment #119
klausiI just tested the class_alias() patch from #2746337: Provide bridge between 2.8 and 3.0 ExecutionContextInterface on top of this Symfony 3 patch by executing the validation unit tests with
../vendor/bin/phpunit tests/Drupal/Tests/Core/Validation/.So it seems to me that the class_alias() call registers the name ExecutionContextInterface globally and then PHP fatals as soon as it encounters a use statement using ExecutionContextInterface. Maybe I'm doing something wrong?
Comment #120
jibrant - 19 days till 8.2.0-beta1 will be released.
Comment #121
klausiSince we have not found any way around the minor interface API breaks I think we have to move on with the current patch.
@jibran: can you review the patch and set this back RTBC if you approve?
Comment #122
jibranAfter #103 the only change in #118 is version bump so it is still RTBC.
Comment #124
klausiAh, the good old migrate module random test fails. Do we have an issue for those, since they appear on every 20th testrun or so?
Resetting to RTBC, assuming testbot will pass now.
Comment #126
klausiHm, maybe the migrate test fails are not so random after all?
Let's fix all the bugs in migrate, starting with #2767503: MigrateAggregatorStubTest typo in test namespace.
Comment #127
klausiMigrateUpgrade7Test was always failing for me locally (with Symfony 2 and 3), I finally figured out why: #2767595: Support "-" in database table names. *facepalm*
Comment #128
klausiI can't reproduce the MigrateUpgrade7Test fail locally and can't see on the testbot what assertions went wrong because of the fatal error.
Let's try again with more robust migrate tests that should at least not fatal.
Comment #130
jibranLess then a week to go till we hit the beta.
Comment #132
slasher13New conflicts from https://www.drupal.org/node/1869548.
Apply patch from https://www.drupal.org/node/2776105
interdiff to #118
Check if this still passes. Postpone on https://www.drupal.org/node/2776105
Comment #133
slasher13update symfony/* to 3.1.3
http://symfony.com/blog/symfony-3-1-3-released
Is #128 still needed?
Comment #136
slasher13Add OPTIONS and TRACE to the list of safe methods. Added to v2.8.9, too.
https://github.com/symfony/symfony/pull/19321
Down to 3 failures.
Comment #138
slasher13Need help with the last failures!
Comment #140
neclimdulYou shouldn't do this. Format handling is broken as is evident by the other failing tests and this is part of that.
Comment #141
neclimdulhttps://github.com/symfony/symfony/issues/8966
https://github.com/symfony/symfony/commit/7115c1e1d913dfccbe14d5eb8f515d... is where this is broke. Symfony explicitly removed the functionality we use for format handling :(
Comment #142
neclimdulNM, I forgot we didn't trust that code and wrote NegotiationMiddleware to handle setting the format. Someone might have even known this was coming I don't remember. The test was just lazy so here's a fix and documented why both cases set the format directly. This should fix the tests.
As a review, there are quite a few unrelated code reorganizations in tests that make the patch look a bit bigger that it is but things seem in order.
Comment #144
klausiGreat! I ran composer update symfony/* locally and get the same composer.lock outcome.
The rest of the updates look good as well, thanks for the comments about the request format middleware!
I did minor updates to the change record at https://www.drupal.org/node/2743809 and I think we are ready to get this into 8.3.x. Not sure about 8.2.x, but since we are in beta already we probably do not want this disruptive change there?
Comment #145
dawehnerJust went through the patch and the changes looked sane. The changes in
core/lib/Drupal/Component/DependencyInjectionalso look complete. The file did not had unused methods or so.Comment #146
eric_a commentedI'd love to see this get in now, but let's also make sure we have a plan to fix the version conflicts with our sub-packages fast enough: we should fix our drupal/core-* embedded-but-destined-to-be-split-off components composer.json files here if workable, or create a quickly to be resolved follow-up issue. See #2744357-17: drupal/core-* components Symfony requirements conflict with drupal/core for reasoning why we didn't just change everything to
~2.8. With the same reasoning applied here we should not just change everything to~3.1. Most of these symfony requirements must change to something like>= 2.7. (Now at~2.7or~2.8.) Changed components that now actually require~3.1must of course declare~3.1.And perhaps we need an issue to have a test for our sub-packages that detects symfony version conflicts with drupal/core.
Comment #147
TJacksonVA commentedAny chance of getting a waiver and getting this into the next beta of 8.2.x? It would be a shame to wait until 8.3.x in order to get this kind of significant change in. For developers working on modules and new websites, they would be better served to have Symfony 3.x as soon as possible, rather than wait until 8.3.x when will be upgrading to Symfony 3.2 or 3.3 (which will be an even bigger jump at that time, as opposed to going from Symfony 3.1.x to 3.2.x or 3.3.x).
Comment #148
dawehnerI believe people overestimate the amount of changes from symfony 2.8 to symfony 3, especially given that symfony 2.8 has most of of the APIs already.
Given that I'm not convinced that rushing it into 8.2.x would be necessarily a good idea. Feel free to disagree with me :)
Comment #150
klausiI think that was a random testbot fail, queued another test run.
Comment #151
alexpottI've not seen the random fail before.
Comment #152
catchRe #148 I mostly agree with this, except the core patch shows that there are certain changes where it's not possible (or at least not easy) to have code that's compatible with both Symfony 2.x and 3.x. Really comes down to ExecutionContextInterface which we've already discussed.
Question for me is whether this is going to apply to contrib modules - since DrupalCi tests contrib against 8.3.x, committing only to 8.3.x now could mean test failures on DrupalCI which when the module is updated, will break against 8.2.x. Given that, applying to both branches now, or applying to 8.3.x and 8.4.x when 8.3.x goes to beta would mean a shorter window of incompatibility.
This is the change that concerns me.
Then we already discussed whether we could/should add back Symfony\Component\Validator\ExecutionContextInterface extends Symfony\Component\Validator\Context\ExecutionContextInterface to allow code to run on both versions (since we don't care about the method changes).
Comment #154
slasher13update to symfony 3.1.4
Comment #156
slasher13Comment #158
catchI'm going to re-open #2721179: Replace deprecated Symfony ExecutionContextInterface and postpone this issue on that - at least we should open an upstream Symfony issue to discuss the problem with them.
Comment #159
slasher13Comment #162
catchThanks for updating the patch, back to postponed.
Comment #163
catchAnd back to review.
Comment #165
klausiSimple reroll just ignoring all hunks that don't apply anymore after #2721179: Replace deprecated Symfony ExecutionContextInterface.
Comment #167
klausiHm, I don't understand the test fails in ConfigImportAllTest, but at least I have the same test fails locally, so not a testbot issue.
Comment #168
klausiThe backtrace leading to the error looks very weird, AccountProxy should not load user entities when we just want the ID. See #2753733: AccountProxy can do unnecessary user loads to get an ID.
Comment #169
catchThe second fail looks like a regression of #2776235: Cached autoloader misses cause failures when missed class becomes available.
Comment #171
catchPossibly a bit crufty, but here's a re-roll.
Comment #173
klausiLooks like the composer.lock is messed up on PHP 5.5:
Comment #174
catchInteresting. I did this with PHP7, just running a PHP7 test to see how that goes...
Comment #175
klausiLooks like your composer update was a bit too aggressive?
New patch with
composer update symfony/*Comment #176
klausiArgl, why is password-compat still in there? composer--
Comment #179
alexpottI guess the fail is due to \Drupal\content_translation\ContentTranslationUpdatesManager::getSubscribedEvents() - this was supposed to be fixed by #2776235: Cached autoloader misses cause failures when missed class becomes available - I wonder how and why this change is breaking that...
Comment #180
klausi@alexpott: ContentTranslationUpdatesManager has a class_exists() check and the fatal error is triggered from PluginEventSubscriber in migrate module itself. So not sure how that should be related?
Did a bit of debugging in ConfigImportAllTest. It installs all modules, then exports the configuration, then uninstalls as many modules as possible, then imports the configuration again which should re-enable the modules.
When modifying the test I could trace it down to 2 modules being uninstalled before the configuration sync:
Some combination of language module and migrate module is at play here. language module has ConfigSubscriber which does a container rebuild onConfigSave, could that be related? Uninstalling language module also means that content translation, config translation and interface translation is uninstalled.
Whatever I tried manually in the admin backend, I could not reproduce the fatal error. It only happens in this test case. Any hints what we could try next would be appreciated.
Comment #181
klausiForgot to attach my debugging hacks.
Comment #182
catch#176 PHP7 test has same number of fails, but the fail is in YAML parsing not the autoloader. I also can't reproduce the autoloader fail with PHP7 locally.
So looks like a PHP 5.5/5.6 issues with the autoloader, and then we have a separate YAML parsing PHP 7 failure.
Comment #183
catchSee how this does on PHP7 - fixing the YAML deprecation.
Comment #184
catchComment #187
alexpottDamn negative caches especially in persistent caches like APCu. I'm not sure how we've not hit this before but anyhow. APCu will cache the class_exists miss across requests. Which means we need to add the list of modules to the prefix. This isn't happening on PHP7 because I think we've not got APCu on in that environment.
Comment #189
alexpottThe alternative is to implement our our versions of these that don't negatively cache but I think the solution of using the module list is probably best.
Comment #190
jibran+1 for using the module list. It is green and all the symfony components are updated so RTBC.
Comment #191
alexpottThe biggest question about #187 is if moving the classloader swapping out to later is acceptable - I think it is because I'm not sure that anything can come in-between \Drupal\Core\DrupalKernel::initializeSettings() and \Drupal\Core\DrupalKernel::initializeContainer() so whilst there might be a few classes that are no longer loaded using the APCu (or equivalent) autoloader this number can not grow.
Comment #192
dawehnerit is a bit confusing that those entries from the composer.lock file just disappear
Comment #193
klausi@dawehner: those entries disappear because the libraries disappear because Symfony 3 does not need them anymore.
Great that alexpott found a classloader solution! We have a test fail in Drupal\datetime\Tests\Views\FilterDateTimeTest, which I could not reproduce locally. Queuing all the environments for testing again.
Comment #195
dawehnerAh gotcha, I guess Drupal doesn't use them?
Comment #196
tstoecklerInteresting stuff with the classloader. One question (might be a dumb question, I don't understand all this 100%): Could this also be a problem if modules are updated and provide new classes or remove old ones?
Comment #197
klausiStill test fails in ConfigImportAllTest, we need to figure those out next.
Comment #198
alexpott@klausi I've run it 20 times locally - no fails... weird.
Comment #199
catchI've opened #2825358: Event class constants for event names can cause fatal errors when a module is installed to discuss whether we really need those event classes at all.
password-compat, polyfill-php54 and polyfill-php55 are only for PHP < 5.5 support so it's correct that we don't need any of those.
Sent DrupalCI for a retest to see if those are random.
https://www.drupal.org/pift-ci-job/524064 is the fail.
Comment #200
catchNeeded a re-roll, haven't managed to reproduce the random fail yet.
Comment #202
slasher13re-roll
Comment #204
slasher13Comment #205
slasher13Comment #206
klausiThanks a lot! The next step is to figure out the random test fails in ConfigImportAllTest.
Comment #207
alexpottLet's see what the diff is.
Comment #209
klausiThe diff says "format_plural_string: !!binary MSBwbGFjZQNAY291bnQgcGxhY2Vz". Looks like the YAML parser/serializer changed in some way and is now spitting out "!!binary" for whatever reason?
Comment #210
catchSee what this does.
Comment #211
klausiAh, right, our $yaml->dump() call is wrong. We should get the exception as before so this should be
Comment #212
catchOh you're right sorry, not sure why I thought that was the default, but it's absolutely not.
Comment #214
alexpottI've no idea why this is being treated as binary - it might be because it has a back-slash escaped control character. What also might be making this difficult to reproduce is that testbots are using PECL yaml for reading... which complicates things.
Comment #215
andypostProbably related #2792877: Symfony YAML parser fails on some strings when running PHP 7
Comment #216
slasher13It's the new binary data detection. First implemented https://github.com/symfony/symfony/pull/17863 changed in https://github.com/symfony/symfony/pull/18294. Some background informations: https://github.com/symfony/symfony/issues/18241
Comment #217
catchThanks for the links to the PRs - I found the initial one adding binary support but not the automatic binary detection yet.
So this is the relevant diff:
Don't have good ideas yet why Symfony would detect that string as binary, nor why it only happens when the data is loaded from postgres. The auto-detection for binary removed the manual flag, so we can't switch it off - either need to fix the upstream bug if there is one or somehow force this to string.
Comment #218
alexpottWell the automatic binary thing must be coming from the use of the \x03 escape sequence as a plural separator... the value is
"1 place\x03@count places".Comment #219
hampercm commentedComment #220
catchRe-exported that view. Still doesn't explain for me why it only fails on postgres, but we can see if it passes on everything else at least.
Comment #222
alexpottI think maybe the problem is that the pecl yaml reader is not able to deal with
!!binary- since that'd explain the PHP7 passes above - no PECL yaml afaik.Comment #223
catchThis ought to do it, YAML PECL can decode binary, but doesn't by default.
Comment #224
catchAssuming that passes, I think this is the right fix - Symfony's changed how their encoding works, but it's still compatible with PECL YAML with that change, plus we need to re-export the one file in core that's encoded differently.
The test failures in #220 are explicitly testing whether Symfony YAML and PECL YAML are compatible, which complements ConfigImportAll test encoding and unencoding.
Only question then for me is if we want to add some default test configuration with that format plural label rather than relying on views.view.file.yaml although that could potentially be done in a spin-off issue too.
Comment #226
catchdecode, not encode.
Comment #227
klausishould be "... is still the same as before ..."
this can be removed now.
what about this hunk, is this still needed now?
oh, looks like you posted a patch mix up. Can you reroll the patch with just the changes for this issue?
Comment #228
catchNot sure where the cruft crept in (edit, looks like #204 which explains why I didn't recognise it...). This ought to remove it though. Also fixes other points.
Comment #229
klausi$request_format can be FALSE, so we need to check that here before setting it. Same for the other similar changes in this file.
this change conflicts with #2823687: Use isMethodCacheable() instead of isMethodSafe() when checking for GET/HEAD. Should we postpone on that issue? We could also try to use Request::isMethodCacheable() instead in CommandLineOrUnsafeMethod.php.
Comment #231
klausiLooks like you lost the hunk in Drupal\Tests\rest\Unit\CollectRoutesTest, can you add that back?
Comment #232
catchJust restoring the lost hunk for now, haven't dealt with the other point yet.
Comment #233
catchI think we could just let whichever patch land first and update the other? Symfony 3.2 should land in the next couple of weeks, bug fix support for 3.1 ends Jan 2017, postponing this issue seems unfortunate. I'm starting to think we should've just updated to Symfony 3.0 despite Symfony 3.1 coming out and opened a new issue for 3.1.
Addressed first part of #229.
Comment #234
klausiThanks!
As next step I propose that we use Request::isMethodCacheable() in CommandLineOrUnsafeMethod.php.
Github tells me that Request::isMethodCacheable() exists since 3.1.6, so we need to set the constraint for Symfony HttpFoundation to ">=3.1.6 <4" in composer.json. https://github.com/symfony/symfony/commit/c43de7f21a587649bb42ca08bce9ad8d0c0e731d
Ideally we would also rename CommandLineOrUnsafeMethod to CommandLineOrUncacheableMethod, but that can be a follow-up I think.
Comment #235
slasher13- use Request::isMethodCacheable()
- change constraint in composer.json
- update symfony
Comment #237
slasher13Comment #238
klausiExcellent, I get the same composer changes as in the patch when I run
This looks ready now. I also updated the version numbers in the change record draft.
I will queue all environments on the testbot to make sure all the test failures are gone now.
Comment #239
alexpottThis change is quite sad. We're moving from something readable and editable to something that is not. This makes any config change here unreviewable.
Comment #240
dawehnerI'm wondering whether we could try to use any other list of characters are separator here. We could still convert that to
\x03on runtime.Comment #241
catchI've opened #2829919: Either avoid or explicitly test binary encoding in default configuration for format_plural.
Comment #242
alexpottDoes this change have a wider impact on the system? There are plenty of places where we use
isMethodSafe()to determine cacheability.Comment #243
slasher13Symfony has reverted the BC break:
https://github.com/symfony/symfony/pull/20602
Next step: Waiting for the next Symfony release. Maybe Symfony 3.2 will be released, too.
So this has no wider impact, but I think we should rename isMethodSafe to the more meaningful isMethodCacheable in a follow-up.
Comment #244
catchSo we already have #2823687: Use isMethodCacheable() instead of isMethodSafe() when checking for GET/HEAD open. I think we have two choices:
1. Do the isMethodCacheable() change here, that issue then either moves back to 8.2.x or duplicate given the upstream Symfony revert
2. Postpone this issue on a new tagged Symfony release. Again given 3.2 is coming out very soon, I'm keen to get this in so we can start dealing with one release at a time instead of both the major + minor jumps.
So here's a patch that changes all of our usages. There's one or two which might be borderline, but we can revisit those in a follow-up - I think we should just keep our own logic unchanged here.
Comment #245
klausiLooks good!
I think we should not postpone this yet again. We need Symfony 3 in sooner than later to have enough time to test and get everything ready for 8.3.0.
I'm also annoyed by the YAML !!binary conversion, but we can also deal with that later in #2829919: Either avoid or explicitly test binary encoding in default configuration.
Comment #246
catch@alexpott left a comment on the Symfony PR that introduced the change, but initial response doesn't look encouraging for making the behaviour optional, so I agree we should suffer with it for now and address it in #2829919: Either avoid or explicitly test binary encoding in default configuration.
Comment #247
pounardMy 2 cents: beware with Symfony 3.2, there's a few changes that might cause you trouble, I had problems because of divergence between 3.1 and 3.2 in the DIC generated code, this probably won't affect Drupal, but it might exists other internal changes on pieces of code on which Drupal 8 attempts to plug.
Comment #248
wim leersIndeed. To be fair, most of them are in the render system, which AFAIK cannot ever be used to respond to
TRACEorOPTIONSrequests. So sticking withisMethodSafe()should be … safe (heh).Of course, better to be correct & safe than sorry, so we should update all cache-related usages. Which this patch does. Except it does a few too many:
No, these are NOT about cacheability, but about safe (read vs write).
(3 occurrences here to revert.)
Hence this change should also be reverted.
Comment #249
wim leersThe class name no longer matches what it does.
Heh, expectations first, yes, great — thanks!
(Seems out of scope, but is fine.)
At first, I was skeptical about this change. But having read #141 + #142 + the related Symfony links, this makes sense.
Comment #250
wim leersFinally, I'd like to beg core committers to commit #2737719: EntityResource: Provide comprehensive test coverage: for every entity type, every format, every method before this patch. This patch has a high risk of introducing subtle bugs in our REST API.
Comment #251
slasher13fixes #248 and #249.1
Comment #252
slasher13wrong interdiff
Comment #253
catch@Wim see my note in #248
i.e. if we only convert some usages, then while the Symfony API change is in (which it is with the version in this patch), then our logic changes as a by-product. It might get the bug fix, and be actually correct for a while. However when they revert the API change, it'll go back to be just using GET/HEAD anyway, except that we'll be using a deprecated code path (because they're deprecating the usage of isMethodSafe() with no arguments).
So with the version of Symfony we're upgrading to here there is no good way to use isMethodSafe() - and we're going to have to revisit the places that actually want to use it in a follow-up anyway.
Also disagree with renaming CommandLineOrUnsafeMethod here - that's at least an @internal API change, and it's not us who's changed the semantics of unsafemethod it's Symfony - we made no claim to be RFC compatible and nor did they until they made the change.
Comment #254
klausiCompletely agree with catch. Filed the 2 follow ups:
#2830454: Revisit Request::isMethodSafe() usage vs. Request:isMethodCachable()
#2830451: Rename class CommandLineOrUnsafeMethod to CommandLineOrUncacheableMethod
Reuploadind the patch from #244, that's the one we want to commit right now.
Comment #255
catchRe-uploading the patch from #244 since it's that one that klausi RTBCed. If there's a solution here that doesn't require waiting for another Symfony release or changing everything again anyway in a follow-up, then that's great, but this patch is the minimal change we can make to update to Symfony 3.1 without introducing new bugs or later unexpected changes on the next patch/minor update afaict.
Comment #257
wim leersNote I was not asking to rename anything in #249.1. I was only observing that mismatch. I think documenting the intent explicitly in that class is sufficient.
I'm still concerned about introducing the
isMethodCacheable()calls inResourceResponseSubscriber. I'd rather even have that class add its own helper method for that. We need to make it clear that that class is explicitly caring about reading (safe) vs writing (unsafe) methods.Comment #258
klausiHm, the testbot set this to needs work although all patches above are green?
Comment #259
wim leersRandom fail, somebody re-tested #255. See https://www.drupal.org/pift-ci-job/537952 :)
Comment #261
klausiIntermittent test fail from #2830485: \Drupal\Tests\outside_in\FunctionalJavascript\OutsideInBlockFormTest fails randomly.
Retesting, Back to RTBC ,
Comment #262
wim leersI'd again like to beg to postpone committing this until #2737719: EntityResource: Provide comprehensive test coverage: for every entity type, every format, every method lands. Which is blocked on #2822387: Undefined offset 1 in BrowserTestBase::getMethodCaller() (because it caused a regression in 8.3.x that's showing up in #2737719).
Comment #263
slasher13Still waiting for 3.1.8
Update to 3.2 to see what's happening.
Comment #265
catchI've opened #2831757: Update to Symfony ~3.2 for the ~3.2 upgrade, postponed on this issue.
Comment #266
catchRe-re-uploading the #244 patch now that the REST tests are in. @slasher13 let's continue with 3.2 on the follow-up I posted.
Comment #267
wim leersYou beat me to it.
Comment #268
wim leersWoot, green! Back to RTBC.
Comment #269
pounardThat's a very nice thing, this patch needs to pass, there are a few annoying bugs in the DI component in 2.8 which are solved in 3.x which are getting harder to workaround for contrib as time passes!
Comment #270
pounardAfter applying the patch I got errors such as:
I'm not sure the patch is responsible, because I had a few conflicts applying it atop other patches, but I thought it worth being mentioned.
Comment #271
alexpottSo I think the only way we're not going to find further issues is by committing this and seeing what comes back from contrib and early-adopter experience.
Committed a55b8ef and pushed to 8.3.x. Thanks!
Comment #273
wim leersNice, now on to #2831757: Update to Symfony ~3.2! (Just unpostponed that.)
Comment #274
pounard@alexpott nice, thanks!
Comment #275
wim leersThis broke drush.
Latest drush 8.1.8 is not compatible with Symfony 3.1, it fails to rebuild the container, which is what @pounard was already alluding to.
8.3.x before this commit:
8.3.x after this commit:
Comment #276
pounardI wasn't experiencing it with Drush, but yeah I'm not surprised, both drush and Drupal Console will need to be upgraded for 8.3.x.
Comment #277
anavarreFiled https://github.com/drush-ops/drush/issues/2474 to get the ball rolling.
Comment #278
jibranUpdated Drupal branch and version number in CR https://www.drupal.org/node/2743809/revisions/view/10231702/10232029.
Comment #279
klausi@Wim: drush cr is working fine for me after updating. Did you forget to run composer install to get the new Symfony dependencies?
Comment #280
yanniboi commentedI have found another issue with this.
Drupal\Core\DependencyInjection\YamlFileLoader::parseDefinition()parses yml file definitions (including services) on cache clear.There is a service property called scope (https://www.drupal.org/docs/8/api/services-and-dependency-injection/stru...), which after having a quick grep is not currently used by any services in core, however by some in contrib.
YamlFileLoader::parseDefinition() calls the
setScope()method on the service definition (an instance ofSymfony\Component\DependencyInjection\Definition) which was deprecated in Symfony 2.8 and removed in Symfony 3.0 (https://api.drupal.org/api/drupal/vendor!symfony!dependency-injection!De...)To recreate this issue, just add
'scope: prototype'to any service in drupal core (egnode.node_route_contextin node.services.yml) and clear caches. It will fail with the following error:PHP Fatal error: Call to undefined method Symfony\Component\DependencyInjection\Definition::setScope() in /var/www/html/a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php on line 175Comment #281
jibranCreated a quick follow-up #2832119: Remove references of Symfony 2.8.
Comment #282
jibran@yanniboi see http://symfony.com/blog/new-in-symfony-2-8-deprecating-scopes-and-introd...
Comment #283
anavarreHere's the Drupal Console issue: https://github.com/hechoendrupal/DrupalConsole/issues/2987
Comment #284
xjmComment #285
alexpotthttps://github.com/drush-ops/drush/issues/2474 now links to 2 PRs to fix drush (one for master and one for Drush 8.x)
Comment #286
tduong commentedHello :)
I've tried to run some drush commands and my shell is complaining come incompatible method signature
and also about missing method implementations from ContainerInterface
I've seen this was the last commit that breaks it.
I also cannot access to my DB... Not sure how/if this affects it as well..
Can someone please give me an explanation or tell me if I've assumed it wrong ? ^^'
Thanks everyone :)
Comment #287
tduong commentedOh, I forgot to run composer install...
I'll check again!
Comment #288
alexpottSo I've reverted this issue till we have a solution for Drush and Console that means their latest versions can run against multiple Drupal 8 versions ie. 8.2.x and 8.3.x.
To quote @catch
I think the only way for those projects to work with this is going to be some almighty autoloader hack and those projects having both Symfony 2.x and 3.x code. This is super super painful.
Setting status back to "needs review" because I want more opinions on solutions to this problem - the patch is rtbc but we have to consider the wider environment and provide recommendations in the CR for how projects like Drush and Console work with this.
Comment #290
jibranI think it is a good idea to revert this but I think we should keep this patch improving by merging #2832119: Remove references of Symfony 2.8 and #2831757: Update to Symfony ~3.2 into this patch. We can also improve the docs. We should also create g.d.o post a week before committing this next time around.
Comment #291
catchLet's merge #2832119: Remove references of Symfony 2.8 into here, but I'm not keen on merging #2831757: Update to Symfony ~3.2 in at least until there's an RTBC patch on that issue. Each minor update requires changes on our part that should be kept as reviewable as possible.
Comment #292
wim leers#290++
#291++
Comment #293
pfrenssenYou can always use local instances of drush and console instead of global ones. That is a LOT easier than trying to wrangle them to support multiple versions at the same time.
I stopped using global instances of drush already when it stopped supporting D6.
Comment #294
catchWhile this is true, even doing that makes an 8.2.x to 8.3.x update a bit tricky no?
Comment #295
pfrenssenThe first step would be to update the code, right? So you use composer to update core to 8.3.x and this will also update drush to a compatible version because Composer will be able to resolve a set of dependencies that work together. Then the next step is to do "drush updb" to get the database in order.
There might be some pitfalls that I'm not thinking of right now, but this workflow seems doable to me. Also from the moment 8.3.0 is out 8.2.x is technically unsupported, so there's no real need for drush/console to support both at the same time with the same version.
Comment #296
webflo commented@pfrenssen is right. A local installation of Drush and console solves the problem, both projects move into this direction. There are a few solutions to avoid the problem.
Drush dispatches all commands from the global installation to the local one, if the Drupal autoloader has a Drush installation. This feature has been added in Version 8.0.3 or 8.0.4 (AFAIR).
I extracted this logic in its own library. This functionality can be shared between Drush and Console. Its already used by Drupal console and i use a small cli tool as global Drush replacement (https://github.com/webflo/drush-shim). Its basically a start for the launcher which @Mosh proposed in Drush 9 Roadmap.
Comment #297
jibranAdded #2832119: Remove references of Symfony 2.8 to the patch.
Comment #298
jibranDo we have to update these files?
Comment #299
alexpott@jibran we probably have to check those files for updates... we have modifications to those classes so we have to be careful not to remove them.
Comment #300
alexpottI think @webflo is right the only way to fix this is to install drush and console etc.. as part of Drupal. I.e. make composer responsible for sorting out the problem.
One concern though would be how would site aliases work? How would the local Drush/Console shim get the right codebase for the remote?
Comment #301
slasher13update symfony to 3.1.8
Comment #302
andypostWould be great to add new flag Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK
This will help to improve readability of webform export
http://symfony.com/doc/3.1/components/yaml.html#dumping-multi-line-liter...
Comment #306
xjmThis was tagged for the release notes before we had to roll it back, so untagging.
Comment #307
xjm@catch, @alexpott, and I also discussed this issue two weeks ago in light of the disruption for Drush and contrib, and considered whether it might be better committed to 8.4.x. According to https://symfony.com/roadmap?version=2.8#checker we still have 18 months of full support for Symfony 2.8, so it would be acceptable to update to Symfony 3 for 8.4.x instead. I'm not sure if it is mitigated by #2843828: \Drupal\Core\DrupalKernel::initializeSettings() can result in moving the autoloader position though.
Comment #308
slasher13Why not update to Symfony 3.2? https://www.drupal.org/node/2831757
Comment #309
catchComment #310
slasher13re-roll
Comment #311
slasher13update to symfony 3.2
merge with https://www.drupal.org/node/2831757
see https://www.drupal.org/node/2831757#comment-11899859
Comment #312
slasher13update symfony/* to 3.2.3
Comment #313
pfrenssenPhing 2.16.0 which fixes PHP 7.1 compatibility requires Symfony 3.1+
Phing is one of the tools that is commonly used for Continuous Integration. If we postpone this to 8.4.x it will be a very long time for people not being able to use Drupal in combination with Phing on PHP 7.1.
Edit: apparently this has been fixed a few days ago in Phing, and the next release will again be compatible with Symfony 2.8. See https://github.com/phingofficial/phing/issues/658
Comment #314
TJacksonVA commentedWhat is the anticipated timeframe for getting this into the 8.4.x-dev branch? Are there still other dependencies? From what I can gather, doesn't \Drupal\Core\DrupalKernel::initializeSettings() can result in moving the autoloader position fix the drush issue?
The sooner we get this into the 8.4.x-dev branch so that module developers and website developers can get some experience using it and finding any issues, the easier it will be to upgrade to Symfony 3.3.x before Drupal 8.4.x, as Symfony 3.3 is scheduled to be released in May 2017.
Comment #315
moshe weitzman commentedI unpublished the CR, #2743809: Symfony components are updated to 3.2.6 (including several API breaks), as this has not gone in yet.
Comment #316
catchWe're planning to commit it to 8.4.x around the time of the 8.3.0 release candidate, no actual date set yet or anything but I think that's the general idea.
Comment #317
TJacksonVA commented@catch, many thanks for the update.
Comment #318
slasher13update symfony/* to 3.2.4
Comment #319
slasher13re-roll
Comment #320
slasher13update symfony/* to 3.2.5
Comment #322
slasher13The problem started at https://github.com/symfony/symfony/pull/21564/files
To update to phpunit/phpunit: 4.8.35 I must update sebastian/comparator, too.
Requirement change between 4.8.28 and 4.8.29
Comment #323
slasher13update symfony/* to 3.2.6
Comment #324
jibran#302 is still pending. Do we need a follow-up for #300? Do we also need some follow-up issues for https://github.com/drush-ops/drush/pull/2477#issuecomment-264508717 as well?
Comment #325
jibranMeanwhile created #2859772: Update Symfony components to ~2.8.18.
Comment #326
claudiu.cristeaWhat?EDIT: I read #209 & followingThese changes seems unrelated.
Comment #327
slasher13#302 Should be a follow-up.
#326.2 Done
Create an updated drush pull request:
https://github.com/drush-ops/drush/pull/2672
Comment #329
slasher13re-uploaded patch from #323
#326.2 Isn't unrelated because namespace of ValidatorInterface changed from
'\Symfony\Component\Validator\ValidatorInterface' to
'\Symfony\Component\Validator\Validator\ValidatorInterface'
Comment #330
slasher13re-roll
Comment #331
slasher13re-roll
Comment #332
jibranI think we can remove this line. We are not directly dependent on this package.
Comment #333
slasher13#332 done
Comment #334
jibranThanks, I'll RTBC once https://github.com/drush-ops/drush/pull/2672 is merged.
Comment #335
slasher13re-roll
Comment #336
alexpottNeeds a reroll.
Comment #337
timmillwoodRe-roll
Comment #338
catchRe-roll looks fine. I think we should aim to get this in soon after 8.3.0 is released, so that at least we have plenty more opportunities to roll back and re-commit if something comes up.
However it looks like https://github.com/drush-ops/drush/issues/2672 was committed to drush then reverted, and now https://github.com/drush-ops/drush/pull/2692 is open trying to test with a patched 8.4.x.
I've asked on the latter issue to clarify what the current status is. We should not commit this until the drush side is OK, but marking RTBC since there's nothing specific to postpone this on against core.
Comment #340
webflo commentedNeeds a reroll, because of #2850797: Prepare our phpunit tests to be BC compatible with phpunit 5.x/6.x
Comment #341
webflo commentedComment #343
slasher13re-roll
back to RTBC as #338
Comment #344
mpdonadioSynfony 3.2.7 came out this morning. Do we want to keep this or `composer update symfony/*` the patch in #343?
Comment #345
timmillwoodI'd vote for an update to 3.2.7
Comment #346
pounardI vote to update to 3.3 :) But yes you're right, it was just released that's a good idea to stick to the higher version until the Drupal branch gets stable itself.
Comment #347
mpdonadioHere's #343 + `composer update symfony/*`
Comment #348
timmillwoodAs long as testbot agrees, looks fine.
Comment #350
mpdonadioBased on http://symfony.com/blog/symfony-3-2-7-released, I think the fail in #349 is from or related to https://github.com/symfony/symfony/pull/22036. I see what is happening, but not why; I don't know why RedirectResponse doesn't have the 'Date' header, but the SecuredRedirectResponse does.
Side note, the issue mentioned on line 43 of SecuredRedirectResponseTest is closed, and the unsets aren't needed.
Comment #351
mpdonadioOK, #349 is an upstream problem.
Comment #352
mpdonadioCreated https://github.com/symfony/symfony/pull/22304 ; it fixes the fail.
Comment #355
mpdonadioReroll is b/c #2853300: Standardize fatal error/exception handling: backtrace for all formats, not just HTML, which renamed DefaultExceptionSubscriberTest to FinalExceptionSubscriberTest
The PR mentioned in #352 got merged, but is not in a released version yet. So, we either re-roll on 3.2.6 explicitly or wait on 3.2.8 to do a ~3.2.
Here is is explicitly set to 3.2.6, and `composer update 'symfony/*'`
Comment #356
martin107 commentedmpdonadio++
thanks for the quick response.
I would like to see this committed as soon as possible.
Above it was stated that we should get this in early in the 8.4.x release window as it will be disruptive.
It would be good to get this in a week or so before the patch commit spree that will be Drupalcon Baltimore - so we can respond to any unforeseen problems.
As Symfony and Drupal8 are adding new features consistent with the semantic version policy D8 - we should be resyncing every 6 months or so
So any reason to delay can be pickup in a future release.
Comment #357
catchExplicitly on 3.2.6 is OK for me. Opened the follow-up to update to ~3.2 once 3.2.8 is out at #2871253: Update Symfony components to 3.2.8.
Moving this to RTBC.
Comment #359
mpdonadioRe-RTBC b/c #2870146: Even more random fails in \Drupal\Tests\outside_in\FunctionalJavascript\OutsideInBlockFormTest.
Comment #360
catchDiscussed with alexpott and xjm, and we decided to schedule this for May 2nd just after the sprints. We could also have committed it today maybe but given the number of critical issues in the queue etc. and five months between commit and 8.4.0 being plenty of time to flush out any remaining issues from the upgrade, seems a decent balance.
Comment #361
jibranDrush is green now https://github.com/drush-ops/drush/pull/2724.
Comment #363
catchAnd it's May 2nd!
Committed/pushed to 8.4.x, thanks!
Very hopeful we've flushed out all the regressions with this, but if there are even more, since we're at over 300 comments please open a new issue for follow-ups or reverting, linking to it from this one.
Comment #364
xjmComment #366
wim leersNote that this caused Symfony 3.2 deprecation notices to show up in contrib projects, hence causing automated testing to fail.
This is for example the case for https://www.drupal.org/project/big_pipe_sessionless:
Fixed that in #2884337: Fix Symfony 3.2 deprecation notices. Tagged a new release: https://www.drupal.org/project/big_pipe_sessionless/releases/8.x-1.1.
Comment #367
heddnIn the IS, we mentioned drush, but not drupal console. But maybe we should reach out to those folks too when this type of thing happens in the future as there's a few incompatibility issues with it now as well: https://github.com/hechoendrupal/drupal-console/issues/3293 is an example.
Comment #368
tim.plunkettThe need to call setRequestFormat in KTB (due to middlewares not running) broke Page Manager's tests. Took hours to track down.
Considering that much of core's tests needed to copy/paste the same fix in many places, would be nice to get a CR about that.