PHPackages                             chialab/rna-cakephp - 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. chialab/rna-cakephp

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

chialab/rna-cakephp
===================

A CakePHP plugin to seamlessly integrate with @chialab/rna build artifacts.

v0.3.0(2y ago)025.4k↓33.3%1MITPHPPHP &gt;=7.4

Since Oct 6Pushed 2y agoCompare

[ Source](https://github.com/chialab/rna-cakephp)[ Packagist](https://packagist.org/packages/chialab/rna-cakephp)[ Docs](https://github.com/chialab/rna-cakephp)[ RSS](/packages/chialab-rna-cakephp/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (9)Dependencies (3)Versions (14)Used By (1)

RNA plugin for CakePHP
======================

[](#rna-plugin-for-cakephp)

A [CakePHP](https://cakephp.org/) plugin to seamlessly integrate with [@chialab/rna](https://github.com/chialab/rna) build artifacts.

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

[](#installation)

You can install this plugin into your CakePHP application using [composer](https://getcomposer.org).

The recommended way to install composer packages is:

```
composer require chialab/rna-cakephp

```

You must load the plugin into your CakePHP application by loading it in your application class `bootstrap` method:

```
class Application extends \Cake\Http\BaseApplication
{
    public function bootstrap(): void
    {
        parent::bootstrap();

        // ...
        $this->addPlugin('Chialab/Rna');
    }
}
```

Usage
-----

[](#usage)

### RNA Helper

[](#rna-helper)

Load the helper in your view class:

```
class View extends \Cake\View\View
{
    public function initialize(): void
    {
        parent::initialize();

        // ...
        $this->loadHelper('Chialab/Rna.Rna');
    }
}
```

Then use it in your templates:

- To inject the code generated by the dev server (only when `debug` is on):

    ```
    {{ Rna.devServer()|raw }}
    {{ Rna.devServer('YourPlugin')|raw }}
    ```
- To load resources:

    ```
    {{ Rna.script('index')|raw }}
    {{ Rna.css('YourPlugin.main')|raw }}
    {{ Rna.script('YourPlugin.main', { type: 'module' })|raw }}
    ```

### Migrate from Symfony Encore

[](#migrate-from-symfony-encore)

Follow this instructions to migrate from a Webpack Encore based configuration:

- Create a `rna.config.js` file in the root of yuor project.
- Define entrypoints

```
/**
 * @param {import('@chialab/rna-config-loader').Config} config
 * @param {import('@chialab/rna-config-loader').Mode} mode
 */
export default function(config, mode) {
    return {
        ...config,
        entrypoints: [
            // Encore.addEntry('section-filters', `./resources/js/section-filters.js`)
            {
                input: [
                    './resources/js/section-filters.js',
                ],
                output: '/webroot/build',
            },
            // Encore.addEntry('app', './resources/js/app.js').addStyleEntry('app-style'', './resources/css/app.css')
            // Encore.script('app') -> Rna.script('app')
            // Encore.css('app-style') -> Rna.css('app')
            {
                input: [
                    './resources/js/app.js',
                    './resources/js/app.css',
                ],
                output: '/webroot/build',
            },
        ],
    };
}
```

- Extend the RNA configuration

```
export default function(config, mode) {
    return {
        ...config,
        entrypoints: [...],
        // Encore.cleanupOutputBeforeBuild()
        clean: true,
        // Encore.enableSourceMaps(!Encore.isProduction())
        minify: mode === 'build',
        sourcemap: mode !== 'build',
        // Encore.enableVersioning(Encore.isProduction())
        entryNames: mode === 'build' ? '[name]-[hash]' : '[name]',
        chunkNames: mode === 'build' ? '[name]-[hash]' : '[name]',
        assetNames: mode === 'build' ? 'assets/[name]-[hash]' : '[name]',
        // Encore.setPublicPath('/webroot/build')
        manifestPath: 'webroot/build/manifest.json',
        entrypointsPath: 'webroot/build/entrypoints.json',
    };
}
```

- Remove `@symfony/webpack-encore`, `webpack` and webpack loaders `

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 52.4% 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 ~64 days

Recently: every ~148 days

Total

11

Last Release

1043d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/00305fda0159b5d71f7bd6848ae7d3f7ac27d0179d79d58c4847848c8bd673e0?d=identicon)[fquffio](/maintainers/fquffio)

![](https://www.gravatar.com/avatar/36a1b89a62185411675b209cd97652abd29a4e98bd3e68cb5e402bee9ae883d6?d=identicon)[le0m](/maintainers/le0m)

![](https://www.gravatar.com/avatar/4bb153a6227d7c6cd124f94c414e63d68cb1b1def8a6fdac75770c495cb8713d?d=identicon)[edoardocavazza](/maintainers/edoardocavazza)

---

Top Contributors

[![fquffio](https://avatars.githubusercontent.com/u/7108146?v=4)](https://github.com/fquffio "fquffio (22 commits)")[![edoardocavazza](https://avatars.githubusercontent.com/u/3907295?v=4)](https://github.com/edoardocavazza "edoardocavazza (20 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/chialab-rna-cakephp/health.svg)

```
[![Health](https://phpackages.com/badges/chialab-rna-cakephp/health.svg)](https://phpackages.com/packages/chialab-rna-cakephp)
```

###  Alternatives

[dereuromark/cakephp-tools

A CakePHP plugin containing lots of useful and reusable tools

338920.1k32](/packages/dereuromark-cakephp-tools)[markstory/asset_compress

An asset compression plugin for CakePHP. Provides file concatenation and a flexible filter system for preprocessing and minification.

3761.0M11](/packages/markstory-asset-compress)[dereuromark/cakephp-shim

A CakePHP plugin to shim applications between major framework versions.

401.0M11](/packages/dereuromark-cakephp-shim)[cakedc/cakephp-phpstan

CakePHP plugin extension for PHPStan.

40676.6k31](/packages/cakedc-cakephp-phpstan)[dereuromark/cakephp-dto

A CakePHP plugin for generating immutable Data Transfer Objects with full type safety

2988.9k3](/packages/dereuromark-cakephp-dto)[dereuromark/cakephp-geo

A CakePHP plugin around geocoding tools and helpers.

51174.9k4](/packages/dereuromark-cakephp-geo)

PHPackages © 2026

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