2698 Commits

Author SHA1 Message Date
0b2e79eac5 Fixed BasicHttpAuth to respect HTTP_AUTHORIZATION header
Closes #13564
2017-10-08 11:25:50 +03:00
f5c98f9664 Fixed tests for HHVM (#14941) 2017-10-07 20:13:11 +02:00
22d453faac Fixes #14134: Fixed multiple validateAttribute() calls when scenarios() returns duplicate attributes 2017-10-07 19:40:06 +02:00
59b635c2a6 Fixes #14921: Fixed bug with replacing numeric keys in yii\helpers\Url::current() 2017-10-07 18:47:31 +02:00
f5591bb70e Closes #13792: added test verifying unused messages are not removed 2017-10-06 22:59:04 +01:00
6bde69aa96 Fixes #14016: Fixed empty messages marked as unused in PHP and PO sources when extracted with message command when markUnused is false 2017-10-06 22:24:38 +02:00
732e7d9cbf Merge pull request #14935 from rob006/email-validator
Add tests with double dot for EmailValidator
2017-10-06 18:26:42 +03:00
b0148a5e8f Added test to check issue #14274 2017-10-06 18:08:48 +03:00
7e681b4a56 Fixed yii.js to follow jquery-pjax API changes
Fixes #14926
2017-10-06 12:19:13 +03:00
a9f2827f87 Add tests with double dot for EmailValidator. 2017-10-06 10:05:56 +02:00
b27b34df84 Removed yii\base\Object import 2017-10-04 17:12:42 +01:00
85f8709f14 Fixed test 2017-10-04 18:41:45 +03:00
0e240ef2d0 Container type for pjax must be string 2017-10-04 18:41:39 +03:00
24efeb812c Added tests for Query Builder insert, update and delete (#14911) 2017-10-04 14:34:43 +02:00
f82f2c00b3 Skip testing variadics on HHVM 2017-09-30 11:17:56 +01:00
34d2223696 Fix for 5.4 and 5.5 tests 2017-09-29 22:23:25 +01:00
a1ddd8b907 Fixes #14129: Fixed console help to properly work with tricky camelcased controller names 2017-09-29 23:02:09 +03:00
Sam
537317fbb1 Fixes #14126: Added variadic parameters support to DI container 2017-09-29 22:09:56 +03:00
75e8bfdc58 Fixes #14087: Added yii\web\View::registerCsrfMetaTags() method that registers CSRF tags dynamically ensuring that caching doesn't interfere 2017-09-29 17:13:04 +03:00
d599568154 Merge branch 'master' into kidol-filemutex
Conflicts:
	framework/mutex/FileMutex.php
2017-09-13 22:05:40 +03:00
Sam
04281cba8c Fixes #14793: Module ->get() and ->has() methods now check parent modules and fall back to application if nothing found 2017-09-13 01:32:57 +03:00
1ce796ef0f Removed ability to define a hostname as trusted because of possible security issues
Closes #14691
2017-09-12 23:28:29 +03:00
40ae296b82 Fixed broken test 2017-09-11 12:49:46 +03:00
f9b0090a7d Added more tests for FileValidator to make sure it works as should
Closes #14778
2017-09-09 16:13:10 +03:00
36b535c26b Fixes #13254: Made yii\helpers\StringHelper and yii\validators\StringValidator independent of Yii::$app instance 2017-09-07 22:32:07 +03:00
61996979db Removed commented out code
See e69adc19a7 (commitcomment-24119433)
2017-09-06 18:54:04 +03:00
e69adc19a7 Fixed yii\widgets\ActiveField::$options does not support 'class' option in array format 2017-09-06 17:43:48 +03:00
9b01ca275f Fixes #14273: yii\log\Target::$enabled now supports callable value (#14539)
* Fixes #14273: yii\log\Target:: now supports callable value

* added empty line in changelog [skip ci]

* getter and setter

* Update Target.php
2017-09-01 23:49:53 +02:00
a4bd0edeaa unit test for yii\base\Widget added 2017-09-01 17:10:32 +03:00
9e6f9e3b6d Fixed serialization of yii\db\Connection instance closes database connection 2017-09-01 13:30:56 +03:00
431c1b01a7 added test case for merging empty arrays
issue #14617
2017-09-01 10:58:45 +02:00
711498f93a Cache user assignments to avoid unnecessary DB queries (#14696)
* Cache user assignments to avoid unnecessary DB queries

alternative to #9138 and #10981, only cache on `checkAccess` call which is usually
called on every request. Cache is not necessary in RBAC management.

Similar to #14061 but includes proper cache invalidation and test.

`getAssignments()` always queries the DB. The cache is only applied on
`checkAccess` calls, and invalidated as soon as the RBAC structure is
modified through the manager component (verified by the test case).

Regarding [concerns of memory usage](https://github.com/yiisoft/yii2/pull/14061#issuecomment-297982502)
if used in batch mode on multiple users, you can call
`invalidateCache()` method if this really causes a problem.

fixes #7743
close #9138
close #14061
close #10981

See also
- https://github.com/yiisoft/yii2/issues/7626#issuecomment-77745166
- https://github.com/yiisoft/yii2/pull/14061#issuecomment-319645488

* improve test naming

* fix tests

* fix assignment cache for non-scalar user-ids
2017-09-01 10:50:36 +02:00
f7942c0398 make cache test more robust 2017-09-01 10:03:30 +02:00
f866edcfba Fix console cache controller
Fixed a bug in a `yii\console\controllers\CacheController` when caches
defined via a closure were not detected.

fixes #13969
close #14586
2017-09-01 09:34:56 +02:00
d68789a195 Fixes #13779, fixes #5786
- #13779: Fixed `yii\db\ActiveRecord::joinWith()` unable to use relation defined via attached behavior.
- #5786: Allowed to use custom constructors in ActiveRecord-based classes.
2017-08-29 15:13:28 +03:00
8987957f06 Fixes #14697: Fixed console\widgets\Table rendering when there's no data supplied 2017-08-28 01:27:54 +03:00
771a9faed2 Fixed invalid tests (#14716) 2017-08-24 17:26:20 +03:00
Sam
4081a4b203 Fixes #14184: Module service locator now falls back to its parent module service locator in case component isn't found 2017-08-23 00:38:39 +03:00
0e2b6c41b8 Simplified API of Formatter::asWeight() and Formatter::asLength() methods 2017-08-21 13:10:19 +03:00
5a8c3d537b Enable phpdoc_summary rule in php-cs-fixer config (#14675)
* Enable `phpdoc_summary` rule in php-cs-fixer config.

* Fix case in "PHPDoc".
2017-08-21 11:19:35 +02:00
1501c659ac Add empty lines before return statements. (#14682) [skip ci] 2017-08-21 01:58:49 +03:00
0c0942d6e2 Enable phpdoc_add_missing_param_annotation rule in php-cs-fixer config. (#14681) [skip ci] 2017-08-21 01:57:23 +03:00
4d5aa9a6cf Fix self-ignored .gitignore files. 2017-08-20 13:39:06 +02:00
58792cdac5 Fixes #14664: Add migrate/fresh command to truncate database and apply migrations again 2017-08-20 01:00:41 +03:00
9b118aafa0 Enable non_printable_character rule in php-cs-fixer config (#14667)
* Use "\u{00a0}" as nbsp.

* Enable non_printable_character rule.

* Fix test for PHP 5.
2017-08-18 13:59:57 +02:00
b99e955627 Fix CS (#14665)
* Run php-cs-fixer.

* Enable phpdoc_types rule.
2017-08-18 12:10:42 +02:00
7ad94a0107 [cs] remove unused use statements (#14661) [skip ci] 2017-08-18 01:24:43 +03:00
4b9d7a6bdd Fixes #14596: Fix event call on init in yii\widgets\BaseListView 2017-08-17 18:18:51 +03:00
0ebff0a7ab Fixed ListView test to run properly on Windows 2017-08-17 17:34:41 +03:00
Sam
0017d9c660 Fixes #13780: Added support for trusted proxies in yii\web\Request 2017-08-17 13:14:51 +03:00