Problem/Motivation

We use 2 spaces as indentation for composer.json file, but composer itself uses 4 spaces. This leads to unnecessary huge changes in git after people modify the composer.json via composer (e.g. composer require drupal/example) or use the composer_manager init script.

Proposed resolution

Use an indent of 4 spaces for all compsoer.json files and update .editorconfig accordingly.

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

webflo created an issue. See original summary.

dawehner’s picture

Sounds sensible for me! +1

bojanz’s picture

+1. Let's do it.

dawehner’s picture

Issue tags: +Novice
felribeiro’s picture

FileSize
239 bytes

Wrong patch.

felribeiro’s picture

FileSize
173 bytes

Patch to update .editorconfig

gnuget’s picture

Status: Active » Needs review
webflo’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, works great with PhpStrom and the Editor Config Plugin.

bojanz’s picture

Status: Reviewed & tested by the community » Needs work

We didn't update the actual composer.json files?

webflo’s picture

Status: Needs work » Needs review
FileSize
21.34 KB

I thought we do it in a follow-up, but here is the patch.

webflo’s picture

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Nice!

  • catch committed 7da92b5 on 8.1.x
    Issue #2654894 by felribeiro, webflo: Use an indent of 4 spaces for...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Shame we can't enforce 2 spaces on composer, but the diffs are more important.

Committed/pushed to 8.1.x, thanks!

Status: Fixed » Closed (fixed)

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