You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Why??? Well … say you want to run your unit-tests against multiple PHP versions and still enjoy the comfort of your IDE + Xdebug :P How ??? Easy once you know how, but a little fiddly the first time around :) Step 1: Create a Docker Image with your Dependencies As an example I’ll use a typical WordPress unit-test setup here. In my case I wanted to be able to run my Unittests with PHP7, but not hav
remi(Les RPM de Remi - Repository)のrpmパッケージを使います。 http://rpms.famillecollet.com/ epelとremiのリポジトリを追加します。CentOS 6.5 (6系)用です。 # For CentOS 6.5, 6.4, ... % sudo rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm % sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm # For CentOS 7.0 $ sudo rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/7/
Getting started with Doctrine2 Doctrine2 Installation Define the following requirement in your composer.json file: Then call composer install from your command line. For more details consult Doctrine2 documentation or Composer documentation. Doctrine2 configuration Class loading Autoloading is taken care of by Composer. You just have to include the composer autoload file in your project:
Composer installation without github.com (nor packagist) dependency - like a boss ! First a thought about github, composer, packagist : we like / adore / thanks the contributors, for those great services and all the open source people dropping great software on it. That said, picture yourself operating an online PHP service, generating hundreds euros per hour (cool isn’t it ?). If you use Symfony2
capistrano-laravel-deploy.rb P��U P �U # config valid only for Capistrano 3.1 lock '3.1.0' set :application, "" # EDIT your app name set :scm, :git set :repo_url, "" # EDIT your git repository set :keep_releases, 3 set :use_sudo, false set :ssh_options, { keys: %w(~/.ssh/id_rsa) } namespace :environment do desc "Copy Environment Variables" task :sync do on roles(:app), in: :sequence, wait: 5 do ex
A common layer What do we want? Re-use at the web layer! Superglobals and side-effecting output mechanisms of PHP make this challenging and force every framework to re-invent. But Symfony's HttpKernelInterface provides a solid interface, which makes creating and sharing framework-agnostic HTTP filters a breeze!
前回ServiceControllerServiceProviderで、ちゃんとコントローラの読み込み遅延されるね。という確認をしたので今回はサービスの読み込みもちゃんと遅延するね。という確認をします。 コードはmatsu-chara/SilexLazyControlerLoadSample2 · GitHubに有ります。 前回に引き続きコントローラサービスの登録などが面倒なのでAPIのひな形としてsilex-simple-restを使用してます。 調べ方 前回と同じくdummy, dummy2, api/v1/dummy, api/v1/dummy2というURLを持つ4つのAPIを用意。全部("dummy" or "dummy2"という文字列を返すだけのAPI) 今回は、 dummy, api/v1/dummyのコントローラクラスをインスタンス化するときにそれぞれbaseService、
Home > Laravel | PHP | PhpStorm | Vagrant > PhpStorm から Vagrant VM の PHP アプリケーションをリモートデバッグする(Web & CLI) PhpStorm から Vagrant で構築した VM の PHP アプリケーションをリモートデバッグする方法です。Web アプリケーションだけでなく、CLI アプリケーションでもリモートデバッグできるように設定していきます。 VM スペック 192.168.33.41 を private network で設定 PHP + Xdebug がインストール済み ホストと VM は、synced folder でディレクトリを共有(/path/to/src -> /share) 0. Xdebug によるリモートデバッグの仕組み リモートデバッグを設定する前に PhpStorm と Xd
PHPメンターズ道場生 kumamidori です。 PHPのエキスパートとして世界的に知られている方の1人に、Paul M. Jonesさんがいらっしゃいます。 フレームワーク「Aura for PHP」のリードであり、PHP-FIGの策定メンバーに入られている方です。 通称 pmjones さんのブログで、昨年末、DIに関する下記エントリがありました。 「Quicker, Easier, More Seductive: How To Tell A DI Container From A Service Locator」 興味深い内容のようだったので、翻訳しました。翻訳記事の公開について、著者ご本人から快諾頂けたため、掲載させて頂きます。 本文中にあるとおり、この記事に対する訂正として、「Quicker, Easier, More Seductive: Names, Usage, and
MacのMAMPで使っているPHPを5.5に変更したらキャッシュが効いてプログラムの変更が即、反映されないという症状が発生しました。 調べてみると PHP 5.5 から OPcache というネイティブキャッシュがデフォルトで有効に成っている為に発生したみたいです。 詳しくはこちらのスライドの5ページ目を参照。 自分がインストールしたのが5.5.3だったので /Applications/MAMP/bin/php/php5.5.3/conf/php.ini を開き、 opcache.enable_cli=0 に変更し、その次の行に opcache.enable=0 を追加し(※)、Apacheを再起動するとちゃんと即、反映される様に ※デフォルト有効なため、デフォルトだと php.ini に記述が無いみたいです。 【最終的な[OPcache]の設定】 [OPcache] zend_exten
Domain Driven Design also known as DDD is an approach to develop software for complex needs by connecting the implementation to an evolving model. It is a way of thinking and a set of priorities, aimed at accelerating software projects that have to deal with complicated domains. It is possible to use this approach in a Symfony2 project, and that is what I am going to introduce in a series of blog
PHPのextensionにはPHP extensionとZend extensionという2種類があります。これらの違いが何なのか、PHPの実装レベルから調べてみました。 PHPのextensionについて PHPのextensionには2種類が存在します。これらは次のようにphp.iniでロード指定する構文が異なります。 extension=extension.so zend_extension=/path/to/extension.so 本稿では「extension=」でロードされるものをPHP extension、「zend_extension=」でロードされるものをZend extensionと呼びます。これらはPHPのソースコード中ではそれぞれmoduleとextensionと呼ばれているので注意してください。 代表的なZend extensionとしてはXdebugとZend
(2016/8/9)PHP7やHomebrewの現状に合わせるため細かい点を修正しました。 ついにPHP 5.5.0がリリースされましたね!これに関連して、php-buildを使ってPHP 5.3/5.4/5.5の3バージョンのPHP-FPM環境を用意する方法を紹介します。 この記事は「phpenv + php-build を使って 5.3 と 5.4 を共存させつつ php-fpm を使う - 肉とご飯と甘いもの @ sotarok」のアップデートのような内容になっています。ありがとうsotarok! PHP-FPMとは PHP-FPMはPHPのSAPI実装の一つで、単体で動作するアプリケーションサーバです。Apacheなしで動くので、気軽に扱えたりします。あまりうまく説明できないので、詳しくはPHP-FPM本家サイトあたりを見てください。 phpenv+php-buildのセットアップ
今回は、前回ComposerとPackagistでPHPライブラリを開発、テスト、公開する(1/2)で作成したライブラリをPackagistに公開します。 Packagistって PackagistはComposerのメインリポジトリとなるサイトです。 ここで公開しておくことでcompser.jsonにリポジトリの指定をしなくてもライブラリを取得できるようになります。 ライブラリのGit管理 Packagistでの公開する場合は、ライブラリをGit管理しましょう。 .gitignoreの準備 以下の内容で.gitignoreを作成しておきます。 .gitignore vendor/ composer.lock composer.phar 資産のコミットとタグ付け ライブラリが公開できるようになったら、資産をコミットします。 このとき、タグも一緒につけてください。このタグがバージョン番号とし
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く