7207 Commits

Author SHA1 Message Date
46e355025f messages/ja/yii.php reverted [ci skip] (#13497) 2017-02-02 12:57:26 +01:00
3b7e97dab6 changelog corrected (#13495) 2017-02-02 08:53:56 +01:00
a849e0e4e9 Improved description of format of $controllers
Improved explanation of the format of the $controllers property. This explains what is meant by "prefixed with the module ID"

close #13488
2017-02-02 01:33:20 +01:00
1749c46c5d Fixes #11502: Fixed yii\console\controllers\MessageController to properly populate missing languages in case of extraction with "db" format 2017-02-02 02:50:34 +03:00
68ee789fdc update german translation 2017-02-01 19:44:45 +01:00
eadf793454 prepare for next release 2017-02-01 17:51:32 +01:00
c19b2f7dc8 release version 2.0.11 2017-02-01 17:46:29 +01:00
1eec5c17bc make UniqueValidator compatible with ActiveRecordInterface again
fixes #13485
2017-02-01 13:30:19 +01:00
0df8020dd0 Fix for #13485 2017-02-01 13:20:32 +01:00
603c422938 resort changelog 2017-01-31 14:25:00 +01:00
1531e19969 fixed misplaced CHANGELOG lines 2017-01-31 14:09:01 +01:00
2c5ab1e07b Used non-regex solution for trimming slashes 2017-01-31 13:42:38 +01:00
f9e83008f4 Prefer strpos to substr 2017-01-31 13:42:37 +01:00
c641513583 Implementation of support UrlRule with relative host definition
close #12697
fixes #12691
2017-01-31 13:42:31 +01:00
1e4484748b Merge pull request #13477 from yiisoft/urlmanager-test
Refactored UrlManagerTest to cover more use cases
2017-01-31 11:54:03 +01:00
d39c491022 Fix BC breaking #13475 (#13478) 2017-01-31 11:56:46 +03:00
8faedcbd7c Refactored UrlManagerTest to cover more use cases
UrlManager is a complex class with a large bunch of options that needs
to be tested
and we had a few regressions in the past even though there are already a
lot of tests
covering it. Test coverage measured by lines does not help us determine
how good it is tested,
we need test coverage for every major path through the code.

I have refactored the UrlManager tests to reflect the different options
and cases to
have a better overview of which cases are covered and which are not.

UrlManager has two main operation modes:

- "default" url format, which is the simple case. These are covered by
  methods in `UrlManagerTest`.

- "pretty" url format. This is the complex case, which involves UrlRules
  and url parsing.
  I have created two separate classes for this case:
  Url creation for "pretty" url format is covered by
`UrlManagerCreateUrlTest`.
  Url parsing for "pretty" url format is covered by
`UrlManagerParseUrlTest`.

Each of the test classes have a `getUrlManager` method that creates a
UrlManager instance
with a specific configuration and certain variations in options.
It is also tested that options that are not relevant in a certain
operation mode have no effect on the result.

To make sure to not remove tests that have existed before, here is a map
of where code has been moved.
The following test methods existed in the [old test
class](4187718c14/tests/framework/web/UrlManagerTest.php):

- `testCreateUrl()` split between UrlManagerTest and
  UrlManagerCreateUrlTest variations should all be covered by
`variationsProvider()`.
- `testCreateUrlWithNullParams()` covered by UrlManagerCreateUrlTest by
  `testWithNullParams()`
- `testCreateUrlWithEmptyPattern()`
- `testCreateAbsoluteUrl()` covered in UrlManagerCreateUrlTest by new
  tests via `variationsProvider()`.
- `testCreateAbsoluteUrlWithSuffix()` covered in UrlManagerCreateUrlTest
  by `testAbsolutePatterns`.

- `testParseRequest()` covered by UrlManagerParseUrlTest, UrlNormalizer
  related parts moved to UrlNormalizerTest.
- `testParseRESTRequest()` moved to UrlManagerParseUrlTest
- `testHash()` covered in different tests in UrlManagerCreateUrlTest.
- `testMultipleHostsRules($host)` kept as is.

Before:

    $ vendor/bin/phpunit tests/framework/web/UrlManagerTest.php
    ...
    OK (12 tests, 89 assertions)

After:

    $ vendor/bin/phpunit tests/framework/web/UrlManager*.php
    ...
    OK (72 tests, 648 assertions)
2017-01-31 02:38:35 +01:00
5609e918de Fixed some malformed @var tags (#13468) [skip ci] 2017-01-30 11:42:52 +03:00
37b8cbb2d0 Fixes #12758: Added the ability to use instances of \yii\db\Query class as values in the \yii\db\QueryBuilder::insert() method 2017-01-29 00:54:46 +03:00
25f08afc96 Fixes #8293: yii\db\Query can be passed to insert method in yii\db\QueryBuilder 2017-01-28 23:47:26 +03:00
240bca515a Use low-level query in UniqueValidator (#13461)
Fixes #13453, relates to #13098
2017-01-28 18:38:06 +03:00
920877c815 Fixed WidgetEvent construction 2017-01-28 11:55:24 +03:00
7c1693479f Fixes #12000: Added EVENT_INIT to widget 2017-01-28 01:27:05 +03:00
767400da19 Fixes for #13457 as commented by @cebe 2017-01-28 01:22:48 +03:00
bede9feba5 Fixes #13453: Reverted #10896 commit 729ddc5b76e8159d051e9c5783f5534eeb212efb
It was causing side effects: https://github.com/yiisoft/yii2/issues/13453
2017-01-28 01:16:14 +03:00
be4ebdd049 Fixes #13134: Added logging URL rules (bashkarev) 2017-01-27 19:03:45 +03:00
f20c0177af Fixes #7435: Added EVENT_BEFORE_RUN, EVENT_AFTER_RUN and corresponding methods to yii\base\Widget 2017-01-27 18:56:22 +03:00
37f19a0256 Fixes #13300, #13307, #13310, #13312
- Bug #13300: Allow pjax with "data-pjax" with no value in `yii.js`.
- Bug #13307: Preventing of race conditions in script filter in `yii.js` works incorrectly.
- Bug #13310: Handle relative and absolute URLs coincidence in CSS filter in `yii.js`.
- Bug #13312: `skipOuterContainers` option was incorrectly passed to pjax in `handleAction` in `yii.js`.
- Partially fixes #13299.

Adds tests for #8014, #11921, #10974, #11494, #10358, #10097.
2017-01-25 11:00:13 +03:00
d3bde96852 Fix Russian messages (#13438) [skip ci] 2017-01-24 15:03:31 +03:00
c8e467f919 Removed changelog entry for reverted #13393 2017-01-24 14:03:41 +03:00
eab3489ec7 Reverted #13393: Removed redundant call to yii\helpers\Url::to() in yii\web\Controller::redirect() (reverted from commit e5d169beb8257ba47654275cbee2e98fb910f5d5) 2017-01-24 13:09:57 +03:00
73f61b4f6b Update UPGRADE.md 2017-01-23 18:56:32 +01:00
c73de31a90 Fixed yii\web\MultipartFormDataParser adds an extra newline to every value 2017-01-23 13:18:31 +02:00
3f4771b1de Phpdoc adjustments [skip ci] 2017-01-23 12:42:35 +03:00
cc37cd626f Fixes #12599: Fixed MSSQL fail to work with nvarbinary. Enhanced SQL scripts compatibility with older versions 2017-01-23 10:31:52 +03:00
507cc52658 Allow omit default params on URL creation
Fixes #10970
2017-01-22 22:19:13 +02:00
21faee5504 Fixes #13212: Fixed DbSession::regenerateID() failure when session_regenerate_id() fails 2017-01-22 20:15:36 +03:00
b82caa97e8 Fixes #7820: Add or relation for targetAttribute in yii\validators\UniqueValidator 2017-01-22 19:45:18 +03:00
e5d169beb8 Fixes #13393: Removed redundant call to yii\helpers\Url::to() in yii\web\Controller::redirect() 2017-01-22 11:56:52 +03:00
736cd7bc80 Fixes #13417: Allow customizing yii\data\ActiveDataProvider in yii\rest\IndexAction 2017-01-22 11:46:47 +03:00
28325f2e0d Update BaseYii.php 2017-01-21 12:30:07 +02:00
e6424b190e Append phpdoc for log methods 2017-01-21 12:15:21 +04:00
97171a0db7 Fixes #13401: Fixed lack of escaping of request dump at exception screens 2017-01-18 01:05:50 +03:00
862a5dd6b7 Added support for field yii\console\controllers\BaseMigrateController::$migrationNamespaces setup from CLI 2017-01-16 16:48:44 +02:00
913b51b0b9 Adjusted changelog
See 3692941ead (commitcomment-20490835)
2017-01-16 17:40:41 +03:00
c1c11d06ae Revert "Fixed some comment issues (#13392) [skip ci]"
This reverts commit 652d05f0b8c4defa4f1bae29679322e3fbad1c0c.

`@property` comments are used to document the property that is
defined by a getter/setter if the method description does not fit.
2017-01-16 00:00:29 +01:00
3692941ead Fixes #11464: Foreign key name is not provided by schema 2017-01-16 00:27:20 +03:00
3f66f1907f Removed unused method 2017-01-16 00:08:28 +03:00
ebe30bd5ee Exposed number normalization as StringHelper::normalizeNumber() 2017-01-15 22:46:25 +03:00
eee7b9663c Merge branch 'master' into fix-numbervalidator-comma-decimal-separator 2017-01-15 22:41:09 +03:00