Skip to content

Commit 48e723d

Browse files
Merge pull request #1 from borilyordanov/add-newline-at-end-of-arcconfig-and-arclint
Add a newline at the end of `.arc{config,lint}`
2 parents 04542e7 + 0056a76 commit 48e723d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## 1.3.3
8+
### Fixed
9+
- Add a newline at the end of `.arcconfig` and `.arclint` files.
10+
711
## 1.3.2
812

913
### Fixed

composer/ArcConfigParser.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static function parseArcConfig(Event $event)
3131

3232
file_put_contents(
3333
self::CONFIG_FILE,
34-
stripslashes(json_encode($parsedConfig, JSON_PRETTY_PRINT))
34+
json_encode($parsedConfig, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . PHP_EOL
3535
);
3636
}
3737

@@ -94,7 +94,10 @@ private static function createOrUpdateArcLint($parsedConfig)
9494
$arcLint['linters']['php-cs-fixer']['unified_diff_format'] = $parsedConfig['lint.php_cs_fixer.unified_diff_format'];
9595
}
9696

97-
file_put_contents(self::LINT_FILE, stripslashes(json_encode($arcLint, JSON_PRETTY_PRINT)));
97+
file_put_contents(
98+
self::LINT_FILE,
99+
json_encode($arcLint, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . PHP_EOL
100+
);
98101
}
99102

100103
private static function cleanArcConfig($parsedConfig)

0 commit comments

Comments
 (0)