Moved Filesystem to base Util namespace
parent
ec352b1e84
commit
5da021ffa7
|
@ -17,7 +17,7 @@ use Composer\Json\JsonFile;
|
|||
use Composer\Package\Loader\JsonLoader;
|
||||
use Composer\Package\PackageInterface;
|
||||
use Composer\Repository\RepositoryInterface;
|
||||
use Composer\Downloader\Util\Filesystem;
|
||||
use Composer\Util\Filesystem;
|
||||
|
||||
/**
|
||||
* @author Igor Wiedler <igor@wiedler.ch>
|
||||
|
|
|
@ -14,6 +14,7 @@ namespace Composer\Downloader;
|
|||
|
||||
use Composer\Package\PackageInterface;
|
||||
use Composer\Downloader\DownloaderInterface;
|
||||
use Composer\Util\Filesystem;
|
||||
|
||||
/**
|
||||
* Downloaders manager.
|
||||
|
@ -134,9 +135,9 @@ class DownloadManager
|
|||
);
|
||||
}
|
||||
|
||||
$fs = new Util\Filesystem();
|
||||
$fs = new Filesystem();
|
||||
$fs->ensureDirectoryExists($targetDir);
|
||||
|
||||
|
||||
$downloader = $this->getDownloaderForInstalledPackage($package);
|
||||
$downloader->download($package, $targetDir);
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ namespace Composer\Downloader;
|
|||
|
||||
use Composer\IO\IOInterface;
|
||||
use Composer\Package\PackageInterface;
|
||||
use Composer\Util\Filesystem;
|
||||
|
||||
/**
|
||||
* Base downloader for file packages
|
||||
|
@ -142,7 +143,7 @@ abstract class FileDownloader implements DownloaderInterface
|
|||
*/
|
||||
public function update(PackageInterface $initial, PackageInterface $target, $path)
|
||||
{
|
||||
$fs = new Util\Filesystem();
|
||||
$fs = new Filesystem();
|
||||
$fs->removeDirectory($path);
|
||||
$this->download($target, $path);
|
||||
}
|
||||
|
@ -152,7 +153,7 @@ abstract class FileDownloader implements DownloaderInterface
|
|||
*/
|
||||
public function remove(PackageInterface $package, $path)
|
||||
{
|
||||
$fs = new Util\Filesystem();
|
||||
$fs = new Filesystem();
|
||||
$fs->removeDirectory($path);
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ namespace Composer\Downloader;
|
|||
use Composer\Package\PackageInterface;
|
||||
use Composer\Util\ProcessExecutor;
|
||||
use Composer\IO\IOInterface;
|
||||
use Composer\Util\Filesystem;
|
||||
|
||||
/**
|
||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
||||
|
@ -73,7 +74,7 @@ abstract class VcsDownloader implements DownloaderInterface
|
|||
public function remove(PackageInterface $package, $path)
|
||||
{
|
||||
$this->enforceCleanDirectory($path);
|
||||
$fs = new Util\Filesystem();
|
||||
$fs = new Filesystem();
|
||||
$fs->removeDirectory($path);
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ use Composer\Downloader\DownloadManager;
|
|||
use Composer\Repository\WritableRepositoryInterface;
|
||||
use Composer\DependencyResolver\Operation\OperationInterface;
|
||||
use Composer\Package\PackageInterface;
|
||||
use Composer\Downloader\Util\Filesystem;
|
||||
use Composer\Util\Filesystem;
|
||||
|
||||
/**
|
||||
* Package installation manager.
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer\Downloader\Util;
|
||||
|
||||
use Composer\Util\ProcessExecutor;
|
||||
namespace Composer\Util;
|
||||
|
||||
/**
|
||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
|
@ -13,7 +13,7 @@
|
|||
namespace Composer\Test\Installer;
|
||||
|
||||
use Composer\Autoload\AutoloadGenerator;
|
||||
use Composer\Downloader\Util\Filesystem;
|
||||
use Composer\Util\Filesystem;
|
||||
use Composer\Package\MemoryPackage;
|
||||
|
||||
class AutoloadGeneratorTest extends \PHPUnit_Framework_TestCase
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
namespace Composer\Test\Repository;
|
||||
|
||||
use Composer\Downloader\Util\Filesystem;
|
||||
use Composer\Util\Filesystem;
|
||||
use Composer\Test\TestCase;
|
||||
|
||||
class FilesystemTest extends TestCase
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace Composer\Test\Installer;
|
|||
|
||||
use Composer\Installer\LibraryInstaller;
|
||||
use Composer\DependencyResolver\Operation;
|
||||
use Composer\Downloader\Util\Filesystem;
|
||||
use Composer\Util\Filesystem;
|
||||
|
||||
class LibraryInstallerTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue