Problem/Motivation

symfony/yaml 2.8 is deprecating some syntax it previously supported that doesn't comply with the yaml spec - http://symfony.com/blog/new-in-symfony-2-8-yaml-deprecations?utm_source=...

Proposed resolution

Audit our yaml files to find instance that use deprecated syntax

Remaining tasks

Audit yaml files
Fix deprecated syntax if found

User interface changes

None

API changes

None

Data model changes

None

CommentFileSizeAuthor
#8 2679883-8.patch605 byteslokapujya

Comments

larowlan created an issue. See original summary.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

luukyb’s picture

I tried to scan core (only yaml files inside core/) today and I could not find any YAML deprecations from http://symfony.com/blog/new-in-symfony-2-8-yaml-deprecations

imrancluster’s picture

@Luukyb

Me too :)

dawehner’s picture

At least the case

app.user_manager:
    # ...
    arguments: ['@router', '@logger', '@doctrine.orm.entity_manager']

should be triggered by @neclimdul's YML testing.

lokapujya’s picture

core/modules/system/tests/modules/theme_test/theme_test.services.yml

services:
  theme_test.subscriber:
    class: Drupal\theme_test\EventSubscriber\ThemeTestSubscriber
    arguments: [@current_route_match, @renderer]

You must have noticed this one. Do the arguments in this file purposely not have quotes?

dawehner’s picture

@lokapujya You are right! Feel free to upload a patch.

lokapujya’s picture

Status: Active » Needs review
StatusFileSize
new605 bytes

Arguments with certain leading special characters need quotes. Even though this is in a test.

thhafner’s picture

Looks good to me.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

I just did a grep and this seemed to be the only place in core with that combination

johnrosswvsu’s picture

I can confirm that there are no other instances of arguments beginning with special characters in YML files. The patch is good on my end.

imrancluster’s picture

I have test again using my phpStorm editor. There is no deprecated syntax like this issue in core. The patch also worked perfectly for me.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 8023d8c and pushed to 8.0.x, 8.1.x and 8.2.x. Thanks!

  • alexpott committed 4da0050 on 8.2.x
    Issue #2679883 by lokapujya: Audit use of YAML to ensure we're not using...

  • alexpott committed 7435c47 on 8.1.x
    Issue #2679883 by lokapujya: Audit use of YAML to ensure we're not using...

  • alexpott committed 8023d8c on 8.0.x
    Issue #2679883 by lokapujya: Audit use of YAML to ensure we're not using...
neclimdul’s picture

You guys may be interested in the issue that triggered that change in Symfony and has tests that catch these sorts of invalid YAML in testbot. #1920902: Add a Drupal Yaml wrapper so we can default to PECL Yaml component if it is available

lokapujya’s picture

How did this issue cause a conflict? and why if it's catching invalid YAML, why wasn't that issue failing?

NEVERMIND: I see that the previous patch has a similar fix for this same issue.

neclimdul’s picture

Yeah, exactly that. It was triggering errors which is why it had the same fix which conflicted. Sorry if it wasn't clear.

Status: Fixed » Closed (fixed)

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