目標 iPadアプリの開発、ではなく、iPadを使っての開発、を試してみる。 クラウド上の開発環境であるcloud9とherokuを利用すればクラウド環境のみでの開発が可能になるはず、ということで環境を整えてみた。 言語はPHPを想定。 herokuアプリの作成 PHPプロジェクトの作成 cloud9上にPHPのプロジェクトを作成する。 ファイルの準備 とりあえず、index.phpだけを作っておく。 中身はなんでもよいが、phpinfo()だけを表示させるようにしておいた。
やりたいこと PSR-2に沿ってないコードを駆逐したい。 また、PHPMD - PHP Mess Detectorというものもあるらしいので、それに沿ってないコードも駆逐したい。 ただ、FriendsOfPHP/PHP-CS-Fixerみたいに自動で変換するのは、後で見た時に違ったコードに見えてしまったり、人間の成長が無かったりする気がするので微妙。 人間レビューのする前に、自動レビューを行いたい。んで、人間が直す。 要するに、Androidのコードを自動で解析し、GitHubのpull requestにコメントするのPHP版。 完成イメージ GitHubにPUSHすると、CircleCIが動いて、Pull RequestにPHP CodeSnifferなどの結果を表示する。 実際に動かしたものはこちら→ https://github.com/noboru-i/laravel-sample
「PHPの開発環境を構築する」シリーズの第5回です。今回は、オープンソースでPHP用の静的解析ツールである、PHPMDを試してみます。PHPMDによる使われていない変数の警告によって、変数名のタイプミスが発見できそうです。 順番を入れ替え、最初にPHPMDの試用レビューをし、その後でインストールをレポートします。 (2014年12月23日追記:インストール時の「謎のエラー」を無視しても、動作することを確認しました。またWindows 8.1の場合に付いて追記しました。) (2015年2月26日追記:インストール方法については「Composerによるツールのインストール」を起稿しました。こちらをご参照下さい。) はじめに PHPは、柔軟で便利なツールもそろっている、プログラミングがしやすい言語です。 しかし一点、変数が無宣言で使えるので、タイプミスによる欠陥を作りこみやすいです。またインタプ
Windows上で使っているSublimeText の SublimeLinterでPHPのLintを行うためにWindows環境でPHPMDやPHPCS を叩けるようにしたので、その時のメモです。 PHPCS, PHPMDとは 以前 もこのブログで触れたことが有ります。どちらもPHPのコードチェックを行うコマンドラインツールです。 PHPCSは、PSR2などのコーディング規約に違反している箇所を教えてくれるツール。 PHPMDは不必要な変数宣言などの余分なコードや、長すぎる名前・行といった、いわゆるBuggyなコードを指摘してくれるツールです。 SublimeLinterとは SublimeLinterは、定番テキストエディタのSublimeTextのプラグインで、外部プログラムを利用して編集中のコードのLintを行ってくれます。様々な追加プラグインがあり、それらを追加することで様々なL
はじめに Teto\Functoolszonuexe/php-functoolsは、数日前に「内部状態で頭がパンクして氏なないようにするには関数型言語がオススメ」との噂を真に受けて実装したライブラリだ。計画性のない人生でも、命は惜しい。 正直なところ僕には「関数型言語」が何を意味するのかよくわからないし、実際のところ単なる流行語に過ぎないと認識してるのだけれど、さしあたってPHPで「部分適用をしやすくしよう」を最初の目的に出発した。 このライブラリはイテレータ機能はカバーしないので、Underbar.phpとかGinqとか、好きなのを選べば良いと思ふ。この記事では特定のライブラリには依存せず、配列とPHP標準函数のarray_map, array_reduce, array_filterで説明する。 過去、いくつか関連のありそうな記事を書いたのだけれど、参考になるだろうか。 (たぶんならな
WebPayは開発者が安心して効率よく開発を進めるための手段として、自動テストを重視しています。 EC-CUBE決済モジュールmdl_webpayの自動統合テストを記述した経験をもとに、 WebPayを利用したアプリケーションをCodeceptionのAcceptance Testでテストする方法を紹介します。 今回は対象のアプリケーションとして、以前の記事、「少しのPHPのコードでWebPayを導入する」で作成したものを利用します。 本記事の内容は、現在の実装に依存したハックを多数含みます。 この記事で説明している内容が将来的にも利用できることをお約束するものではないことをご理解ください。 公式ページのドキュメントで解説している項目以外は、予告なく変更することがあります。 あくまでテストのひとつの方法として、参考にしてください。 SUTを分析する 今回はテスト対象のアプリケーションがすで
WindowsにCodeceptionをインストールする手順! 開発部の紺野です。テストの自動化と新機能追加時に発生するデグレ対策としてCodeceptionの導入をすることとなり、社内で勉強会に参加しました。その内容を復習するために、自分なりにCodeceptionの導入の方法をまとめたので、備忘録として共有したいと思います。 今回は、Codeceptionの導入方法と簡単なAcceptanceテストの実施方法を紹介をしたいと思います。 【動作環境】 ・Windows7(WindowsXPでも動作することを確認しました) ・PHP 5.3.2以上 【準備】 ・Gitのインストールが必要(GitBashからコマンドを実行するために必要) →Gitのダウンロードはこちらから ・PHP 5.3.2以上のインストールが必要 →PHPのダウンロードはこちらから ※今回はComposerを利用してC
PHPUnitを用いた単体テストのコードをJenkinsで起動してコードカバレッジ率とテスト結果の取込を行いましょう。 Yii2からは、Codeceptionをインストールして単体テスト、機能テスト、受け入れテストを行うようです。 せっかくなのでCodeceptionでテストを書いてJenkinsと連携させてみましょう。 テストの準備 α版のYii2だとsuggestで記述されているので、改めてインストールします。 インストール後にテストの準備を行って起動確認まで行っておきましょう。 アプリケーションディレクトリで操作して下さい $php composer.phar require --dev "codeception/codeception: 1.8.*@dev" "codeception/specify: *" "codeception/verify: *" >Loading comp
$yum -y groupinstall base network-tools development httpd-devel $yum install httpd openssl autoconf libxml2-devel openssl-devel freetype-devel libcurl-devel net-snmp-devel libpng-devel libjpeg-turbo-devel openldap-devel libmcrypt-devel readline-devel gd-devel bzip2-devel libicu-devel libwebp-devel gmp-devel libtidy-devel libxslt-devel $rpm -ivh http://dev.mysql.com/get/mysql57-community-release-el
Composer経由でLaravelをインストールしようとして、Composerをcurlから取得する時に結構厄介なエラーに遭遇しましたので、対処法をシェアします。 自分はLaravelのインストール目的でしたが、Composerインストール時一般に使えるTIPSかと思います。 Download failed: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed file_get_contents(): Failed to enable crypto file_get_contents(https://getcomposer
PHP Advent Calendar 2013 in Adventar の3日目です。 前日は @matsubo さんの コピペで出来るComposer導入 でした。Composer、私も使ってます。 Grunt とは Node.js で作られた色々な作業を自動化するためのツールです。 普通は Node.js での開発や js とかのフロントエンド開発に使われますが、PHP での開発でもわりと便利です。 PHP のための Grunt プラグインも色々あるので、とりあえず次の2つだけ使ってみます。 grunt-phpunit grunt-php 前提 php や node や npm はあらかじめインストールしておいてください。 ソースとテストの準備 とりあえず phpunit が実行できるソースツリーを用意します。phpunit は今風に composer でインストールします。 $ f
2020-07-01 ZOZOTOWNのインハウス広告運用を支援するデータと仕組みの話 BigQuery データ マーケティング 広告 本記事では、ZOZOのマーケティング部門の広告運用のインハウス化に伴って、これまで取り組んできた広告データの収集と活用、その仕組みにフォーカスして事例をご紹介します。 ZOZOTOWNのインハウス広告運用を支援するデータと仕組みの話 2020-06-29 【オンラインMeetup イベントレポート】ZOZOテクノロジーズの大規模データ活用 イベントレポート GCP Elasticsearch 検索 機械学習 こんにちは、ZOZOテクノロジーズ CTO室の池田(@ikenyal)です。 ZOZOテクノロジーズでは、6/22にZOZO Technologies Meetup -ZOZOテクノロジーズの大規模データ活用-を開催しました。 zozotech-inc
php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php php -r "if (hash('SHA384', file_get_contents('composer-setup.php')) === 'fd26ce67e3b237fffd5e5544b45b0d92c41a4afe3e3f778e942e43ce6be197b9cdc7c251dcde6e2a52297ea269370680') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); }" php composer-setup.php php -r "unlink('composer-setup.
Yii Frameworkを学習する. Yii Framework とは YiiはWebアプリケーション開発のための高性能なPHPフレームワーク. Yiiの由来は「Yes It Is」の頭文字であり、「Yii(イー)」と発音する. インストール 公式に従い,2015/03/01時点での最新版2.0.3をインストールする. Composerを利用する方法(公式推奨)と、アーカイブファイルをダウンロードする方法2種類がある. インストール方法1(推奨): Composerを利用してインストールする Composer をインストールする(※Composerをインストールしていない場合) curl -sS https://getcomposer.org/installer | php 参考: Composer Composer Asset Plugin をインストールする php composer
Windows PowerShell で Composer をインストール。 本体 composer.phar PHPがインストールされているディレクトリ(php.exe があるとこ)で以下を実行。 php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));" composer.phar というファイルが作成されます。 管理者権限等が必要で実行できない場合は他のとこでやって移動すればOK。 Web Platform Installer を使用して PHP をインストールした場合は C:\Program Files (x86)\IIS Express\PHP\v5.3 になります。ディレクトリへのパスは自動で設定されます。 実行ファイル composer.bat
やあPHP! 最近なんだかまともだなぁ PHP開発の上で実用的なツール群について、RubyやPythonほどには知名度がないので紹介したい。Windowsのことは知らないので、各自がんばってほしい。 筆者はもともとRubyの方から来たので、Rubyとの比較が多いのは留意されたい。 この記事の内容と直接関連はしないが、併せて読まれたい PHPのin_arrayは罠が多いので注意喚起が必要 - Qiita 準備 MacだとHomebrewがあると依存ライブラリを集めるのが楽でべんり。 これは個人の趣味の話なのだけれど、自分でインストールする実行ファイルは$HOME/local/binに置くのが好きだ。 筆者はZ Shellユーザーなので https://github.com/zonuexe/dotfiles/blob/master/.zshenv#L1-L13 のようにしてる。 PHPBrew
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く