Commit Graph

1305 Commits

Author SHA1 Message Date
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
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
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
Pavel Ivanov
7d494d0d24 Fixes #16028: Fix serialization of complex cache keys that contain non-UTF sequences 2018-12-31 06:54:19 -05:00
Pavel Ivanov
b128ec85f4 Fixes #16081: Fixed composite IN using just one column 2018-12-31 06:41:25 -05:00
Andrew
572e5f6655 Fixes #15850: check basePath is writable on publish in AssetManager 2018-12-16 01:54:00 +03:00
Andrew
c162bd7ae7 Fixes #16910: Fix messages sorting on extract 2018-12-12 22:57:24 +03:00
Bizley
1db55e6b0d Normalizing string numeric (#16943) 2018-12-10 11:50:50 +03:00
Andrew
3221ab0769 Fix #15683: Fix file as array uploading in MultipartFormDataParser (#16950) 2018-12-10 11:49:36 +03:00
Dmitry V. Alexeev
b5be47321b Fixes #16469: Allow cache to be specified as interface and to be configured in DI container 2018-12-10 11:41:45 +03:00
SilverFire - Dmitry Naumenko
4d3a140482 Fixed additional regression in number formatting
Related to https://github.com/yiisoft/yii2/issues/16934
2018-12-06 17:35:30 +02:00
Groonya
db1d730695 Fixes #16822: Create config dir recursively in message/config 2018-12-05 01:37:12 +03:00
Groonya
8150cd1ed4 Fixes #16580: Delete unused php message files in MessageController if $removeUnused option is on 2018-12-05 01:35:44 +03:00
Alex
b4adada51e Fixes #16022: Fix UniqueValidator for PostgreSQL. Checks the uniqueness of keys in jsonb field 2018-12-05 00:06:51 +03:00
SilverFire - Dmitry Naumenko
a03376413c Fixed regression in formatter when passed value is a string representation of float without decimals 2018-12-03 18:22:11 +02:00
Bizley
bbfa45f133 Removed wrong spellout formatter test (#16924) 2018-12-01 23:43:02 +03:00
Bizley
59e99a67c7 Fixes #14950: Fixed yii\i18n\Formatter methods asInteger, asDecimal, asPercent, and asCurrency outputs for very big numbers 2018-11-29 18:16:19 +03:00
Robert Korulczyk
5349132043 Use sprintf() in Target::getTime() (#16883)
* Use `sprintf()` in `Target::getTime()`.

* Changelog line [skip ci].
2018-11-28 08:22:04 +01:00
SilverFire - Dmitry Naumenko
826a0fecdd Fixed excess logging of sensitive information in \yii\log\Target 2018-11-23 12:55:16 +02:00
SilverFire - Dmitry Naumenko
1e13bfd13d Fixed CSRF token check bypassing in Request::getMethod() 2018-11-23 12:55:16 +02:00
Anna Borzenko
d7ffda020b Fixes #16903: Fixed 'yii\validators\NumberValidator' method 'isNotNumber' returns false for true/false value 2018-11-23 12:55:07 +03:00
Bizley
3907895324 Fixes #16897: Fixed yii\db\sqlite\Schema missing primary key constraint detection in case of INTEGER PRIMARY KEY 2018-11-22 23:57:00 +03:00
Carsten Brandt
e16dcd9674 added test to verify intl number formatter works with text options
issue https://github.com/yiisoft/yii2/issues/16900
2018-11-22 09:58:39 +01:00
SilverFire - Dmitry Naumenko
8b7e878f1d Revert "Fixes #16629: ActiveField::inputOptions were not merged with options passed for radio and checkbox"
This reverts commit 8334ab3060 as it
breaks layout for checkboxes with Bootstrap
2018-11-21 18:32:24 +02:00
Paweł Jankowiak
8334ab3060 Fixes #16629: ActiveField::inputOptions were not merged with options passed for radio and checkbox 2018-11-20 01:12:17 +03:00
Nikolay Oleynikov
06227c7075 Fixes #16648: Html::strtolower() was corrupting UTF-8 strings 2018-11-20 01:09:03 +03:00
Evgeniy Moiseenko
9864837764 Revert change and added default time zone to test (#16876)
* Revert change and added default time zone to test(#15528)

* Return comment(#15528)
2018-11-09 21:05:51 +01:00
Damian Dziaduch
e11e3eb4c5 Allow \yii\console\widgets\Table to render empty table (#16865)
When headers provided but no columns.
Ref #16858
2018-11-06 00:05:49 +03:00
Robert Korulczyk
1fe3d61a3b Fixes #16838: yii\mutex\Mutex::acquire() no longer returns true if lock is already acquired by the same component in the same process 2018-11-05 00:23:23 +03:00