Commit Graph

3198 Commits

Author SHA1 Message Date
Alexander Kartavenko
8d9947f06a Fixes #17299: Fixed adding of input error class in \yii\widgets\ActiveField::widget 2019-05-28 09:03:39 +02:00
Basil
e1f6761dfd Fixes #17233: Fixed bug with integer model attribute names in Validator class 2019-05-15 18:03:57 +03:00
Alexander Makarov
6d10d1f05d Fixed ActiveRecord test was using parent Order class instead of getting one for extensions 2019-05-01 00:10:22 +03:00
Bizley
56215d58e1 Fixes #12077, #12135, #17263: Fixed PostgreSQL version of alterColumn() to accept properly ColumnSchemaBuilder definition of column 2019-04-30 21:08:00 +04:00
George Tavares Lopes
58761b4411 Fixes #16820: yii\filters\Cors::prepareHeaders() now accepts Access-Control-Allow-Headers in preflight response 2019-04-16 17:27:26 +03:00
Dmitriy Gritsenko
77d70bfbe6 Fixes #16589: Fixed not using defaultValue in BlameableBehavior for console app 2019-04-15 18:06:16 +03:00
Alexander Makarov
33405fa4a5 Fixes #17268: Fixed Formatter didn't take power into account 2019-04-15 17:48:32 +03:00
Razvan Grigore
9c37016dac Fixes #17235: yii\helpers\FileHelper::normalizePath() now accepts stream wrappers 2019-03-29 18:26:31 +03:00
Albert Borsos
d2c2f63686 Fixes #17127: yii\db\ActiveRecord::findOne() now accepts table aliases 2019-03-22 15:59:26 +03:00
Diego Tibi
72b4e6d47c kB instead of KB (#16368)
* kB instead of KB

When kilobyte is referred to 1000 bytes the abbreviation should be written with lower case "k" as kB. Upper case K is usually intended to refer to 1024 multiplier
See this page: https://en.wikipedia.org/wiki/Kilobyte
2019-03-20 21:04:43 +03:00
Artem Pakhomov
a3b6d227ba Fixes #16335: Fixed in yii\filters\AccessRule::matchIP() user IP validation with netmask in rule 2019-03-20 14:44:22 +03:00
Phan Xuan Dung
9689c7824f Merge remote-tracking branch 'upstream/master' 2019-03-13 10:08:43 +07:00
lubosdz
8bb334b9ae Fixes #9438, #13740, #15037: Handle DB session callback custom fields before session closed 2019-03-09 15:54:39 +03:00
Nikolay Poryadin
a8d4f8538e Fixes #16681: ActiveField::inputOptions were not used during some widgets rendering 2019-03-09 15:39:58 +03:00
Nikolay Poryadin
5b5150ae62 Fixes #17133: Fixed aliases rendering during help generation for a console command 2019-03-09 15:35:19 +03:00
Phan Xuan Dung
9a90f48059 Merge remote-tracking branch 'upstream/master' 2019-03-07 11:37:51 +07:00
Nikolay Poryadin
fc98a95a90 Fixes #17185: Fixed AssetManager timestamp appending when a file is published manually 2019-03-05 18:11:27 +03:00
Mikk Tendermann
81f7d381e5 Fixes #17180: Do not populate yii\web\Response::$response when response code is 204 2019-03-05 12:34:40 +03:00
Phan Xuan Dung
d5894fccc9 Update, add Intro Upgrade from v1 2019-03-01 17:48:04 +07:00
Pavel Dovlatov
bdb7c64910 Update to https protocol for php.net links (#17168) [skip ci]
* Updated php.net link for some MemCache properties [skip ci]

* Changed protocol to https for links to php.net in comments

* Changed protocol to https for links to php.net in code

* Changed www.php.net (http) to secure.php.net (https) in comments

* Changed www.php.net (http) to secure.php.net (https) in code

* Changed protocol to https for links to php.net in UPGRADE.md

* Changed protocol to https for links to pecl.php.net in comments

* Changed us.php.net to secure.php.net (https) in comments

* Changed protocol to https for links to php.net in docs

* Changed www.php.net (http) to secure.php.net (https) in docs

* Changed protocol to https for links to pecl.php.net in docs

* Changed ru/jp.php.net to secure.php.net (https) in docs

Don't sure about russian guide: is this links meant to be for guide on russian, or not?
2019-02-28 13:09:27 +03:00
Alexander Makarov
26789ed04e Fixes #17093 by reverting #16891 (#17154) 2019-02-23 00:29:20 +03:00
Brandon Kelly
1cc83f02f5 Fixes #17150: Fixed yii\helpers\BaseInflector::camel2words() splitting ALLCAPS words on each letter 2019-02-22 23:41:14 +03:00
Pavel Ivanov
2da6773b68 Fixes #17089: Fixed caching of related records when via() using with callable 2019-02-13 23:22:07 +03:00
Pavel Ivanov
905cfd9725 Fixes #17098: Fixed message/extract when using message params returned from method calls 2019-02-07 20:44:11 +03:00
Nikolay
fd3eb699d4 Fixes #17094: Fixed response on 204 status. Now it is empty 2019-02-04 00:10:47 +03:00
Carsten Brandt
6fe809ea26 added test case for checking BC of #16772 and #14759 2019-01-30 23:59:09 +01:00
SilverFire - Dmitry Naumenko
e4eaccc14d Merge branch 'security' 2019-01-28 22:50:38 +02:00
Bizley
de5b903806 Fixed regression in #16817 (#17056) 2019-01-21 15:20:43 +03:00
Dmytro Naumenko
adf8f9a32f Fixes #15931: yii\db\ActiveRecord::findOne() now accepts quoted table and column names using curly and square braces respectively 2019-01-20 17:20:43 +03:00
SilverFire - Dmitry Naumenko
b9ee17014e Removed wrong test addded in dfcf037c7 2019-01-20 13:54:31 +02:00
SilverFire - Dmitry Naumenko
dfcf037c76 ActiveQuery::viaTable() now throws exception on wrongly prepared query
Closes #15876
2019-01-20 12:33:26 +02:00
Vladimir Votinov
3c091b802a When uses filter \yii\filters\PageCache, then yii\web\JsonResponseFor… (#17044)
* When uses filter \yii\filters\PageCache, then yii\web\JsonResponseFormatter sets Response::$content as null, howerer \yii\filter\PageCache has been restore content
2019-01-18 06:06:08 -05:00
SilverFire - Dmitry Naumenko
659b3d4b77 Fixing DB session override problems
See #16959
2019-01-15 12:42:13 +02:00
Pavel Ivanov
4333b90186 Fixes #15482: AR::find()->with() missing data when using string identifiers for relations 2019-01-14 18:50:56 -05:00
Pavel Ivanov
7ccadb4a79 Fixes #15167: Fixed loading of default value current_timestamp() for MariaDB >= 10.2.3 2019-01-11 17:47:40 -05:00
Pavel Ivanov
22d30f1999 Fixes #15286: Fixed incorrect formatting of time with timezone information 2019-01-09 09:59:56 -05:00
Pavel Ivanov
e5ecea653f Fixed random fails of RetryAcquireTraitTest (#17024)
Property `RetryAcquireTrait::$retryDelay` sets the minimum delay, but not the exact delay. In fact, the delay may be longer. Because of this, sometimes less than 20 blocking attempts occur. Checking the exact number of locks sometimes leads to the following errors:
```
$ vendor/bin/phpunit --filter=testRetryAcquire
PHPUnit 4.8.34 by Sebastian Bergmann and contributors.

F

You should really fix these slow tests (>500ms)...
 1. 1050ms to run yiiunit\framework\mutex\RetryAcquireTraitTest:testRetryAcquire

Time: 4.08 seconds, Memory: 44.00MB

There was 1 failure:

1) yiiunit\framework\mutex\RetryAcquireTraitTest::testRetryAcquire
Failed asserting that 19 is identical to 20.

/yii2/tests/framework/mutex/RetryAcquireTraitTest.php:36
/yii2/vendor/phpunit/phpunit/phpunit:52

FAILURES!
Tests: 1, Assertions: 3, Failures: 1.
```

I reworked the test so that it checks the duration of the delays, but not the exact number of blocking attempts.
2019-01-08 09:55:27 -05:00
Pavel Ivanov
108155ad1d Fixed nightly build (#17025) 2019-01-08 09:52:15 -05:00
Albert Borsos
ec1809bed2 Fix to do not delete used message files with nested category names (#17021) 2019-01-06 16:20:25 -05:00
Pavel Ivanov
b4cb42fb9d Fix of Oracle tests for proper skipping (#17019)
PHPUnit must get the data that will be passed to the tests, before executing them. That's why you can't prevent the dataProvider to be executed using `$this->markTestSkipped()` inside a test. Instead, you must use a skipping inside data provider when the test cannot be executed.

Now Oracle tests are skipped without fails when Oracle isn't installed:
```
$ vendor/bin/phpunit --filter=BuildLikeCondition --group=oci --verbose

...

There was 1 skipped test:

1) yiiunit\framework\db\oci\QueryBuilderTest::testBuildLikeCondition
Test for yiiunit\framework\db\oci\QueryBuilderTest::testBuildLikeCondition skipped by data provider
Could not execute Connection::quoteValue() method: Connection::dsn cannot be empty.
```
2019-01-05 16:52:01 -05:00
Pavel Ivanov
92c66758de Added tests for DateValidator when no time is specified for 'format' (#17018)
Related issues:
* #10737
* #14299
* #14795
2019-01-04 18:45:49 -05:00
Pavel Ivanov
36ed136caf Issue #14388: test of dependent ActiveFixtures loading (#17012) 2019-01-04 09:24:38 -05:00
Pavel Ivanov
4584487126 Fixes DateValidatorTest for ICU 55.1 (#17013)
I have installed ICU of version `55.1` and tests fail on it. That's because 'short' datetime format has been changed earlier - starting with version 55.1

See for example Symfony changes for ICU 55: 4f224ef4ab (diff-564fc4b01393077657880495f2be7b17R54)
2019-01-04 05:38:10 -05:00
Dzhuneyt
a790685e66 Fixes #16974: Regular Expression Validator to include support for 'u' (UTF-8) modifier 2019-01-03 15:12:42 -05:00
Pavel Ivanov
e0e73cf5b5 Minor cleaning of .gitignore files in tests folder (#17007)
1) `/runtime/cache/*` already ignored by file `/tests/runtime/.gitignore`
2) `/tests/runtime/assets/` already stays in place due to file `/tests/runtime/asstes/.gitignore`
2019-01-03 14:15:47 -05:00
Pavel Ivanov
bc9f8bd8a3 Fixes CommandTest::testCreateView() cleanup logic (#17006)
View must be deleted before deleting the tables on which it depends, otherwise we will get errors when rerunning the tests in the same environment.

For example:
```
1) yiiunit\framework\db\mysql\CommandTest::testCreateView
yii\db\Exception: SQLSTATE[HY000]: General error: 1356 View 'yii2_test.testCreateView' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
The SQL being executed was: SHOW FULL COLUMNS FROM `testCreateView`
```
2019-01-03 14:15:06 -05:00
Nikolay
1a34f61e56 Fixes #16941: Set yii\console\controllers\MigrateController::useTablePrefix to true as default value 2019-01-03 12:16:42 -05:00
Pavel Ivanov
966f262016 Fixes AssetBundleTest for vagrant ENV (#17003)
1. There is no need to use setUp/tearDown just for one TestCase method.
2. Previous implementation of testBasePathIsWritableOnPublish() doesn't work in vagrant environment using shared files because of unreliable chmod.

So, this implementation is more versatile and optimized.
2019-01-02 18:45:40 -05:00
taobig
e1623868f9 Fixes #16891: Fixed Pagination::totalCount initialized incorrectly 2019-01-01 13:24:14 -05:00
Pavel Ivanov
379a2002dd Issue #14609: test case for further discussion (#16990) 2018-12-31 07:04:08 -05:00