Commit Graph

557 Commits

Author SHA1 Message Date
Alexander Makarov
45432cc653 #9528: added missing data provider for JSON formatter test, added changelog and upgrade note, added @since tag to new property 2015-11-25 05:52:15 +03:00
MaXL
4f81b4a99d Fixes #9528: Traversable objects are now formatted as arrays in yii\web\XmlResponseFormatter to support SPL objects and Generators 2015-11-25 05:51:12 +03:00
SilverFire - Dmitry Naumenko
7ac2bc13f7 Overrides c651dbb7. yii\web\ErrorHandler::loggableGlobals renamed to displayVars 2015-11-22 17:47:48 +02:00
SilverFire - Dmitry Naumenko
c651dbb798 Added yii\web\ErrorHandler::loggableGlobals, removed $_ENV and $_SERVER from dumping by default 2015-11-22 17:14:16 +02:00
Mehdi Achour
faa7a731c7 #10158: Remove defer attribute value from test case
Also fixed the CHANGELOG.md entry positionning
2015-11-19 13:05:13 +01:00
SilverFire - Dima Naumenko
ac7b0ef6ff ErrorHandler - hardcoded UTF-8 in mb_* functions
As `Yii::$app` may be not initialized on the moment of error,
decided to hardcode UTF-8.

PR  #10169
2015-11-17 14:18:26 +02:00
Mehdi Achour
06d499ab02 #10158: Accept arrays for 'js' as well
Also applied @samdark comments on array testing
2015-11-17 10:55:05 +01:00
SilverFire - Dima Naumenko
a6e1ba2cf6 Fixed mb_ functions calls to use UTF-8 or app charset 2015-11-17 09:02:22 +02:00
Mehdi Achour
cf01d5ff92 Use PHP type casting instead of ArrayHelper 2015-11-16 18:16:29 +01:00
Mehdi Achour
5619e98eda Allow setting css options per CSS file in AssetBundle::, fixes #10158 2015-11-16 15:12:14 +01:00
SilverFire - Dima Naumenko
e3c49f243c UrlRule::placeholders, UrlRule::substitutePlaceholderNames are now protected. Updated PHPDoc and UPDATE.md 2015-11-09 19:22:51 +02:00
SilverFire - Dima Naumenko
289b051c4a Bug #9999: Fixed yii\web\UrlRule to allow route parameter names with -, _, .characters 2015-10-31 09:45:53 +02:00
Alexander Makarov
fe4cbd30d6 Fixes #9803: Added option to register asset with scheme (reverted from commit 57dc8540fd) 2015-10-29 12:38:42 +03:00
Nikita Verkhovin
57dc8540fd Fixes #9803: Added option to register asset with scheme 2015-10-28 14:08:56 +03:00
kidol
4bc2eb7945 Fixes controller DI 2015-10-12 15:52:19 +02:00
Alexander Makarov
8260cfa4ea Compare with null instead of isset 2015-10-10 01:12:59 +03:00
Alexander Makarov
5ab4f0f090 Better quotes usage in strings
- Use single quote where interpolation isn't necessary
- Use interpolation when it's better than concatenation
2015-10-10 00:23:52 +03:00
nainoon
3a313ac652 Fixes #9874: Fixed outputting exception stacktrace in non-debug mode when Response::FORMAT_RAW is used 2015-10-09 23:41:15 +03:00
Alexander Makarov
0712bad090 Fixes #9846: Fixed yii\web\User::loginRequired() should throw 401 not 403 (reverted from commit 4e715f9d65)
See https://github.com/yiisoft/yii2/issues/9846#issuecomment-146891825
2015-10-09 22:13:39 +03:00
spikyjt@gmail.com
4e715f9d65 Fixes #9846: Fixed yii\web\User::loginRequired() should throw 401 not 403 2015-10-07 18:16:42 +03:00
jeicd
c2f83da8d8 Fix phpdoc 2015-10-05 15:00:13 +06:00
jeicd
0407407b76 fix coding style to follow PSR-2 2015-10-05 13:58:47 +06:00
Alexander Makarov
fbe5bb7d20 Fixed generation of canonical URLs for ViewAction pages 2015-10-03 17:58:38 +03:00
Kevin LEVRON
bc543db206 fix doc 2015-09-28 15:25:29 +02:00
Alexander Makarov
3b140d9eff Merge branch 'master' into json-error-response
# Conflicts:
#	framework/CHANGELOG.md
2015-09-27 19:47:14 +03:00
mdmunir
b7020065c8 Fixes #9476: Added DI injection via controller action method signature 2015-09-27 19:35:43 +03:00
Carsten Brandt
73d6f32234 fixed name conflict between class and file name for UnprocessableEntityHttpException
pr #9733
2015-09-27 09:54:53 +02:00
Alexander Makarov
a8329c837a Merge branch '2103' of https://github.com/janfrs/yii2 into janfrs-2103 2015-09-27 10:42:58 +03:00
Boudewijn Vahrmeijer
dd818e17df Fixes #9754: Fixed \yii\web\Request error when path info is empty 2015-09-23 15:06:23 +03:00
janfrs
194b80b00e Fix comment msg UnprocessableEntity #2106 2015-09-20 22:28:25 -03:00
janfrs
07199cbf61 Change to since 2.0.7 on UnprocessableEntity #2106
Thanks to @Renkas for noticing
2015-09-20 15:18:52 -03:00
janfrs
7562fe940e Add Unprocessable Entity Exception as in #2106 2015-09-19 17:05:28 -03:00
bpteam
703f374a85 Fixes #9596: Fixed \yii\web\UrlManager::createAbsoluteUrl(['site/index', '#' => 'testHash']) losing hash 2015-09-05 11:40:45 +03:00
Carsten Brandt
5a069d1a3c Fixed inappropriate error response on invalid JSON request
Current API responds to invalid JSON with:

