16227 Commits

Author SHA1 Message Date
a36d403403 Fixed mistake in Russian translation of concept-di-container.md (#13496) [skip ci] 2017-02-02 15:04:41 +03:00
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 2.0.11 2017-02-01 17:46:29 +01:00
bd59d8f527 improved release controller 2017-02-01 17:36:45 +01:00
72cd849f5f Merge pull request #13487 from yiisoft/unique-validator
Unique validator
2017-02-01 16:32:35 +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
72a690216a Fixes #13466: Added info about generating migration which adds multiple columns at once [skip ci] 2017-02-01 01:17:27 +03: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
81bdf8b7a6 Merge PR #12697
* erickskrauch-12691-url-rule-host-without-protocol:
  added test for #12697
  Used non-regex solution for trimming slashes
  Prefer strpos to substr
  Implementation of support UrlRule with relative host definition

fixes #12691
2017-01-31 13:43:34 +01:00
a7f8d0efb4 added test for #12697 2017-01-31 13:42:38 +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
0f62d26e2c Fixed typo [skip ci] 2017-01-31 12:57:11 +03:00
38a61749ca Fixed typo [skip ci] 2017-01-31 12:26:57 +03:00
359c1b3d4c Update link (#13480) [skip ci] 2017-01-31 11:59:12 +03:00
d39c491022 Fix BC breaking #13475 (#13478) 2017-01-31 11:56:46 +03:00
d24f1ff460 docs/guide-ja/runtime-routing.md updated [ci skip] (#13479) 2017-01-31 11:53:06 +03:00
aa00aada82 docs/guide-ja/security-best-practices.md updated [ci skip] (#13481) 2017-01-31 11:52:35 +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
4187718c14 added missing groups to tests 2017-01-30 23:03:11 +01:00
7988331e65 dosc/guide-ja updated [ci skip] (#13471)
* doc/guide-ja updated [ci skip]

* docs/guide-ja updated [ci skip]

* docs/guide-ja/db-migrations.md updated [ci skip]
2017-01-30 13:46:52 +03:00
5609e918de Fixed some malformed @var tags (#13468) [skip ci] 2017-01-30 11:42:52 +03:00
a3a868e427 docs/guide fix [ci skip] (#13470)
* docs/guide/runtime-sessions-cookies.md typo fix [ci skip]

* docs/guide/tutorial-core-validators.md typo fixed [ci skip]
2017-01-30 11:39:14 +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
c4175be7a3 Adjusted command test for incorrect inserts to use data provider 2017-01-29 00:22:10 +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
015f14e374 Docs ja update 0127 [ci skip] (#13463)
* docs/guide-ja/intro-yii.md, docs/guide-ja/output-client-scripts.md updated [ci skip]

* docs/guide-ja/output-data-providers.md and output-data-widgets.md updated [ci skip]

* docs/guide-ja updates (WIP) [ci skip]
2017-01-28 18:32:23 +03:00
1cc327f108 Run common batch insert tests for SQLite 2017-01-28 14:41:57 +03:00
920877c815 Fixed WidgetEvent construction 2017-01-28 11:55:24 +03:00
8803496cf5 docs/guide/output-data-widgets.md typo fix [ci skip] (#13459) 2017-01-28 11:45:51 +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
9deb24e262 docs/guide/output-client-scripts.md typo fix [ci skip] (#13455) 2017-01-27 17:00:17 +03:00
a0c5fee931 Revert ignoring tests and docs on archive export
This did break the use case of installing the `yiisoft/yii2-dev` package for testing. `yiisoft/yii2` is a subsplit with minimal number of files of the framework already, the dev package should contain all tests and docs.

See for example: tom--/yii2-dynamic-ar#18

Partially reverts 392ea93d79
2017-01-27 09:55:41 +01:00
7d12ae80ee Added info about using your own forks when contributing to extensions and apps 2017-01-25 21:39:01 +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
d4d6c1dabf Tests for 13393 (#13439)
* add some unit tests regarding redirection for ResponseTest

* also tests yii\web\controller redirect
2017-01-24 16:58:01 +03:00