Share
Embed
CakePHPの進化から読み解く、PHPフレームワークの"今"っぽさ/phperkaigi-2020
PHPerKaigi2020での発表資料です(※配布用に改訂しています)
https://fortee.jp/phperkaigi-2020/proposal/ef0682ab-08b3-4129-ac1f-41b22c40021a
hideki kinjyo PRO
February 10, 2020
Transcript
106 slides
-
「配布版」です © - BASE, Inc. • PHPerKaigi2020Ͱར༻ͨ͠εϥΠυΛ վగͨ͠ͷͰ͢ • ҎԼͷมߋ͕ߦΘΕ͍ͯ·͢
• Ұ෦ͷදهͷमਖ਼ • τʔΫ࣌ʹεΩοϓͨ͠༰ͷࠩ͠ࠐΈ • appendixͷՃ ➡PDFΛDLͨ͠ΒϦϯΫΛ։͚·͢ʂ -
© - BASE, Inc. ⾃⼰紹介 • ۚलथ / ͖Μ͡ΐ͏ͻͰ͖ •
GitHub: @o0h / Twitter: @o0h_ • BASE, Inc. (2019.10) / ج൫νʔϜ • ex Connehito Inc.(2015.04-) • ͖ͳFWCakePHP • ΞΠίϯ ඒຯ͍͠ࡪࢠကͷࣸਅͰ͢ -
© - BASE, Inc. ຊτʔΫɺൃදऀࣗͷݸਓతͳܦݧɾओ؍Λجʹͨ͠ߟ͔ΒΓཱ͍ͬͯ·͢ɻ ͥͻօ༷ͷߟ͑ඒֶΛڭ͑ͯԼ͍͞ɻ ͋Δ͍ɺ͜͜ʹډΔօ༷͕Կ͔Λߟ͑ͯΈΔΩοΧέʹͳͬͨΒ͍Ͱ͢ɻ Attention! PHPerKaigiを「偉いひとが⼀⽅的に何 かを教えてあげる場」ではなく、「エ
ンジニア同⼠で知⾒を共有しあうコ ミュニケーションの場」として設計し たい、という想い (ʮPHPerKaigi 2020 εϐʔΧʔͷΈͳ͞·ͷ͝ҊʯΑΓ) -
このトークで話したいこと © - BASE, Inc. • PHPͱͦΕΛऔΓר͘ڥɺͲ͏มΘͬ ͖͔ͯͨ • ͦΕʹ͋ΘͤͯɺCakePHPͲ͏มΘͬͯ
͖͔ͨ –CakePHP: ໊ͷߴ͍&ྺ࢙ͷ͍PHPFWͷ1 ͭͱͯ͠ • ʮ͜Ε͔Βʯʹ͖߹͏FWͷࡏΓํͱ -
このトークの対象者 © - BASE, Inc. • ʮϞμϯͬͯ͞ԿͩʁʯΛߟ͑ͯΈͨ͜ ͱͷ͋Δਓ • (ग़དྷΕCakePHP2
or 3Λར༻ͨ͜͠ͱ ͕͋ΔਓͩͱɺΑΓຯΘ͍ਂ͍͔) –৮ͬͨ͜ͱແ͍ਓͰຊےͷཧղʹͳ͍ Ͱ͢ʂ -
© - BASE, Inc. おしながき PHPと”今っぽさ”のアップデート “今っぽさ”とは何か? && なぜ変化するのか FWはどのように”今っぽさ”を⼿に⼊れるか
〜CakePHPの「今」と「未来」を例に〜 -
© - BASE, Inc. おしながき PHPと”今っぽさ”のアップデート “今っぽさ”とは何か? && なぜ変化するのか FWはどのように”今っぽさ”を⼿に⼊れるか
〜CakePHPの「今」と「未来」を例に〜 -
レガシーコード? © - BASE, Inc. ͜ΕΒͷߟ͑ํͷࠜఈʹ ίʔυͷण໋ͷ؍͕ڞ௨͍ͯͦ͠͏ • Γ͍͢(ͬͨ) VS
ٱ͕͍ • ϦʔμϏϦςΟɺςελϏϦςΟɺ ϦϑΝΫλϏϦςΟɺϙʔλϏϦςΟ -
コードの寿命? © - BASE, Inc. • զʑʮ͘ੜ͖ΒΕΔίʔυʯ͕ཉ͍͠ • ʮੜ͖ΔʯͱʮͪΌΜͱಈ͘ʯ –ಈ࡞͢Δ(ϓϩάϥϜͱͯ͠ಈ͔ͤΔ)
–อकվम͕Մೳ(ϓϩδΣΫτͱͯ͠ಈ͔ ͤΔ) -
“時代遅れ”、“現在”、 “未来” © - BASE, Inc. • ϨΨγʔίʔυͱ”ࠓͬΆ͍”ίʔυ (গͳ͔Βͣ)ٯͷํੑʹ͋Δͣ •
ϨΨγʔ͕ʮΔʯํͷ࡞༻ͳΒ ͦͷٯͷ“ࠓͬΆ͞”ͱɺଈͪࡎ • “ࠓͬΆ͞” = “ະདྷࢤͷ”ίʔυ -
モダンでやっていくとは © - BASE, Inc. “ࠓͬΆ͍”(=Ϟμϯͳ)ίʔυͱ • NOT: ৽ػೳΛΓࠐΜͩ •
IS: ະདྷ͍ͭͯߦ͚Δɾ४උ͕Ͱ͖͍ͯΔ ͷ͜ͱΛࢦ͢ͷͰʁ -
モダンでやっていくとは © - BASE, Inc. “ࠓͬΆ͍”(=Ϟμϯͳ)ίʔυͱ • NOT: ৽ػೳΛΓࠐΜͩ •
IS: ະདྷ͍ͭͯߦ͚Δɾ४උ͕Ͱ͖͍ͯΔ ͷ͜ͱΛࢦ͢ͷͰʁ ຊτʔΫͷ ओுͷࠎࢠʹͯ͠࠷େͷओ؍ -
進化: ⽅向づけと推進⼒ © - BASE, Inc. • ιϑτΣΞͳͥਐԽ͢Δͷ͔ʁ –ϦʔϚϯͷ๏ଇ: ʮΘΕ͍ͯΔؒมԽ͠ଓ
͚Δʯ • ར༻ऀ͔Βͷʮ৽ػೳʯͷχʔζ͕͋ Δ͜ͱ͕ɺਐԽͷݯઘ APPENDIX - Programs, Life Cycles, and Laws of Software Evolution http://citeseerx.ist.psu.edu/viewdoc/ download?doi=10.1.1.116.3108&rep=rep1&type=pdf - ιϑτΣΞอकͷ๏ଇʢϦʔϚϯͷ๏ଇʣɺ͝ଘͰ͔͢ʁɿ࡚म࢘ͷʮͲ͏͔ͬͯΔͷʁʯɿΦϧλφςΟϒɾϒϩά https://blogs.itmedia.co.jp/morisaki/2012/04/post-7e5d.html -
PHP as software © - BASE, Inc. • ͦͦʮPHPʯ1ͭͷιϑτΣΞ –ͭ·ΓFWΞϓϦέʔγϣϯͱ
ಉ͡ཧ۶͕എܠʹ͋ΓɺਐԽ͠ଓ͚͍ͯΔ • Ϣʔβʔ(=PHPίϛϡχςΟ)ͷ ϑΟʔυόοΫΛ࣮ݱ͢Δ͜ͱͰਐԽ -
“今っぽさ”とは何か? && なぜ変化するのか © - BASE, Inc. • ϨΨγʔ –อकɾมߋ͕͍͠ͷ͕ʮϨΨγʔʯ
–݁Ռͱͯ͠ʮഊʯ͕ੜ͡ɺण໋͕ॖ·Δ • Ϟμϯ͞ –ϨΨγʔԽʹର͢Δࡎతͳཁૉͷ1ͭ • ৽ػೳ –ʮมߋʹڧ͍ίʔυʯΛॻͨ͘Ί ʮ৽͍͠ػೳॻ͖ํʯΛऔΓೖΕΔ -
© - BASE, Inc. おしながき PHPと”今っぽさ”のアップデート “今っぽさ”とは何か? && なぜ変化するのか FWはどのように”今っぽさ”を⼿に⼊れるか
〜CakePHPの「今」と「未来」を例に〜 -
© - BASE, Inc. おしながき PHPと”今っぽさ”のアップデート “今っぽさ”とは何か? && なぜ変化するのか FWはどのように”今っぽさ”を⼿に⼊れるか
〜CakePHPの「今」と「未来」を例に〜 -
“今っぽさ”を作るもの © - BASE, Inc. • ιϑτΣΞΛࢧ͑Δͷʁ –ڥ • ex:
ΫϥυɺετϨʔδɺCPU –ݴޠ • ex: ϝδϟʔόʔδϣϯΞοϓ –ίϛϡχςΟ • ex: ύοέʔδϚωʔδϟɺςετϑϨʔϜϫʔΫ -
“今っぽさ”を作るもの © - BASE, Inc. • ڥ ⁵ ݴޠ ⁵
ίϛϡχςΟ • ͜ΕΒ૬ޓతͳӨڹΛٴ΅͠ͳ͕Βɺ ʮԿΛ͖͔͢ʯͱ͍͏ྗ͕ಇ͘ ➡ ਐԽΛଅਐ͢Δʮཁٻʯ -
© - BASE, Inc. ※ίίͰશͯͷػೳมߋʹ৮Ε·ͤΜɻ ʮ࠷ۙͷPHPͷྺ࢙ʯʹ͍ͭͯΓ͍ͨํ ଞʹࢀߟʹͳΔࢿྉ͕͋ΔͷͰͦͪΒΛɻ PHPԿΛࣺͯɺͲΜͳྗΛखʹೖΕ͖ͯͨͷ͔ #phpcon
https://www.pixiv.net/fanbox/creator/105589/post/691574 pmjones/php-history: A list of the years-of-introductions of notable (to me) PHP framework and library projects. https://github.com/pmjones/php-history -
PHPの歴史のおさらい © - BASE, Inc. • CakePHP1 • PHP 4.4
/ 5.0 / 5.1 • Ruby On Rails 1.0 -
PHPの歴史のおさらい © - BASE, Inc. • CakePHP1 • PHP 4.4
/ 5.0 / 5.1 • Ruby On Rails 1.0 PHP4ϕʔε -
PHPの歴史のおさらい © - BASE, Inc. • CakePHP1 • PHP 4.4
/ 5.0 / 5.1 • Ruby On Rails 1.0 4ܥ࠷ޙͷϚΠφʔόʔδϣϯ APPENDIX - PHP: PHP ͷྺ࢙ͱؔ࿈͢ΔϓϩδΣΫτ - Manual (※PHP5·Ͱͷ͋Β·͠) https://www.php.net/manual/ja/history.php -
PHPの歴史のおさらい © - BASE, Inc. • CakePHP1 • PHP 4.4
/ 5.0 / 5.1 • Ruby On Rails 1.0 ɾɾׂѪʂ -
PHPの歴史のおさらい © - BASE, Inc. • CakePHP1 • PHP 4.4
/ 5.0 / 5.1 • Ruby On Rails 1.0 spl_autoload_register()ͷՃ -
PHPの歴史のおさらい © - BASE, Inc. • PHP5.3 • PHP Standards
Group • GitHub -
PHPの歴史のおさらい © - BASE, Inc. • PHP5.3 • PHP Standards
Group • GitHub ໊લۭؒͷαϙʔτ -
PHPの歴史のおさらい © - BASE, Inc. • PHP5.3 • PHP Standards
Group • GitHub ͦΕΛड͚ͯू·ͬͨͷ͕ “Standards Group” (PHP-FIGͷલ) APPENDIX - PHP Standards and Best Practices for PHP 5.3+ Frameworks and Libraries https://news-web.php.net/php.standards/2 -
PHPの歴史のおさらい © - BASE, Inc. • PHP5.3 • PHP Standards
Group • GitHub ͦͷଞʹॏཁͳػೳՃଟɻ ॳͷʮ࠷ޙͷPHP5ʯɻ -
PHPの歴史のおさらい © - BASE, Inc. • PHP6ͷஅ೦ • ॻ੶ʮύʔϑΣΫτPHPʯൃച
• HipHop(=> HHVM/Hack) • RFC: SplClassLoader (PSR-0) APPENDIX - ຊʹ݁ߏύʔϑΣΫτͰͨ͠ – ॻධʮύʔϑΣΫτPHPʯ | ΤϯδχΞϒϩά | GREE Engineering https://labs.gree.jp/blog/ 2010/11/1978/ - appendix: ถFacebookɺPHPίʔυΛC++ίʔυʹมͯ͠ߴʹ࣮ߦ͢ΔʮHipHop for PHPʯൃද | OSDN Magazine https:// -
PHPの歴史のおさらい © - BASE, Inc. • PHP6ͷஅ೦ • ॻ੶ʮύʔϑΣΫτPHPʯൃച
• HipHop(=> HHVM/Hack) • RFC: SplClassLoader (PSR-0) ࠾ͳΒͣɻ ҎޙɺStandards Groupͱͯ͠ RFCΛग़͍ͯ͠ͳ͍ APPENDIX - PHP: rfc:splclassloader https://wiki.php.net/rfc/splclassloader -
PHPの歴史のおさらい © - BASE, Inc. • CakePHP2 • Laravel1
• PHP-FIG • Composer + Packagist(։ൃ։࢝) -
PHPの歴史のおさらい © - BASE, Inc. • CakePHP2 • Laravel1
• PHP-FIG • Composer + Packagist(։ൃ։࢝) PHP5.2.6+Λαϙʔτ (4.xΛΓࣺͯ) -
PHPの歴史のおさらい © - BASE, Inc. • CakePHP2 • Laravel1
• PHP-FIG • Composer + Packagist(։ൃ։࢝) PHPͷ“Standards”Ͱͳ͘ “Frameworks”ͷͨΊͷ৫ɻ ಉதʹPSR-1/2/3Λࡦఆ APPENDIX - The Past, Present and Future of the PHP-FIG — SitePoint https://www.sitepoint.com/the-past-present-and-future-of-the-php-fig/ -
PHPの歴史のおさらい © - BASE, Inc. • CakePHP2 • Laravel1
• PHP-FIG • Composer + Packagist(։ൃ։࢝) ࣮؍Ͱɺ namespace & SPL AutoloadΛར ༻͠PSR-0ʹ४ڌͨ͠ϑϨʔϜ ϫʔΫɻ APPENDIX - Composer: Part 1 – What & Why | Nelmio Blog http://blog.nelm.io/2011/12/composer-part-1-what-why/ -
PHPの歴史のおさらい © - BASE, Inc. • CakePHP2 • Laravel1
• PHP-FIG • Composer + Packagist(։ൃ։࢝) ΤίγεςϜͱͯ͠ɺ (PEARͷ)தԝूݖతͳཧ͔Β ͷ٫ -
PHPの歴史のおさらい © - BASE, Inc. • PHP5.4 •
PHP5.5 • PHP5.6 • PHP-Parser v1.0.0 APPENDIX - Release PHP-Parser 1.0.0 · nikic/PHP-Parser https://github.com/nikic/PHP-Parser/releases/tag/v1.0.0 -
PHPの歴史のおさらい © - BASE, Inc. • PHP5.4 •
PHP5.5 • PHP5.6 • PHP-Parser v1.0.0 trait ྻͷॖߏจ APPENDIX - PHP: ৽ػೳ - Manual https://www.php.net/manual/ja/migration54.new-features.php -
PHPの歴史のおさらい © - BASE, Inc. • PHP5.4 •
PHP5.5 • PHP5.6 • PHP-Parser v1.0.0 generator finally APPENDIX - PHP: ৽ػೳ - Manual https://www.php.net/manual/ja/migration55.new-features.php -
PHPの歴史のおさらい © - BASE, Inc. • PHP5.4 •
PHP5.5 • PHP5.6 • PHP-Parser v1.0.0 const, funcuseͰͷΠϯϙʔτՄೳʹ APPENDIX - PHP: ৽ػೳ - Manual https://www.php.net/manual/ja/migration56.new-features.php -
PHPの歴史のおさらい © - BASE, Inc. • CakePHP3 • PHP7
• Phan 0.1 APPENDIX - Release Initial release 0.1 · phan/phan https://github.com/phan/phan/releases/tag/0.1 -
PHPの歴史のおさらい © - BASE, Inc. • CakePHP3 • PHP7
• Phan 0.1 PHP5.4.16+Λαϙʔτ -
PHPの歴史のおさらい © - BASE, Inc. • CakePHP3 • PHP7
• Phan 0.1 εΧϥʔܕએݴ Γͷܕએݴ Expectation / assert APPENDIX - PHP: ৽ػೳ - Manual https://www.php.net/manual/ja/migration70.new-features.php -
PHPの歴史のおさらい © - BASE, Inc. • PHP7.1 • PHPStan
0.1 • PHP7.2 APPENDIX - PHPStan: Find Bugs In Your Code Without Writing Tests! https://medium.com/@ondrejmirtes/phpstan-2939cd0ad0e3 -
PHPの歴史のおさらい © - BASE, Inc. • PHP7.1 • PHPStan
0.1 • PHP7.2 nullableܕએݴ voidؔ iterable ٖࣅܕ ෳྫ֎ͷ catch APPENDIX - PHP: ৽ػೳ - Manual https://www.php.net/manual/ja/migration71.new-features.php -
PHPの歴史のおさらい © - BASE, Inc. • PHP7.1 • PHPStan
0.1 • PHP7.2 நϝιουͷΦʔόʔϥΠυ ύϥϝʔλͷܕͷ֦େม objectܕએݴ APPENDIX - PHP: ৽ػೳ - Manual https://www.php.net/manual/ja/migration72.new-features.php -
PHPの歴史のおさらい © - BASE, Inc. • PHP7.3 •
PHP7.4 • CakePHP4 -
PHPの歴史のおさらい © - BASE, Inc. • PHP7.3 •
PHP7.4 • CakePHP4 PHP7.2+Λαϙʔτ APPENDIX - Raise minimum version of PHP to 7.2 for 4.0 · Issue #13103 https://github.com/cakephp/cakephp/issues/13103 -
PHP .x後半〜5.x前半時代の進化 © - BASE, Inc. • ʙ2008 / ʙPHP5.2
• Ruby on Railsͷొ࣌ظɺϑϧελοΫ FWͷོ • CakePHP, Symfony, Zend Framework, Yii • ʮ1ͭͷFWͰ্ख͘Γ͍ͨʯงғؾʁ -
PHP .x後半時代の進化 © - BASE, Inc. • ʙ2014 / ʙPHP5.6
• ໊લۭؒͷಋೖͱComposerͷొ • PHP-FIG =ʮFWؒͷ૬ޓӡ༻ੑʯ • ʮෳϞδϡʔϧΛखܰʹѻ͍͍ͨʯง ғؾʁ -
PHP . 以降 © - BASE, Inc. • 2016ʙ /
PHP7.0+ • ܕએݴɾExpectationͷಋೖ • ੩తղੳπʔϧͷΓ্͕Γ • ʮPHPͰݻ͘ॻ͖͍ͨʯงғؾʁ -
PHPと”今っぽさ”のアップデート © - BASE, Inc. • “ࠓͬΆ͞”࣌ʹΑͬͯมԽ͍ͯ͠Δ • ʮେ͖ͳFWʯ͚ͩͰखͷಧ͔ͳ͍෦ͷ ։ൃޮɾ࣭ٻΊΒΕΔΑ͏ʹ
• ͦΕΛ͏Α͏ʹʮݎ࿚͞ʯॏࢹ͞Ε ΔΑ͏ʹ APPENDIX - @phpc ʮWhat are the top three things you consider to have been the most important developments in PHP or its community in the 2010s?ʯ / Twitter https://twitter.com/phpc/status/1222979830939115521 -
© - BASE, Inc. おしながき PHPと”今っぽさ”のアップデート “今っぽさ”とは何か? && なぜ変化するのか FWはどのように”今っぽさ”を⼿に⼊れるか
〜CakePHPの「今」と「未来」を例に〜 -
© - BASE, Inc. おしながき PHPと”今っぽさ”のアップデート “今っぽさ”とは何か? && なぜ変化するのか FWはどのように”今っぽさ”を⼿に⼊れるか
〜CakePHPの「今」と「未来」を例に〜 -
© - BASE, Inc. おさらいCakePHPの歴史 Y • 2005ϦϦʔε • PHP4Ҏ্
Y • 2011ϦϦʔε • PHP5.2Ҏ্ Y • 2015ϦϦʔε • PHP5.4.16Ҏ্ Y • 2019ϦϦʔε • PHP7.2Ҏ্ -
CakePHPの現状 © - BASE, Inc. • CakePHP4ܥstable –࠷৽4.0.3 • CakePHP3ܥmaintenance
mode –ػೳՃ͞Εͣɺbug fix͕ओ –࠷৽3.8.10 (ڪΒ͘3.9.x͕࠷ऴόʔδϣϯ) • CakePHP2ܥmaintenance mode –ػೳՃ͞Εͣɺbug fixɾsecurity fix͕ओ –࠷৽2.10.20 APPENDIX - Safer, More Helpful CakePHP https://www.slideshare.net/markstory/safer-more-helpful-cakephp (Slide no.5-) -
.x/ .xのサポート期間 © - BASE, Inc. • ʮ4.0͕ग़ͨΒΞΫςΟϒαϙʔτऴྃʯͱએ ݴ͍ͯͨ͠ •
2.x: –12ϱ݄ͷؒbug fixରԠ –18ϱ݄ͷؒsecurity fixରԠ • 3.x: –4.0ͱޓੑͷਪਐܧଓ͢Δɻ৽ػೳ͚ͳ͍ –36ϱ݄ͷؒsecurity fixରԠ -
2020年の今から⾒たCakePHP © - BASE, Inc. • ʮComposerҎલʯͷFW –Πϯετʔϧ͕ʮखಈʯʹͳΔ –ͦΕʹΑΔຊମͷංେԽ •
ʮPSRҎલʯͷFW –ͱΓΘ͚PSR-0ʙ2ͱ͍ͬͨʮॏཁʯͳϧʔϧʹ͔ͬΕ͍ͯͳ͍ • ͦͷଞͷ௧Έ –جຊઃܭ͕ʮ1.xʯͷ࣌ΛҾ͖ͣΓա͗ͨ –The current model class/system has served CakePHP well for the last 6 years(by Mark Story) APPENDIX - Model api changes · markstory/cakephp Wiki https://github.com/markstory/cakephp/wiki/Model-api-changes#problems -
.x -> .x © - BASE, Inc. • ComposerϕʔεͷΠϯετʔϧʹରԠʂ •
PSR-1/2/4ରԠʂ • ʮMiddlewareʯʮCarbonʯͷ ”ࠓͬΆ͍”֓೦ͷಋೖʂ • ORMͷ৽ʂ APPENDIX - 3.0 Roadmap · cakephp/cakephp Wiki https://github.com/cakephp/cakephp/wiki/3.0-Roadmap -
めでたしめでたし? © - BASE, Inc. • FWͱͯ͠Ұؾʹચ࿅͞Εͨ –͍ͪϢʔβʔͱͯ͠ʮ͍৺͕ྑ͍ͳʯͱ ͍͏खԠ͑ •
ͨͩ͠ɺ༨Γʹมߋ͕ഁյతͰɺҠߦ ͕ࠔͳͷʹͳͬͨ APPENDIX - CakePHP - The Road Ahead https://www.slideshare.net/markstory/cakephp-the-road-ahead (Slide no.4-) -
いくつか問題がありそう © - BASE, Inc. • 2.0(2011) - 3.0(2015)Ͱ͋Ε ʮͨͬͨ4ؒʯʹݟ͑Δ͕ɺ
ʮ2011ͷ࠷৽ʯ͔ΒͷδϟϯϓͰ ͳ͍ • ͦͷؒʹPHPΛऔΓר͘ঢ়گ͕େ͖͘มԽ –CIͷීٴɺςετͷʮͨΓલʯԽ –ComposerͷσϑΝΫτελϯμʔυԽ -
「移⾏が困難」の問題点 © - BASE, Inc. • ݹ͍όʔδϣϯͷډΓ –ίϛϡχςΟͷஅઈ • ʮίϛϡχςΟʯͷͷԼ
–ιϑτΣΞͷਐԽϑΟʔυόοΫʹґଘ͢ Δ -
Cake .x -> .xで⾝につけた「モダンさ」 © - BASE, Inc. CakePHP4લޙͰݟ͑ͯ͘Δ࢟ 1.
ϢʔβʔͷμϝʔδΛ੍͢Δ 2. ʮඪ४ʯʹد͓ͤͯ͘ 3. ίʔυ࣭Λ։ൃऀ/ར༻ऀʹͱͬͯอ ͪ͘͢ -
OSSとして進化し続けるための⼒ © - BASE, Inc. • 2.x -> 3.xͰʮࣦഊʯͨ͠ –େنͳഁյతมߋʹΑΔʮஅઈʯ
–(MVCͷத৺తͳଘࡏͰ͋Δ) ʮϞσϧʯͷ࡞Γ͕ɺύϥμΠϜϨϕϧͰมߋ ΊͬͪΌΩπ͍ APPENDIX - ৽ ORM ΞοϓάϨʔυΨΠυ - 3.8 https://book.cakephp.org/3/ja/appendices/orm-migration.html -
OSSとして進化し続けるための⼒ © - BASE, Inc. • 4.xͰࣄલʹʮೈணʯΛࠐΜͩ –3.6͔Βʮ4ͷͨΊͷ४උʯͱҐஔ͚ͮ –@deprecatedλάɺE_USER_DEPRECATEDΤϥʔ –ʮDEPRECATEDରԠ͓͚ͯ͠ಈ͘ʯํ
APPENDIX - 3.6 - Add a deprecation warning helper. by markstory https://github.com/cakephp/cakephp/pull/11075 - Upcoming CakePHP Roadmap & Releases — Bakery https://bakery.cakephp.org/2017/06/23/upcoming-cakephp-roadmap.html - 3.6 ҠߦΨΠυ https://book.cakephp.org/3/ja/appendices/3-6-migration-guide.html - 3.7 ҠߦΨΠυ https://book.cakephp.org/3/ja/appendices/3-7-migration-guide.html - 3.8 ҠߦΨΠυ https://book.cakephp.org/3/ja/appendices/3-8-migration-guide.html -
OSSとして進化し続けるための⼒ © - BASE, Inc. • ݁Ռతʹ4.0࢈͕ͩͬͨɺ ͷ͍͢͝ஸೡʹDEPRECATEΛચ͍ग़͠ ͯ͘Εͨҹ –3.6Ͳ͜Ζ͔ɺ3.7
/ 3.8·ͰਐΜͩ –ͦͷʮ໘ष͞ʯɺ 4.0ͷʮཧ͞Εͨίʔυʯʹͭͳ͕ͬͯΔ -
移⾏ツールの提供 © - BASE, Inc. • ->3.xͷ࣌Upgrade tool͕͋ͬͨɺ ʮࣗಈͰྃ͢ΔʯϨϕϧʹͳ͔ͬͨ •
->4.xRectorϕʔεʹҠߦ –͜ΕͰϢʔβʔ͔ΒϙʔλϒϧͳࣝͰʮҠ ߦπʔϧͷϑΟʔυόοΫʯ͕ߦ͍͘͢ APPENDIX - cakephp/upgrade: Upgrade tools for CakePHP meant to facilitate migrating from one version of the framework to another https://github.com/cakephp/upgrade - 4.0 ΞοϓάϨʔυΨΠυ https://book.cakephp.org/4/ja/appendices/4-0-upgrade-guide.html#rector - CakePHP3→CakePHP4ʹmigrateͯ͠Έͨ - ϥϯαʔζʢLancersʣΤϯδχΞϒϩά https://engineer.blog.lancers.jp/2019/12/ cakephp4_admin/ -
PHPエコシステムとの距離 © - BASE, Inc. • PSRͷੵۃతͳద༻ –CakePHPFIGϝϯόʔ –ଟ͘ͷPSRʹରԠ •
Φʔτϩʔυ(1+4)ɺίʔσΟϯάن(12)ɺHTTP ϝοηʔδ(5)/ϛυϧΣΞ(15)ɺϩΪϯά(3)ɺ Ωϟογϡ(16) • 4.1ͰίϯςφΠϯλʔϑΣΠε(11)ରԠ༧ఆ –͜ΕʹΑΓPHPίϛϡχςΟͷࢿ࢈ΛऔΓࠐΈ͘͢ -
コード品質を保ちやすく © - BASE, Inc. • strict_typeͷ༗ޮԽ • ҾɾΓͷܕએݴ •
PHPStanͷϨϕϧҾ্͖͛&Psalmͷซ༻ • PSR-12: Extended Coding Style APPENDIX - Update phpstan's config by ADmad · Pull Request #14194 · cakephp/cakephp https://github.com/cakephp/cakephp/pull/14194 -
コード品質 © - BASE, Inc. ։ൃऀʹͱͬͯɾɾ • ʮͪΌΜͱॻ͔ΕͨʯίʔυόάΓʹ ͘͘ɺใີ͕ߴ͍ •
͜ΕʹΑͬͯʮΓʹ͘͞ʯΛखʹೖΕ ͍ͯΔ -
FWはどのように”今っぽさ”を⼿に⼊れるか © - BASE, Inc. • CakePHP2ଟ͘ͷϢʔβʔΛ֫ಘ͕ͨ͠ɺ ࢥ͏Α͏ʹ3.xͷҠߦ͕ਐ·ͳ͔ͬͨ • ͦͷল͔Βɺʮޓੑʯʮഁյతมߋʯ
ʹ͖߹͏Α͏ʹ͍ͯ͠Δ • Ճ͑ͯɺݴޠͷ৽ػೳίϛϡχςΟͷϓ ϥΫςΟεΛੵۃతʹऔΓࠐΜͰ͍Δͷ͕ ݱঢ় -
© - BASE, Inc. おしながき PHPと”今っぽさ”のアップデート “今っぽさ”とは何か? && なぜ変化するのか FWはどのように”今っぽさ”を⼿に⼊れるか
〜CakePHPの「今」と「未来」を例に〜 -
まとめ © - BASE, Inc. • ʮԿͷͨΊʹϞμϯ͕ྑ͍ͷʯʁ –ະདྷʹ͍ۙॴʹ͍ΔͨΊʂ –࣌ʹऔΓ͞ΕΔͷ͕ʮϨΨγʔʯ •
PHPίϛϡχςΟͷେ͖ͳτϨϯυʹ ଇͬͨʮϞμϯ͞ʯͷ֫ಘ -
まとめ © - BASE, Inc. • CakePHP4ͨΜ·Γ”ࠓͬΆ͞”Λ࣮ફ ͍ͯ͠ΔΑʂ • ʮਐԽΛࢭΊͳ͍ʯͨΊͷֻ͚ํɺ
ࣾϓϩμΫτͳͲʹࢀߟʹͳΔϙΠ ϯτ͕͋Δͣ -
追記 © - BASE, Inc. • ͷ࣭ٙԠͷதͰʮPHP8ʹͳͬͨΒpreload͕ೖ ΔͷͰʯͱ͍͏ൃݴΛ͠·͕ͨ͠ɺਖ਼͘͠ʮJIT͕ೖ ΔͷͰʯͷؒҧ͍Ͱ͢ʂగਖ਼͍ͨ͠·͢ɻ •
τʔΫޙɺԠΛΒͬͨtweetͷز͔ͭʹରͯ͠ϒ ϩάʹͯϦΞΫγϣϯΛฦ͍ͯ͠·͢ɻซͤͯޚཡ͘ ͍ͩ͞ɻ –#phperkaigi ʹࢀՃ͖ͯ͠·ͨ͠ (day1) - େ͖ʂʹͪΑ͏ͼ https://daisuki.nichiyoubi.land/entry/2020/02/11/144838#π ΠʔτͷϦΞΫγϣϯ