Today is my "let open source some of my private Github repositories" day, and more specifically, I'm releasing a bunch of code related to documentation. Earlier today, I've released the Sphinx extensions I'm using to generate the Symfony docu... 続きを読む
Pieceの中のSymfony #2: Consoleコンポーネント 第1回 Piece FrameworkのプロダクトのひとつStagehand_TestRunnerは、CLI でユニットテストを実行するための継続的テストランナーです。Stagehand_TestRunner v3の実装には多くのSymfonyコンポーネントが使われて... 続きを読む
Symfony2/Doctrineのドキュメントは基本的に単一カラムを主キーとするテーブルが対象となっていて、複合主キーを持つテーブルに対する説明はかなり少なくて、あったとしてもサラっと流されてしまってる感じですいです。まあ、エラーメッセージでググれば情報は... 続きを読む
イントロダクション¶ このチュートリアルは、 Symfony2 を使用して、いろんな機能を備えたブログサイトの作成方法をガイドします。 Symfony2 フレームワークの標準ディストリビューション(Standard Distribution)を使用します。 Symfony2 の標準ディストリビュ... 続きを読む
この記事を読むのにかかる時間: 約 14分 Symfony2を勉強するにあたり、Symfony2のblogチュートリアルをテストコードを書きながら写経してみました。 blogチュートリアルは入門編ということもあり、コントローラーにロジックが書かれています。blogチュートリア... 続きを読む
Hi everyone! I'm having problems with controllers, that are accessed as a service. What i'm trying to do is basically this: i have a controller (named "DefaultController" in the code samples) that forwards a request to another controller (nam... 続きを読む
どうもこんにちは。小川です。日付変わっちゃいましたが、Symfony2 Advent Calendar JP 2011の5日目です。今回はFormコンポーネントを使いこなす上でぜひ知っておきたいポイントを紹介します。今回紹介するのは次の3つです。 任意のプロパティをフィールドにマ... 続きを読む
Guess what: PHP already has these functions built in! They're called __construct and __destruct. Isn't it great to use PHP's existing functions, and not create custom redundant methods to clutter your classes? The HttpKernel component current... 続きを読む
DIコンテナの定義がすべて読み込まれ使用する準備が整ってから、リクエストの処理が始まるまでの間に、特定のメソッドを呼び出したかったり、手動でDIコンテナの設定をしたい場合ってあると思います。 そんなときはバンドルクラスにboot()メソッドを実装すると... 続きを読む
Symfony Advent Calendar JP 2011 の20日目のエントリーです。今回はSymfony2のRequestクラスについて解説しちゃいます。RequestクラスはSymfony2のHttpFoundationコンポーネントに含まれており、HTTPリクエストに関する情報(リクエストパラメータやヘッダ、セ... 続きを読む
Figured this one out, finally. After user registration, you should have access to an object instanceof whatever you've set as your user entity in your provider configuration. The solution is to create a new token with that user entity and pas... 続きを読む
I recently found on Coil’s blog, here: http://www.strangebuzz.com/post/2012/01/28/Load-fixtures-with-Symfony2 how he went about creating fixtures from Yaml files in Symfony2. This is something that I’ve been willing to have for a while. But... 続きを読む
Symfony2小ネタ。Symfony2 つかってるとページング処理どうしようかってのに KnpLabs が公開してる KnpPaginatorBundle を使うことが多い。KnpPaginatorBundle は 2.0 系から Zend_Paginator に依存しなくなって使いやすくなりましたね。 *1そして、最近特に管... 続きを読む
All Open Source Symfony 2 Bundles sorted by trendIntegration bundle for DoctrineExtensions by l3pp4rd in Symfony2 by stof Last commit 9 days ago + 23 recommendations 続きを読む
最近になってようやくSymfony2を始めました。現在blogチュートリアルを写経中です(MySQLではなくPostgreSQL使ってますが。。。)。で、DBへの接続・CRUDを一通り確認した後、複数DBへの接続を検証してみました。とりあえず、同一ホスト上の別DBですが、接続し分... 続きを読む
Introduction¶ This tutorial will guide you through the process of creating a full featured blogging website using Symfony2. The Standard Distribution of the Symfony2 framework will be used, which includes the main components you will need whe... 続きを読む
In Symfony2 you can use HTTP cache. That's great to cache a page or part of the page. But what if you want to cache a variable? That's where you should use KnpZendCacheBundle. To avoid code duplication we use the well-known Zend Cache compone... 続きを読む
Symfony 2.0.9 released by Fabien Potencier – January 06, 2012 – 0 comments Symfony 2.0.9 has been released earlier than expected to fix some annoying problems in 2.0.8: it comes with Twig 1.5.1, which fixes a regression that made the form_t... 続きを読む
When you start learning Symfony2 using the book, you are introduced to the base controller. The base controller has some helpful methods to make common tasks easier. After a while though you may want to move away from extending this controlle... 続きを読む
How to configure right write permissions for the cache/ and logs/ directories in Symfony 2 One common issue in Symfony 2 projects is that the "app/cache" and "app/logs" directories must be writable both by the web server and the command line ... 続きを読む
symfony2 | 20:29 | 前編の続きです。 前編では下記の認証方法を説明しました。Basic認証 security.ymlで設定されたUser情報によるBasic認証フォーム認証(User情報は固定) security.ymlで設定されたUser情報によるフォーム認証フォーム認証(Doctrineと連携)... 続きを読む
Symfony2 | 18:07 | 最近はもっぱらSymfony2の勉強に明け暮れているので、成果をメモ代わりに説明していこうかと。 今回はSecurityコンポーネントについて説明していきます。Securityコンポーネントでは認証処理を自動で行ってくれます。 各ユーザーには権限(r... 続きを読む
About Me Belgian living in Zürich, Switzerland Weby stuff for 10 years http://seld.be Symfony2 core dev and other OSS contributions http://github.com/Seldaek Works at Nelmio http://nelm.io We do Symfony2 & Frontend Performance consulting ... 続きを読む
Tuesday, October 11, 2011 Integrating Memcached with Symfony2 Overview This is a short tutorial to add Memcached support to your Symfony 2 application. This is actually not a really good way to add caching support to your application as your ... 続きを読む
symfony | 21:04 | 今回はSymfony2でpageを実装する際のやり方のメモとなります。symfony1だとsfPager又はsfDoctrinePager オブジェクトが存在してpager機能を実装してたのですがSymfony2だとそんな機能はコア機能にはないようです。そこでPagerBundleというバ... 続きを読む
crocos/CrocosSecurityBundle - GitHubクロコス で使っている認証管理のバンドルを公開しました。元々SecurityBundleを拡張してFacebookのPHP SDKを使った認証の仕組みとか作っていたのですが、正直複雑すぎて管理してられないので、今後のことを考えてシンプル... 続きを読む
15.08.11 - Extending Twig in Symfony 2, add custom functions Sometimes we need to add some custom functions to the view. In Symfony 1 we have the helpers, in Symfony 2 we must extend Twig in order to add it. At first, we have to connect our f... 続きを読む
Last week, I held a keynote presentation about Symfony2 at the Symfony Day conference in Cologne. Many people asked me for the slides, but they were quite empty and not that useful. This blog post is more or less what I've said during the fir... 続きを読む
My first clearer read on event manager on symfony2 was the following. This article explains how to use the symfony2 even dispatcher to create custom listener and event using the symfony2 event manager component. The blog is very clear and tea... 続きを読む
Symfony2で、Entityにcreated_at/updated_at(作成日時/更新日時)を自動で入れる方法 普通にやるとLifecycle Callbackを使うことになるのですが、こんなの毎回書くのは面倒なので、一発でどうにかしたいです。 Doctrine Extensions(DoctrineExtensionsBundle)... 続きを読む
Doctrine - PHP Object Relational Mapper API documentation generated by ApiGen. 続きを読む
Symfony2のフォームは、かなり使いやすくなっています。 1はModelとの依存が激しくて、凝ったことをしようとすると意味不明になりましたが、2は完全に切り離されており、かつ依存させることも可能になっています。 パッと使う action側 $this->createFormBuilde... 続きを読む
This session will introduce you to the new Form component in Symfony2. With the new domain-driven paradigma and its flexible design, the component opens a door to a wide range of possibilities. The brand new architecture makes creating comple... 続きを読む
Loading… Flash Player 9 (or above) is needed to view presentations. We have detected that you do not have it on your computer. To install it, go here. 続きを読む
Loading… Flash Player 9 (or above) is needed to view presentations. We have detected that you do not have it on your computer. To install it, go here. Symfony2でより良いソフトウェアを作るために - Presentation Transcript 第 4 回 Symfony2 勉強... 続きを読む
In my previous post on interactive generators I explained how simple it is to create doctrine entities and persist them through the Symfony generated CRUD controllers. These interactive generators create the controllers and forms required for... 続きを読む
Spanish or English? When I decided to start my blog adventure, I spent some time wondering if it was better to go for Spanish or English. And I decided to go for Spanish because although there are so many top-level PHP documentation resources... 続きを読む
Loading… Flash Player 9 (or above) is needed to view presentations. We have detected that you do not have it on your computer. To install it, go here. Symfony2のHTTP Cache (Reverse Proxy) - Presentation Transcript Symfony2HTTPキャッシュ @hid... 続きを読む
2011年09月05日18:04 カテゴリPHP Symfony2のススメ1 ~認証とともに~ 株式会社ECナビ傘下のPeXで底辺のプログラマをやってます。高橋と言います。 底辺の実力と引き出しの少なさから何を書こうか道に迷っていたのですが 7/28にPHP5.3対応のフレームワークであ... 続きを読む
Symfony 2.0.1 released by Fabien Potencier – August 26, 2011 – 0 comments Just a month after the Symfony 2.0 release, it's time for the first bug release. Symfony 2.0.1 contains several minor bug fixes, contributed by more than 35 developer... 続きを読む
それっぽくなってきましたw どんなWebアプリケーションフレームワークを使っても、海外製のフレームワークでハマるのが日本語メールですね。 文字化け 長い表題だと文字化け UTF-8じゃないと送れない もうね、いい加減にしろ。いっつもじゃん。こーゆー問題。Sy... 続きを読む
飲料注文アプリケーション¶ 今回作るのはオンラインで飲料を注文するためのアプリケーションです。このアプリケーションは以下のようなページフローを持ちます。 最初のページではページ上から商品と個数を選択します。 2番目のページでは配送先情報を入力しま... 続きを読む
→ The Symfony2 Tutorial you've been looking for − brought to you by the Knp team! With FosUserBundle, FosRestBundle, Doctrine, KnpMenuBundle, PagerFanta, Assetic…The Symfony2 Tutorial & Demo by Knp FOSUserBundle → How to use FOSUserBundle... 続きを読む
Symfony2のSecurityコンポーネントではFirewallという仕組みを用いて認証/認可を行います。Symfony2ではおおまかにいうと次のようなフローで処理が進みます。 Requestオブジェクトの初期化DIコンテナの起動 ルーティングとセッションの初期化 ルーティング情報... 続きを読む
Comprehensive list of Symfony2 Bundles ordered by relevance and integrated with GitHub As for now, 21 Symfony2 Bundles are indexed. View all bundles or search for bundles! Symfony2Bundles is a spontaneous community initiative! Its purpose is ... 続きを読む
あけましておめでとうございます。小川です。 本日はTwigでカスタムタグを追加する方法を紹介します。 ■Twig TwigはPHPで実装されたテンプレートエンジンの1つで、Python製のテンプレートエンジンのJinjaとほぼ同じ構文を持っています。 Webアプリケーションフ... 続きを読む