2698 Commits

Author SHA1 Message Date
87f988fe54 One more try to fix tests on Travis 2017-08-16 11:44:49 +03:00
6424acf67f One more try to fix tests on Travis 2017-08-16 08:33:25 +03:00
b9f582dbf3 Try to fix tests on Travis 2017-08-16 08:04:35 +03:00
7c73b0b79d Enhanced tests, updated CHNAGELOG 2017-08-15 23:13:59 +03:00
b577e302f7 Enhanced PHPDocs, added tests 2017-08-14 23:48:33 +03:00
4028c69ed5 Merge branch 'master' into nineinchnick-9703-si-formatters
Conflicts:
	framework/i18n/Formatter.php
2017-08-14 22:55:45 +03:00
3dbc07f8dd fix test to work around PDO bug
This test is failing on PHP 7.0.7 on travis but seems fine
on PHP 7.1.x > 7.1.0-alpha

See:

- cda3089623
- https://gist.github.com/cebe/badfec47a8c3fcc4ffcf1625ca8e0655
2017-08-14 12:33:11 +02:00
e9fad56381 #14151: Added attribute name to AttributesBehavior callback signature
See 6ffa5fb087 (commitcomment-23630375)
2017-08-14 12:11:59 +03:00
7cac7f131d Set back original locale in #14448 test 2017-08-14 02:34:23 +03:00
2b9b0c7166 Fixes #14151: Added AttributesBehavior that assigns values specified to one or multiple attributes of an AR object when certain events happen 2017-08-14 01:03:10 +03:00
cda3089623 Fixed batchInsert casting of double values according to locale (#14448)
fixes #6526
2017-08-13 22:15:04 +02:00
368540f8d0 Added tests 2017-08-13 21:15:06 +03:00
648971a82b Fixes #14542: Ensured only ASCII characters are in CSRF cookie value since binary data causes issues with ModSecurity and some browsers 2017-08-07 13:55:10 +03:00
6fdeba501d Adjusted tests after 1761a10c13093d634a3a13310c5a238410a64280 2017-08-04 00:51:27 +03:00
0c0cc1074d fix current time in formatter (#14203)
* fix current time in formatter

* expand testAsDatetime

* Update FormatterDateTest.php

* Update CHANGELOG.md
2017-08-03 10:20:37 +02:00
d6578f83ba Codeclimate rules update (#13915) 2017-08-02 16:16:51 +03:00
f7fb7cdd87 Fixes #14022: Added posibility to use aliases in yii\web\UrlManager::setBaseUrl() (#14540) 2017-07-31 13:32:08 +02:00
e18e98ffb3 Fixes #14363: Added yii\widgets\LinkPager::$linkContainerOptions and possibility to override tag in yii\widgets\LinkPager::$options 2017-07-30 13:27:32 +03:00
8f2d9baf98 Fixes #14186, Fixes #14510: yiiActiveForm regressions
- #14186: Forced validation in `yiiActiveForm` do not trigger `afterValidate` event
- #14510: The state of a form is always "not validated" when using forced validation in `yiiActiveForm`
2017-07-29 14:37:29 +03:00
e472b4e29c Fixes #14525: Fixed 2.0.12 regression of loading of global fixtures trough yii fixture/load 2017-07-26 14:35:20 +03:00
a731fd4142 Fixes #14318: Trigger yiiActiveForm.events.afterValidateAttribute after updating attribute 2017-07-24 23:25:47 +03:00
d4ded67f69 Fixes #14513: Updated phpdoc and added tests for yii\rbac\ManagerInterface::assign and yii\rbac\ManagerInterface::revoke functions (#14528) 2017-07-24 23:20:03 +03:00
1ee29c630d Fixes #14493: Fixed getting permissions in yii\rbac\Dbmanger::getPermissionsByUser by user with id equals 0 2017-07-24 18:42:40 +03:00
e2ba94abd6 Fixes #7823: Added yii\filters\AjaxFilter filter 2017-07-24 17:25:16 +03:00
578b2caf42 Added yii\web\MultipartFormDataParser::$force option allowing to enforce parsing even on 'POST' request 2017-07-24 15:28:22 +03:00
8ae2223c6a Fixes #14370: Fixed creating built-in validator in model with same function name 2017-07-23 17:17:20 +03:00
6782ad96f0 Reduce Segmentation fault errors for PHP 5.4 tests on travis. (#14092) 2017-07-21 21:29:40 +03:00
6d2e0aff82 Fixes #14406: Fixed caching rules in yii\web\UrlManager with different ruleConfig configuration 2017-07-19 23:45:03 +03:00
393fc2744a Added yii\base\Object for backwards compatibility
fixes #7936
close #14478
2017-07-19 10:53:33 +02:00
758f01934f Make PHPUnit run on PHP 7.2
fix PHPUnit at 4.8.34 as the next version breaks our compatibility
Layer:
a55235c033
2017-07-19 10:51:46 +02:00
69673c0c94 Rename Object -> BaseObject for PHP 7.2 compatibility
issue #7936
2017-07-19 10:51:46 +02:00
000192522b Fixes #14482: fixed tests incompatibility with PHP 5.4 2017-07-19 00:42:41 +03:00
d38908fc13 Fixed #14469: updated RFC links 2017-07-17 16:21:49 +03:00
aba0b4a59a added test that fails #14413
See #13979

close #14413
2017-07-16 01:47:49 +02:00
59002a9e1e Fixes #6644: Added yii\helpers\ArrayHelper::setValue() 2017-07-16 00:25:44 +03:00
03d53b785d Fixes #14449: Fix PHP 7.2 compatibility bugs and add explicit closure support in yii\base\Application 2017-07-14 12:23:03 +03:00
6e223e6db2 Fixes #14423: Fixed ArrayHelper::merge behavior with null values for integer-keyed elements 2017-07-13 10:36:59 +03:00
f5e8a89319 Fix slave usage disabled after Connection::close, set _slave to false instead of nulll
fixes #14165
close #14168
2017-07-12 15:03:48 +02:00
c9347b0a57 Fixed ambiguous column error on indexBy with JOIN
fixes #13859
close #14431
2017-07-12 12:26:30 +02:00
173108b5b0 Move getTablesUsedInFrom() from ActiveQuery to Query
enable this feature on the Query level

close #14431
2017-07-12 12:26:20 +02:00
0070b97837 allow migrate/mark to mark the history base (#14428)
fixes #7890
2017-07-12 11:48:03 +02:00
46bf3c410a Add yii\web\Request::getOrigin() method that returns HTTP_ORIGIN of current CORS request
>The Origin request header indicates where a fetch originates from. It doesn't include any path information, but only the server name. It is sent with CORS requests, as well as with POST requests. It is similar to the Referer header, but, unlike this header, it doesn't disclose the whole path.

From https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin

Working code samples

```php
<?php

// We'll be granting access to only the arunranga.com domain
// which we think is safe to access this resource as application/xml

if($_SERVER['HTTP_ORIGIN'] == "http://arunranga.com") {
    header('Access-Control-Allow-Origin: http://arunranga.com');
    header('Content-type: application/xml');
    readfile('arunerDotNetResource.xml');
} else {
  header('Content-Type: text/html');
  echo "<html>";
  echo "<head>";
  echo "   <title>Another Resource</title>";
  echo "</head>";
  echo "<body>",
       "<p>This resource behaves two-fold:";
  echo "<ul>",
         "<li>If accessed from <code>http://arunranga.com</code> it returns an XML document</li>";
  echo   "<li>If accessed from any other origin including from simply typing in the URL into the browser's address bar,";
  echo   "you get this HTML document</li>",
       "</ul>",
     "</body>",
   "</html>";
}
?>
```
See https://developer.mozilla.org/en-US/docs/Web/HTTP/Server-Side_Access_Control for more info.

close #13835
2017-07-12 11:10:21 +02:00
0559a95db9 Fixed ambiguous column error in BaseActiveRecord::refresh()
when the query adds a JOIN by default

fixes #13757
2017-07-11 11:47:35 +02:00
d2781cd232 Added configuration for headers in PHP files generated by message/extract command (#14417) 2017-07-10 20:14:54 +03:00
a50d9d8e3e Enable include rule in php-cs-fixer (#14418) 2017-07-10 13:19:57 +03:00
12eb936083 Enable heredoc_to_nowdoc rule in php-cs-fixer (#14419) 2017-07-10 13:18:52 +03:00
fe8a0a6a2e Enable no_useless_else rule in php-cs-fixer (#14420) 2017-07-10 11:26:21 +03:00
e0dde88b87 Merge PR #14015 branch 'db-constraints' from sergeymakinen/yii2
Implement retrieving DBMS constraints

* db-constraints2: (21 commits)
  CHANGELOG for #14105
  added missing abstract methods to ConstraintFinderTrait
  avoid dependency of SqlTokenizer on sqlite implementation
  Mention an usage magic in descriptions
  Fix an unknown variable usage bug
  updated phpdoc
  make schema cache version a constant
  Have I fixed these phpdocs? Let’s see…
  Fixed phpdoc [skip ci]
  Mark not supported constraint retrieving methods
  Add PHPDoc
  Fix typo [skip ci]
  Rename DefaultConstraint to DefaultValueConstraint
  Fix imports
  Fix merging issues & CS
  Add Command tests
  Fix constraint tests
  Disable column comment test on old CUBRID
  Fix dropping unique/indexes
  Fix schema caching on commands
  ...
2017-07-07 22:57:58 +02:00
d26493a287 Fixes #13378: Added skipOnEmpty option to SluggableBehaviour 2017-07-04 20:47:14 +03:00
2b9f336dce Merge branch 'master' of https://github.com/yiisoft/yii2 into db-constraints 2017-07-03 15:12:41 +03:00