PHPackages                             tarekdj/composer-copy-file - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tarekdj/composer-copy-file

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tarekdj/composer-copy-file
==========================

Composer script copying your files after install

0.2.0(9y ago)016MITPHPPHP &gt;=5.3.3

Since Sep 25Pushed 8y ago1 watchersCompare

[ Source](https://github.com/tarekdj/CopyFile)[ Packagist](https://packagist.org/packages/tarekdj/composer-copy-file)[ Docs](https://github.com/SlowProg/composer-copy-file)[ RSS](/packages/tarekdj-composer-copy-file/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (5)Versions (3)Used By (0)

Composer copy file
==================

[](#composer-copy-file)

Composer script copying your files after install. Supports copying of entire directories, individual files and complex nested directories.

For example copy fonts:

```
{
    "require":{
        "twbs/bootstrap": "~3.3",
        "slowprog/composer-copy-file": "~0.2"
    },
    "scripts": {
        "post-install-cmd": [
            "SlowProg\\CopyFile\\ScriptHandler::copy"
        ],
        "post-update-cmd": [
            "SlowProg\\CopyFile\\ScriptHandler::copy"
        ]
    },
    "extra": {
        "copy-file": {
            "vendor/twbs/bootstrap/fonts/": "web/fonts/"
        }
    }
}

```

Use cases
---------

[](#use-cases)

You need to be careful when using a last slash. The file-destination is different from the directory-destination with the slash.

Source directory hierarchy:

```
dir/
    subdir/
        file1.txt
        file2.txt
        .hidden

```

1. Dir-to-dir:

    ```
    {
        "extra": {
            "copy-file": {
                "dir/subdir/": "web/other/"
            }
        }
    }

    ```

    Result:

    ```
    web/
        other/
            file1.txt
            file2.txt
            .hidden

    ```
2. File-to-dir:

    ```
    {
        "extra": {
            "copy-file": {
                "dir/subdir/file1.txt": "web/other/"
                "dir/subdir/file2.txt": "web/other/file2.txt/"
            }
        }
    }

    ```

    Result:

    ```
    web/
        other/
            file1.txt
            file2.txt/
                file2.txt

    ```
3. File-to-file:

    ```
    {
        "extra": {
            "copy-file": {
                "dir/subdir/file1.txt": "web/other/file1.txt"
                "dir/subdir/file2.txt": "web/other/file_rename.txt"
            }
        }
    }

    ```

    Result:

    ```
    web/
        other/
            file1.txt
            file_rename.txt

    ```
4. One to many destinations:

    ```
    {
        "extra": {
            "copy-file": {
                "dir/subdir/file1.txt": ["web/folder/file1.txt", "web/other/file1.txt"]
            }
        }
    }

    ```

    Result:

    ```
    web/
        folder/
            file1.txt
        other/
            file1.txt

    ```

### Credits

[](#credits)

Thanks Slowprog for the base project -

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 55% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~91 days

Total

3

Last Release

3379d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a9338a69fa05c8f02a2b8e3d814629cfe27ac7a38cca6aa1b9523d4dcd2ea894?d=identicon)[tarekdj](/maintainers/tarekdj)

---

Top Contributors

[![slowprog](https://avatars.githubusercontent.com/u/1294672?v=4)](https://github.com/slowprog "slowprog (11 commits)")[![tarekdj](https://avatars.githubusercontent.com/u/540268?v=4)](https://github.com/tarekdj "tarekdj (9 commits)")

---

Tags

copy file

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tarekdj-composer-copy-file/health.svg)

```
[![Health](https://phpackages.com/badges/tarekdj-composer-copy-file/health.svg)](https://phpackages.com/packages/tarekdj-composer-copy-file)
```

###  Alternatives

[slowprog/composer-copy-file

Composer script copying your files after install

481.1M31](/packages/slowprog-composer-copy-file)[spatie/lighthouse-php

Run Google Lighthouse using PHP

26957.1k2](/packages/spatie-lighthouse-php)[fishpig/magento2-wordpress-integration-yoastseo

Magento 2 WordPress Inegration Addon module to support the WordPress SEO plugin by Yoast.

18198.8k](/packages/fishpig-magento2-wordpress-integration-yoastseo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
