From f07ccb0c86c4588e7da8fd755590bb9c83c31d1b Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Thu, 15 Jan 2015 20:15:54 +0100 Subject: [PATCH] added decision about closure params to design decisions close #6875 --- docs/internals/design-decisions.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/internals/design-decisions.md b/docs/internals/design-decisions.md index c767e58e35..f1ec85f246 100644 --- a/docs/internals/design-decisions.md +++ b/docs/internals/design-decisions.md @@ -15,3 +15,6 @@ the core developers. 3. **[Adding new auth client support](https://github.com/yiisoft/yii2/issues/1652)** For better maintenability, we will not add any additional auth clients to the core extension. They should be done in terms of user extensions. +4. **When using closures** it is recommended to **include all passed parameters** in the signature even if not all of them are + used. This way modifying or copying code is easier because all information is directly visible and it is not necessary to + look up which params are actually available in the documentation. ([#6584](https://github.com/yiisoft/yii2/pull/6584), [#6875](https://github.com/yiisoft/yii2/issues/6875))