Problem/Motivation

It can be tricky, and annoying, to keep the composer.json files following a consistent format.

Proposed resolution

Use ergebnis/composer-normalize to normalize the composer files.

Remaining tasks

Agree on the change.
Provide a patch that includes normalized composer.json files.

User interface changes

n/a

API changes

n/a

Data model changes

n/a

Release notes snippet

TBD

CommentFileSizeAuthor
#5 3390229.diff6.29 KBelber

Issue fork drupal-3390229

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

This was suggested to me in the Schema.org Metatag issue queue by Rajeshreeputra (#3313582: Normalize composer.json using ergebnis/composer-normalize), I thought it would be worth to include in Drupal core.

elber’s picture

Assigned: Unassigned » elber

I will work on it

elber’s picture

StatusFileSize
new6.29 KB

Hi Normalized composer.json following this doc instructions

Here are the steps:

composer require --dev ergebnis/composer-normalize

composer normalize --diff

As a result I had this output Successfully normalized ./composer.json. and a diff information(see the attached bellow)

elber’s picture

Assigned: elber » Unassigned
Status: Active » Needs review
damienmckenna’s picture

Status: Needs review » Needs work

The patch was built incorrectly - the changes should have been applied directly using "composer normalize", and then a patch built using "git diff".

The merge request was built correctly.

There are also a lot of other composer.json files strewn across the codebase, all of them need to be updated too.

elber’s picture

Ok I am sorry @DamienMcKenna I put the diff file to become the review easier, diff is not to be applied. Once I'm sorry I should clarify it.

I wiill keep working on the others composer.json files.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.