PHPackages                             tourze/php-packer-resource - 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. tourze/php-packer-resource

ActiveLibrary

tourze/php-packer-resource
==========================

资源处理工具，用于PHP Packer的资源文件复制、映射和处理

0.0.1(1y ago)06MITPHPPHP ^8.1CI passing

Since Apr 17Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/tourze/php-packer-resource)[ Packagist](https://packagist.org/packages/tourze/php-packer-resource)[ RSS](/packages/tourze-php-packer-resource/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

PHP Packer Resource
===================

[](#php-packer-resource)

[English](README.md) | [中文](README.zh-CN.md)

[![Latest Version](https://camo.githubusercontent.com/48feea3db0ab5a526aa1875a6eae0d08948152d3a112c55d7029406bdd8fc924/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f75727a652f7068702d7061636b65722d7265736f757263652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/php-packer-resource)[![Build Status](https://camo.githubusercontent.com/97bb170087abcf21dadb17c459fd11fb92f866f9175cf43babec475a85958ba7/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f746f75727a652f7068702d7061636b65722d7265736f757263652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/tourze/php-packer-resource)[![Quality Score](https://camo.githubusercontent.com/50d8d8c43d48700885f0e9f2347417c6bcdfd59d1d2cb933a8ed922d51c8c4c5/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f746f75727a652f7068702d7061636b65722d7265736f757263652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/tourze/php-packer-resource)[![Total Downloads](https://camo.githubusercontent.com/4984df613a1be298d9da0778a5dd74ec10f30a0ed50483543aa478e4eae997aa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f75727a652f7068702d7061636b65722d7265736f757263652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/php-packer-resource)

A resource management component for PHP Packer, responsible for copying, mapping, and processing resource files.

Features
--------

[](#features)

- Copy and move resource files
- Path mapping for resource files
- Resource reference detection and extraction (AST-based)
- Output directory management

Installation
------------

[](#installation)

```
composer require tourze/php-packer-resource
```

Quick Start
-----------

[](#quick-start)

### Basic Usage

[](#basic-usage)

```
use PhpPacker\Config\Configuration;
use PhpPacker\Resource\ResourceManager;
use Psr\Log\LoggerInterface;

// Create resource manager
$config = new Configuration('path/to/config.php', $logger);
$resourceManager = new ResourceManager($config, $logger);

// Copy resource files
$resourceManager->copyResources();

// Clean output directory
$resourceManager->cleanOutputDirectory();
```

### Example: Resource Section in Config

[](#example-resource-section-in-config)

```
// config.php
return [
    // ... other settings ...
    'assets' => [
        'src/assets/images/logo.png' => 'assets/images/logo.png',
        'src/assets/css/style.css' => 'assets/css/style.css',
        'src/views/templates/' => 'views/templates/',
    ],
];
```

Resource Manager Methods
------------------------

[](#resource-manager-methods)

MethodDescriptioncopyResources()Copy all configured resource files to output directorycleanOutputDirectory()Clean output directory (if enabled in config)copyResource(string $source, string $target)Copy a single resource fileisResourceFile(string $file)Check if a file is a resource filefindUsedResources(array $stmts)Find used resources from ASTContribution Guide
------------------

[](#contribution-guide)

- Please describe the issue background and reproduction steps in detail before submitting an Issue
- PRs must pass all tests
- Follow PSR coding standards

License
-------

[](#license)

MIT

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance49

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

396d ago

### Community

Maintainers

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

---

Top Contributors

[![tourze](https://avatars.githubusercontent.com/u/13899502?v=4)](https://github.com/tourze "tourze (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tourze-php-packer-resource/health.svg)

```
[![Health](https://phpackages.com/badges/tourze-php-packer-resource/health.svg)](https://phpackages.com/packages/tourze-php-packer-resource)
```

###  Alternatives

[zircote/swagger-php

Generate interactive documentation for your RESTful API using PHP attributes (preferred) or PHPDoc annotations

5.3k132.9M468](/packages/zircote-swagger-php)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k26.2M1.8k](/packages/infection-infection)[danog/madelineproto

Async PHP client API for the telegram MTProto protocol.

3.4k855.0k18](/packages/danog-madelineproto)[tempest/framework

The PHP framework that gets out of your way.

2.1k23.1k9](/packages/tempest-framework)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[api-platform/metadata

API Resource-oriented metadata attributes and factories

223.5M96](/packages/api-platform-metadata)

PHPackages © 2026

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