```json
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=UTF-8
...

{"name":"Bad Request","message":"Invalid JSON data in request body: Syntax error.","code":0,"status":400,"previous":{"name":"Internal Server Error","message":"There was an error at the server.","code":0,"status":500}}
```

While it should be

```json
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=UTF-8
...

{"name":"Bad Request","message":"Invalid JSON data in request body: Syntax error.","code":0,"status":400}
```
2015-09-02 23:10:38 +02:00
Alexander Kochetov
223b0bea5d Fixes #9369: Yii::$app->user->can() now returns false instead of erroring in case authManager component is not configured 2015-08-11 11:16:21 +03:00
Carsten Brandt
abc7dbbf0f added missing @since annotations 2015-08-04 12:40:12 +02:00
Carsten Brandt
854e186210 fixed caching issue with UrlManager::createUrl
this fix will skip the cache in case we encounter a situation which can
not easily be cached.

fixes #9091
2015-08-03 00:31:59 +02:00
Carsten Brandt
6e3da6b329 various phpdoc fixes 2015-08-02 22:53:08 +02:00
Carsten Brandt
a2568d1ec8 updated some comments and @since annotations 2015-08-02 19:56:49 +02:00
Alexander Makarov
372211a865 Better type check in AssetManager 2015-08-02 19:20:55 +03:00
Alexander Makarov
6312f2adad #9249: fixed wrong condition 2015-08-02 14:35:09 +03:00
Alexander Makarov
6987358e2a #9249: better check for file/dir 2015-08-02 14:29:52 +03:00
Alexander Makarov
d3e91abf00 Added @since tag to yii\web\AssetManager::$hashCallback 2015-08-02 12:49:47 +03:00
Petra Barus
2261db0a5f Adding callback for custom hash generation in AssetManager. 2015-08-02 16:16:32 +07:00
Carsten Brandt
6d9fe671de various code style and whitespace adjustments 2015-08-02 00:27:19 +02:00
Alexander Makarov
9a87271abf Fixed missing stacktrace items on PHP syntax errors of "unexpected end of file" type 2015-07-30 16:30:36 +03:00
Chris Harris
26e5b021a8 Fixes #9246: Added yii\web\UrlRule::getParamRules() 2015-07-29 17:10:51 +03:00
Klimov Paul
984afd3c6e yii\web\ErrorAction displays 404 error instead of blank page on direct access 2015-07-24 17:24:10 +03:00
zetamen
df6f270a0e Fixes #9161: Fixed yii\web\Request ignore queryParams when resolve request 2015-07-21 10:40:31 +03:00
Alexander Makarov
b53f50a762 Reverted #9140
See discussion at ef27d820d2
2015-07-18 22:08:47 +03:00