Skip to content

Command lint:yaml doesn't detect broken lists and invalid characters when list is made of brackets #59259

@PatNowak

Description

@PatNowak

Symfony version(s) affected

7.1.4 and most likely newer ones as well

Description

It looks like using list in brackets is not validated enough. When passing the data with hyphens, it is. I found it when I saw trailing comma after the brackets got ignored.

How to reproduce

The command will say this is valid syntax:

App\:
        resource: '../src/'
        exclude: ['../src/DependencyInjection/', '../src/Entity/', '../src/Kernel.php'],@@fsdgrety4567y5687r56yhergtertgyertgert#@,
  • The app will run properly with things after trailing comma when brackets are enclosed.

or this:

    App\:
        resource: '../src/'
        exclude: ['../src/DependencyInjection/', '../src/Entity/', '../src/Kernel.php',@@fsdgrety4567y5687r56yhergtertgyertgert#@,
  • The app will detect error due to unclosed brackets. But the linter won't.

Possible Solution

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy