From 634d1aba63b06238c89ba1ef3e16d2544701a81b Mon Sep 17 00:00:00 2001 From: Eric Stern Date: Thu, 6 Mar 2014 10:15:59 -0800 Subject: [PATCH] Add @generated annotation to lockfile readme, giving a hint for linters and other static analysis tools --- src/Composer/Package/Locker.php | 4 +++- tests/Composer/Test/Package/LockerTest.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Composer/Package/Locker.php b/src/Composer/Package/Locker.php index a928584e4..88ac547ba 100644 --- a/src/Composer/Package/Locker.php +++ b/src/Composer/Package/Locker.php @@ -210,7 +210,9 @@ class Locker public function setLockData(array $packages, $devPackages, array $platformReqs, $platformDevReqs, array $aliases, $minimumStability, array $stabilityFlags) { $lock = array( - '_readme' => array('This file locks the dependencies of your project to a known state', 'Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file'), + '_readme' => array('This file locks the dependencies of your project to a known state', + 'Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file', + 'This file is @gener'.'ated automatically'), 'hash' => $this->hash, 'packages' => null, 'packages-dev' => null, diff --git a/tests/Composer/Test/Package/LockerTest.php b/tests/Composer/Test/Package/LockerTest.php index 1b879f421..b530eaf41 100644 --- a/tests/Composer/Test/Package/LockerTest.php +++ b/tests/Composer/Test/Package/LockerTest.php @@ -120,7 +120,9 @@ class LockerTest extends \PHPUnit_Framework_TestCase ->expects($this->once()) ->method('write') ->with(array( - '_readme' => array('This file locks the dependencies of your project to a known state', 'Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file'), + '_readme' => array('This file locks the dependencies of your project to a known state', + 'Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file', + 'This file is @gener'.'ated automatically'), 'hash' => 'md5', 'packages' => array( array('name' => 'pkg1', 'version' => '1.0.0-beta'),