Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[Filesystem] added a missing CHANGELOG item and fixed some CS

  • Loading branch information...
commit 95496591e1f11fd0404581f7f93d6780661ef82d 1 parent 6589169
Fabien Potencier fabpot authored
5 CHANGELOG.md
Source Rendered
... ... @@ -1,6 +1,11 @@
1 1 CHANGELOG
2 2 =========
3 3
  4 +2.2.0
  5 +-----
  6 +
  7 + * added a delete option for the mirror() method
  8 +
4 9 2.1.0
5 10 -----
6 11
2  Filesystem.php
@@ -336,7 +336,7 @@ public function makePathRelative($endPath, $startPath)
336 336 * Valid options are:
337 337 * - $options['override'] Whether to override an existing file on copy or not (see copy())
338 338 * - $options['copy_on_windows'] Whether to copy files instead of links on Windows (see symlink())
339   - * - $options['delete'] Default false Whether to delete files that are not in the source directory
  339 + * - $options['delete'] Whether to delete files that are not in the source directory (defaults to false)
340 340 *
341 341 * @throws IOException When file type is unknown
342 342 */
9 Tests/FilesystemTest.php
@@ -801,22 +801,21 @@ public function testMirrorCopiesFilesAndDirectoriesRecursively()
801 801
802 802 $this->filesystem->remove($file1);
803 803
804   - $this->filesystem->mirror($sourcePath, $targetPath, null, array("delete" => FALSE));
  804 + $this->filesystem->mirror($sourcePath, $targetPath, null, array('delete' => false));
805 805 $this->assertTrue($this->filesystem->exists($targetPath.'directory'.DIRECTORY_SEPARATOR.'file1'));
806 806
807   - $this->filesystem->mirror($sourcePath, $targetPath, null, array("delete" => TRUE));
  807 + $this->filesystem->mirror($sourcePath, $targetPath, null, array('delete' => true));
808 808 $this->assertFalse($this->filesystem->exists($targetPath.'directory'.DIRECTORY_SEPARATOR.'file1'));
809 809
810 810 file_put_contents($file1, 'FILE1');
811 811
812   - $this->filesystem->mirror($sourcePath, $targetPath, null, array("delete" => TRUE));
  812 + $this->filesystem->mirror($sourcePath, $targetPath, null, array('delete' => true));
813 813 $this->assertTrue($this->filesystem->exists($targetPath.'directory'.DIRECTORY_SEPARATOR.'file1'));
814 814
815 815 $this->filesystem->remove($directory);
816   - $this->filesystem->mirror($sourcePath, $targetPath, null, array("delete" => TRUE));
  816 + $this->filesystem->mirror($sourcePath, $targetPath, null, array('delete' => true));
817 817 $this->assertFalse($this->filesystem->exists($targetPath.'directory'));
818 818 $this->assertFalse($this->filesystem->exists($targetPath.'directory'.DIRECTORY_SEPARATOR.'file1'));
819   -
820 819 }
821 820
822 821 public function testMirrorCopiesLinks()

0 comments on commit 9549659

Please sign in to comment.
Something went wrong with that request. Please try again.