youwe / composer-file-installer
Install files with Composer.
Installs: 111 646
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 2
Open Issues: 0
Requires
- php: ^7.2 || ^8.0
- youwe/file-mapping: ~1.1.0
Requires (Dev)
- composer/composer: @stable
- kint-php/kint: @stable
- mikey179/vfsstream: @stable
- phpunit/phpunit: @stable
This package is auto-updated.
Last update: 2024-12-15 13:33:46 UTC
README
Install files in a project as part of a composer install
or composer update
.
Uses the youwe/file-mapping package for moving files according to
a source -> destination mapping. The Composer IOInterface
supplies the file installer with the capability to
write the files and supply end-users with output messages.
Usage example
<?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);