PHP Framework 最新バージョン使ってみた LT 発表資料 http://connpass.com/event/16016/
$BLF1)1ΞϓϦέʔγϣϯͷ࡞Γํ͜Ε·Ͱͱɺ͜Ε͔Β1)1'SBNFXPSL࠷৽όʔδϣϯͬͯΈͨ-5CZ!TJ[VIJLP
View Slide
,FOJDIJSP,JTIJEB5PLZP +"1"/TJ[VIJLP!HNBJMDPN !TJ[VIJLPIUUQTHJUIVCDPNTJ[VIJLPIUUQCMPHPQFOUPLZPKQ +1POMZ
.BZ
20DU
͜Ε·Ͱ• XAMPPMAMPPɺvagrant• μϯϩʔυͯ͠ΠϯετʔϧComposerΛ͏ʹΧελϚΠζ͕ඞཁ• BakeͰܗΛੜ• Console/cake͔ΒCLIΛ࣮ߦ• ComposerͰґଘؔΛղܾ• ϓϥάΠϯҎ֎ͷύοέʔδ͕͍͍
$BLF1)1CakePHP2AppCakeCLICakePHP2CoreVendorPackageWebServerCakePHP2Plugin
.BS
$BLF1)1CakePHP3AppPHPCLICakePHP3CoreVendorPackageWebServerCakePHP3Plugin
͜Ε͔Β• CakeboxͰָʑڥߏங• migrationͱDebugKit͕ॳظಋೖ• BakeͰܗΛੜ• Composerͷར༻͕ඞਢ• PSR-4ରԠͰͲ͔͜ΒͰCakePHPΛݺͼग़͠Մೳʹ
ڥߏஙhttps://github.com/alt3/cakebox
# ڥߏஙgit clone https://github.com/alt3/cakebox.gitcd cakeboxcp Cakebox.yaml.default Cakebox.yamlvagrant up# ৽نΞϓϦέʔγϣϯੜvagrant sshcakebox application add ΞϓϦ໊# طଘΞϓϦέʔγϣϯΠϯετʔϧcakebox application add ΞϓϦ໊ \--source https://github.com/hoge.git \--webroot /var/www/application/hogehttp://blog.open.tokyo.jp/2015/04/19/cakebox-is-awesome.html
# ςετ࣮ߦphpunit# Behat࣮ߦvendor/bin/behat
{"name": "cakephp/app","type": "project","license": "MIT","require": {"php": ">=5.4.16","cakephp/cakephp": "3.0.*-dev","mobiledetect/mobiledetectlib": "2.*","cakephp/migrations": "dev-master","cakephp/plugin-installer": "*"},"require-dev": {"d11wtq/boris": "1.0.*","cakephp/debug_kit": "3.0.*-dev","cakephp/bake": "dev-master"},"suggest": {"phpunit/phpunit": "Allows automated tests to be run without system-wide install.","cakephp/cakephp-codesniffer": "Allows to check the code against the coding standards used in CakePHP."},"autoload": {"psr-4": {"App\\": "src"}},"autoload-dev": {"psr-4": {"App\\Test\\": "tests","Cake\\Test\\": "./vendor/cakephp/cakephp/tests"}},"scripts": {"post-install-cmd": "App\\Console\\Installer::postInstall","post-autoload-dump": "Cake\\Composer\\Installer\\PluginInstaller::postAutoloadDump"},"minimum-stability": "dev","prefer-stable": true}
"require": {"php": ">=5.4.16","cakephp/cakephp": "~3.0","mobiledetect/mobiledetectlib": "2.*","cakephp/migrations": "~1.0","cakephp/plugin-installer": "*"},"require-dev": {"psy/psysh": "@stable","cakephp/debug_kit": "~3.0","cakephp/bake": "~1.0"},
"autoload": {"psr-4": {"App\\": "src"}},"autoload-dev": {"psr-4": {"App\\Test\\": "tests","Cake\\Test\\": "./vendor/cakephp/cakephp/tests"}},
03.
XxTableCakePHP3CoreXxEntityAppIteratorarray$BLFͱͷޓੑ
ΧελϜϑΝΠϯμʔ• find(“groupByUserId”)• findGroupByUserId() ͱ͍͏ϝιουΛXxxTableΫϥεʹ࣮͢Δ• find(“age”, [30, 40])->find(“groupByUserId”) ͷΑ͏ʹϝιουνΣΠϯՄೳ
·ͩෆ҆ͩ
$BLF1)1&OUJUZ1MVHJOhttps://github.com/josegonzalez/cakephp-entity
$BLF1)1&OUJUZ• CakePHP2ͰCakePHP3෩ʹTableͱEntityΛ͑Δ• কདྷతͳCakePHP3ͷҠߦΛ༰қʹ• ΧελϜϑΝΠϯμʔͳͲͷػೳͳ͍
Mark Story - CakePHP 3.0.0 and beyond (Conference)Slides: http://www.slideshare.net/markstory/cakephp-30-and-beyond
WJTJUNZCMPHHJUIVChttps://github.com/sizuhiko5IBOLZPVhttp://blog.open.tokyo.jp