mediact / composer-file-installer
1.1.0
2020-12-24 03:34 UTC
Requires
- php: ^7.0
- mediact/file-mapping: ^1.0
Requires (Dev)
- composer/composer: @stable
- kint-php/kint: @stable
- mediact/testing-suite: @stable
- mikey179/vfsstream: @stable
- phpunit/phpunit: @stable
This package is auto-updated.
Last update: 2022-08-10 18:13:57 UTC
README
[废弃] composer-file-installer
将文件作为项目的一部分安装,作为 composer install
或 composer update
的一部分。使用 mediact/file-mapping 软件包根据源 -> 目标映射移动文件。Composer 的 IOInterface
为文件安装程序提供写入文件的能力,并向最终用户提供输出消息。
使用示例
<?php // Create a file mapping. $mappingFilePaths = new UnixFileMapping( __DIR__ . '/../folder/files', getcwd(), ['./dir/one','./dir/two'] ); // Get a file mapping reader. $reader = new UnixFileMappingReader($sourceDirectory, $targetDirectory, $mappingFilePaths); // Get an installer, supply with the file mapping reader. $installer = new FileInstaller($reader); // Install according to mapping, supply with Composer IOInterface. $installer->install($io);