【PHP】【Yii】yii2-dynamicformでCannot read property 'widgetItem' of undefined

Yiiのプラグインでフォームを簡単に使えそうなやつがあるとのことで
GitHub - wbraganca/yii2-dynamicform: It is widget to yii2 framework to clone form elements in a nested manner, maintaining accessibility.
を使っていた。

しかし、フォーム追加時にタイトルのエラーで上手くフォームが追加できなかった。
ググりまくった結果、誰かが該当エラーのプルリクを送っていた。
Cannot read property 'widgetItem' of undefined by bookin · Pull Request #89 · wbraganca/yii2-dynamicform · GitHub

プルリクを受けて更新されてる感じではなかったので、自分で直してcomposerで読み込み直しが必要だった。

Githubリポジトリクローン

Bitbucketのリポジトリ作ってそこへpush

修正してcommit

composer.jsonで読み込み指定する。

Repositories - Composer


の通りに指定。
あとは詰まったところとしては
「[Composer\Repository\InvalidRepositoryException]
No valid composer.json was found in any branch or tag of https://bitbucket.org/[該当ブランチ], could not load a package from it.」
のエラー対応は

「[ErrorException] Illegal offset type in isset or empty」のエラー対応は

  • composerを最新版にアップデート(./composer.phar self-update 1.0.0-alpha11)

って感じでした。
composerのアップデートは謎い...。