Browse Source

Merge pull request #2785 from Firehed/master

Add @generated annotation to lockfile (ref PR 2210)
Jordi Boggiano 10 years ago
parent
commit
64ac32fca9
2 changed files with 6 additions and 2 deletions
  1. 3 1
      src/Composer/Package/Locker.php
  2. 3 1
      tests/Composer/Test/Package/LockerTest.php

+ 3 - 1
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,

+ 3 - 1
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'),