PHPackages                             issei/multiple-apps-support - 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. issei/multiple-apps-support

ActiveLibrary

issei/multiple-apps-support
===========================

59392[1 issues](https://github.com/issei-m/multiple-apps-support/issues)PHP

Since Jul 16Pushed 12y ago1 watchersCompare

[ Source](https://github.com/issei-m/multiple-apps-support)[ Packagist](https://packagist.org/packages/issei/multiple-apps-support)[ RSS](/packages/issei-multiple-apps-support/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Symfony Multiple Applications Support
=====================================

[](#symfony-multiple-applications-support)

複数アプリケーションを運用する Symfony2 Standard Edition プロジェクト（[詳しくはこちら](#symfony-standard-edition-%E3%81%A7%E8%A4%87%E6%95%B0%E3%82%A2%E3%83%97%E3%83%AA%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%82%92%E9%81%8B%E7%94%A8%E3%81%99%E3%82%8B)）のコマンド実行を補助します。
例えば`cache:clear`等のコマンドを、すべてのアプリケーション上で順次実行する事ができます。

使い方
---

[](#使い方)

Composer でインストールします。

```
$ php composer.phar require issei/multiple-apps-support:dev-master

```

`bin`ディレクトリに`console`と言う共通コンソールが生成されます。
現在、`cache:clear`,`assets:install`,`assetic:dump`の3つをサポートしています。

cache:clear
-----------

[](#cacheclear)

```
$ bin/console cache:clear --no-warmup --env=prod
> Excuting command on frontend...
> Clearing the cache for the prod environment with debug false
> Excuting command on api...
> Clearing the cache for the prod environment with debug false

```

すべて同じ引数＆オプションで実行されます。

assets:install
--------------

[](#assetsinstall)

```
$ bin/console assets:install --symlink
> Excuting command on frontend...
> Installing assets using the symlink option
> Installing assets for Symfony\Bundle\FrameworkBundle into web/frontend/bundles/framework
> Excuting command on api...
> Installing assets using the symlink option
> Installing assets for Symfony\Bundle\FrameworkBundle into web/api/bundles/framework

```

第1引数（デフォルト：web）に`/%kernel.name%`が付与されます。オプションは共通の物が使用されます。
※`-watch`,`--force`,`--perod`オプションは使用できません。

assetic:dump
------------

[](#asseticdump)

```
$ bin/console assetic:install --env=prod --no-debug web
> Excuting command on frontend...
> Dumping all prod assets.
> Debug mode is off.
>
> xx:xx:xx [file+] $(PROJECT_ROOT)/apps/frontend/../../web/frontend/css/xxxxxx.css
> xx:xx:xx [file+] $(PROJECT_ROOT)/apps/frontend/../../web/frontend/js/xxxxxx.js
> Excuting command on api...
> Dumping all prod assets.
> Debug mode is off.
>
> xx:xx:xx [file+] $(PROJECT_ROOT)/apps/api/../../web/api/css/xxxxxx.css
> xx:xx:xx [file+] $(PROJECT_ROOT)/apps/api/../../web/api/js/xxxxxx.js

```

第1引数（デフォルト：%assetic.write\_to%）が指定された場合のみ、`/%kernel.name%`が付与されます。オプションは共通の物が使用されます。

Symfony Standard Edition で複数アプリケーションを運用する
-----------------------------------------

[](#symfony-standard-edition-で複数アプリケーションを運用する)

```
PROJECT ROOT
|
+---apps
