symblog 2章まで

先日 Symfony勉強会 #6 に参加してきました。


そこで、 Symblog (本家) (和訳) というものを学んだので少し進めてみます。

始める前に

git リポジトリ

進めるに当たり VCS でコードは管理したいところ。こちらのページ(git 上で、Symfony2 プロジェクトを作成し、管理する方法) に手順の記載がありますが、やや古く、注意が必要です。


本家サイトを見ると分かりますが、 .gitignore は以下の記載が必要です。

/web/bundles/
/app/bootstrap*
/app/cache/*
/app/logs/*
/vendor/
/app/config/parameters.ini
AcmeDemoBundleの削除

AcmeDemoBundleはデモ用なので、利用時は削除しましょう。


Symfony スタンダード・エディション がわかり易いかもしれませんが、以下の内容も参考になるやもしれません。(ただし、セキュリティの設定を切ることになる(あまりわかっていない)ので注意は必要なのかな?)

Remove from appKernel any reference to "security": SecurityBundle, and
SecurityExtraBundle,

Also, comment out/remove reference to JMS in config.yml (The lasts lines of
the file) and of course
comment out/remove the import of security.yml in the same file at the
begining.

Clear the cache, and bingo, there you have.

http://groups.google.com/group/symfony-users/browse_thread/thread/e143be8e22a33584?fwc=1&pli=1

第 2章

SwiftMailer の gmail への設定

手元の環境では以下の設定の追記が必要でした。


app/config/parameters.ini

[parameters]
    ...
    mailer_port=587
    mailer_encryption="tls"
    mailer_auth_mode="login"
    ...


app/config/config.yml

...
swiftmailer:
    ...
    port:       %mailer_port%
    encryption: %mailer_encryption%
    auth_mode:  %mailer_auth_mode%
    ...


まあ、ひとまずこんな感じ。