Problem/Motivation

Support for mapping keys in multi-line blocks is deprecated since Symfony 4.3 and will throw a ParseException in 5.0.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Sites installed prior to Drupal 9.1.0 that are using a customized version of default.services.yml may need to update the YAML syntax in that file. See the change record on the yaml syntax change for more information.

Comments

mikelutz created an issue. See original summary.

mikelutz’s picture

StatusFileSize
new198 KB

Test Patch

mikelutz’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: 3055189-2.drupal.TEST_ONLY.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

mikelutz’s picture

Status: Needs work » Needs review
StatusFileSize
new197.45 KB
new816 bytes
new816 bytes
catch’s picture

Status: Needs review » Reviewed & tested by the community

Couldn't be more straightforward.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

So now I remember. We've come across this before - #2945275: Remove hack to fix bug in symfony/yaml

So the problem here is that making this change here is simple BUT we've got to cope with the sites/default/services.yml files that have been generated from this file on install. So we need to read the files and see if they have this format and then tell people to fix them.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

alexpott’s picture

We also need to remove the line
'Support for mapping keys in multi-line blocks is deprecated since Symfony 4.3 and will throw a ParseException in 5.0.',
from \Drupal\Tests\Listeners\DeprecationListenerTrait::getSkippedDeprecations()

mikelutz’s picture

Version: 8.9.x-dev » 9.0.x-dev
Status: Needs work » Needs review
StatusFileSize
new2.04 KB
new1.25 KB

So the problem here is that making this change here is simple BUT we've got to cope with the sites/default/services.yml files that have been generated from this file on install. So we need to read the files and see if they have this format and then tell people to fix them.

Do we need to though? If a generated file has this format, then it will trigger the error from the parser. That may be enough.

Otherwise, we will need to replicate the parser logic to detect the error and surface it to the status page. Even if we choose to do that, the sooner that this patch gets in, the fewer sites will be affected by this come Drupal 10 time, so I still suggest putting this in 8.9 and 9.0 and writing code to surface the issue to the status page in a 9.0.x only follow up.

alexpott’s picture

Do we need to though? If a generated file has this format, then it will trigger the error from the parser. That may be enough.

I see what you mean. They'd only can the deprecation reported if they had test coverage with deprecation testing enabled. But perhaps by the time we get to Sf5 / D10 we'll be better at surfacing these things in the UI.

On balance I think you're right. I think there's no harm in a CR that tells people to about their services.yml files if they copied this.

mikelutz’s picture

Assigned: Unassigned » mikelutz
Issue tags: +Needs change record

I believe the patch from #5 still works for 8.9.x.

It would be nice to be able to optionally surface runtime deprecation errors to the UI at some point, but I think the fact that we are triggering an error is enough right now. I'll whip up a quick CR.

xjm’s picture

Issue tags: +beta target
catch’s picture

Version: 9.0.x-dev » 9.1.x-dev
Priority: Normal » Critical
Issue tags: +Drupal 10
StatusFileSize
new868 bytes
new2.89 KB

Fixing the scaffold test failure in #10.

Bumping to critical since this blocks Drupal 10.

catch’s picture

Added a change record and release notes snippet.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

I don't think there is anything left to do here.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

This one is easier now that we have the scaffold plugin as that'll fix this for a lot of existing sites.

Committed 67a054c and pushed to 9.1.x. Thanks!

nickdickinsonwilde’s picture

Updated change record to refer to default.services.yml rather than the non-existent default.settings.yml

  • alexpott committed c8a3115 on 9.1.x
    Issue #3055189 by mikelutz, catch, alexpott: [Symfony 5] Support for...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

alexpott’s picture

Issue tags: +9.1.0 release notes

Tagging for 9.1.0 as from then on a sites default.services.yml might cause a deprecation.

xjm’s picture

Status: Closed (fixed) » Needs work

The release note shouldn't reference an issue -- maybe it's supposed to be a link to the CR? Otherwise we should take whatever info is important and just put it in the release note.

alexpott’s picture

Issue summary: View changes
Status: Needs work » Fixed

Fixed the link

xjm’s picture

Issue summary: View changes
Status: Fixed » Needs work

The release note says default.settings.yml, but the CR says default.services.yml. Which is it?

Meanwhile, making the link accessible.

alexpott’s picture

Issue summary: View changes
Status: Needs work » Fixed

Good spot. It’s default.services.yml - fixed accordingly.

xjm’s picture

Issue tags: -beta target

Removing beta target tag that was leftover from 8.9/9.0.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.