Carsten Brandt
393fc2744a
Added yii\base\Object for backwards compatibility
...
fixes #7936
close #14478
2017-07-19 10:53:33 +02:00
Carsten Brandt
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
Carsten Brandt
69673c0c94
Rename Object -> BaseObject for PHP 7.2 compatibility
...
issue #7936
2017-07-19 10:51:46 +02:00
Alexander Makarov
000192522b
Fixes #14482 : fixed tests incompatibility with PHP 5.4
2017-07-19 00:42:41 +03:00
Alexander Makarov
d38908fc13
Fixed #14469 : updated RFC links
2017-07-17 16:21:49 +03:00
Carsten Brandt
aba0b4a59a
added test that fails #14413
...
See #13979
close #14413
2017-07-16 01:47:49 +02:00
Alex
59002a9e1e
Fixes #6644 : Added yii\helpers\ArrayHelper::setValue()
2017-07-16 00:25:44 +03:00
Boudewijn Vahrmeijer
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
Dmitry Dorogin
6e223e6db2
Fixes #14423 : Fixed ArrayHelper::merge behavior with null values for integer-keyed elements
2017-07-13 10:36:59 +03:00
qihuajun
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
Carsten Brandt
c9347b0a57
Fixed ambiguous column error on indexBy with JOIN
...
fixes #13859
close #14431
2017-07-12 12:26:30 +02:00
Carsten Brandt
173108b5b0
Move getTablesUsedInFrom() from ActiveQuery to Query
...
enable this feature on the Query level
close #14431
2017-07-12 12:26:20 +02:00
Carsten Brandt
0070b97837
allow migrate/mark to mark the history base ( #14428 )
...
fixes #7890
2017-07-12 11:48:03 +02:00
yyxx9988
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
Carsten Brandt
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
Robert Korulczyk
d2781cd232
Added configuration for headers in PHP files generated by message/extract command ( #14417 )
2017-07-10 20:14:54 +03:00
Robert Korulczyk
a50d9d8e3e
Enable include rule in php-cs-fixer ( #14418 )
2017-07-10 13:19:57 +03:00
Robert Korulczyk
12eb936083
Enable heredoc_to_nowdoc rule in php-cs-fixer ( #14419 )
2017-07-10 13:18:52 +03:00
Robert Korulczyk
fe8a0a6a2e
Enable no_useless_else rule in php-cs-fixer ( #14420 )
2017-07-10 11:26:21 +03:00
Carsten Brandt
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
Andrew Nester
d26493a287
Fixes #13378 : Added skipOnEmpty option to SluggableBehaviour
2017-07-04 20:47:14 +03:00
Sergey Makinen
2b9f336dce
Merge branch 'master' of https://github.com/yiisoft/yii2 into db-constraints
2017-07-03 15:12:41 +03:00
Carsten Brandt
fadeb5d2b4
added formatter as second paramter to format closure
...
to allow reusing the formatter in custom formats.
fixes #4495
addition to #14326
2017-07-03 11:34:20 +02:00
Elvira Sheina
aca7390a47
Added closure support in yii\i18n\Formatter #4495 ( #14326 )
2017-07-03 11:11:35 +02:00
Daniel Gómez Pan
b0ad73e361
Fixes #11415 : Added yii\console\widgets\Table to draw tables in console apps
2017-06-29 18:19:55 +03:00
Sergey Makinen
237e7eda3a
Merge branch 'master' of https://github.com/yiisoft/yii2 into db-constraints
2017-06-28 21:42:55 +03:00
Sergey Makinen
452974cab3
Mark not supported constraint retrieving methods
2017-06-28 21:40:52 +03:00
Pavel Chaplygin
e38310546e
Fixes #14334 : Fixed \yii\db\QueryBuilder::buildNotCondition loses params when operand is \yii\db\Expression
2017-06-27 14:46:14 +03:00
Alexander Makarov
d4c15c36d0
Fixes #14304 : Fixed yii\validators\UniqueValidator and yii\validators\ExistValidator to skip prefixes in case expressions are used
2017-06-27 00:02:47 +03:00
Sergey Makinen
3de6f8e397
Rename DefaultConstraint to DefaultValueConstraint
2017-06-21 12:19:16 +03:00
Elvira Sheina
cfaec11da5
Fixes #13824 : Support extracting concatenated strings in yii message
2017-06-21 01:25:12 +03:00
Robert Korulczyk
8d05e81bd4
Fixes #14307 : Fixed PHP warning when yii\console\UnknownCommandException is thrown for empty command
2017-06-18 18:40:15 +03:00
Sergey Makinen
c8856ccd4e
Fix merging issues & CS
2017-06-17 01:02:01 +03:00
Carsten Brandt
f212bc6caf
ensure tablenames are not replaced in insert and update
2017-06-16 16:02:34 +02:00
Sergey Makinen
f820d2ca36
Merge branch 'master' into db-constraints
2017-06-16 16:52:43 +03:00
Robert Korulczyk
ba0ab403b5
Added php-cs-fixer coding standards validation to Travis CI ( #14100 )
...
* php-cs-fixer: PSR2 rule.
* php-cs-fixer: PSR2 rule - fix views.
* Travis setup refactoring.
* Add php-cs-fixer to travis cs tests.
* Fix tests on hhvm-3.12
* improve travis config
* composer update
* revert composer update
* improve travis config
* Fix CS.
* Extract config to separate classes.
* Extract config to separate classes.
* Add file header.
* Force short array syntax.
* binary_operator_spaces fixer
* Fix broken tests
* cast_spaces fixer
* concat_space fixer
* dir_constant fixer
* ereg_to_preg fixer
* function_typehint_space fixer
* hash_to_slash_comment fixer
* is_null fixer
* linebreak_after_opening_tag fixer
* lowercase_cast fixer
* magic_constant_casing fixer
* modernize_types_casting fixer
* native_function_casing fixer
* new_with_braces fixer
* no_alias_functions fixer
* no_blank_lines_after_class_opening fixer
* no_blank_lines_after_phpdoc fixer
* no_empty_comment fixer
* no_empty_phpdoc fixer
* no_empty_statement fixer
* no_extra_consecutive_blank_lines fixer
* no_leading_import_slash fixer
* no_leading_namespace_whitespace fixer
* no_mixed_echo_print fixer
* no_multiline_whitespace_around_double_arrow fixer
* no_multiline_whitespace_before_semicolons fixer
* no_php4_constructor fixer
* no_short_bool_cast fixer
* no_singleline_whitespace_before_semicolons fixer
* no_spaces_around_offset fixer
* no_trailing_comma_in_list_call fixer
* no_trailing_comma_in_singleline_array fixer
* no_unneeded_control_parentheses fixer
* no_unused_imports fixer
* no_useless_return fixer
* no_whitespace_before_comma_in_array fixer
* no_whitespace_in_blank_line fixer
* not_operator_with_successor_space fixer
* object_operator_without_whitespace fixer
* ordered_imports fixer
* php_unit_construct fixer
* php_unit_dedicate_assert fixer
* php_unit_fqcn_annotation fixer
* phpdoc_indent fixer
* phpdoc_no_access fixer
* phpdoc_no_empty_return fixer
* phpdoc_no_package fixer
* phpdoc_no_useless_inheritdoc fixer
* Fix broken tests
* phpdoc_return_self_reference fixer
* phpdoc_single_line_var_spacing fixer
* phpdoc_single_line_var_spacing fixer
* phpdoc_to_comment fixer
* phpdoc_trim fixer
* phpdoc_var_without_name fixer
* psr4 fixer
* self_accessor fixer
* short_scalar_cast fixer
* single_blank_line_before_namespace fixer
* single_quote fixer
* standardize_not_equals fixer
* ternary_operator_spaces fixer
* trailing_comma_in_multiline_array fixer
* trim_array_spaces fixer
* protected_to_private fixer
* unary_operator_spaces fixer
* whitespace_after_comma_in_array fixer
* `parent::setRules()` -> `$this->setRules()`
* blank_line_after_opening_tag fixer
* Update finder config.
* Revert changes for YiiRequirementChecker.
* Fix array formatting.
* Add missing import.
* Fix CS for new code merged from master.
* Fix some indentation issues.
2017-06-12 12:25:45 +03:00
Robert Korulczyk
ab68caa867
Removed unused local var in JS test ( #14093 )
2017-06-11 19:20:31 +03:00
SilverFire - Dmitry Naumenko
cb53b2feec
Fixes #14081 : Added yii\caching\CacheInterface to make custom cache extensions adoption easier
2017-06-11 19:18:33 +03:00
Tigrov
2b7e8be1e8
Fixes #14192 : Fixed wrong default null value for TIMESTAMP when using PostgreSQL
2017-06-11 18:48:15 +03:00
Kolyunya
9031a115b9
Fixes #13586 : Added $preserveNonEmptyValues property to the yii\behaviors\AttributeBehavior
2017-06-11 17:56:06 +03:00
vladis84
f6b54e1ac8
Fixes #14089 : Added tests for yii\base\Theme
2017-06-11 17:38:23 +03:00
Carsten Brandt
2b9f0006d5
added example for using unsupported PHP format in yii formatter
...
fixes #14278
2017-06-09 12:07:38 +02:00
Bizley
deea1829db
Fixes #14264 : Fixed a bug where yii\log\Logger::calculateTimings() was not accepting messages with array tokens
2017-06-08 12:57:43 +03:00
Carsten Brandt
226f524da3
skip failing HHVM test
...
see https://github.com/yiisoft/yii2/issues/14244
2017-06-05 13:25:51 +02:00
Paul Klimov
40e5702b6b
Fixes #5108 DateValidator resets $timestampAttribute value on empty attribute ( #14242 )
...
* `yii\validators\DateValidator` now resets `$timestampAttribute` value on empty validated attribute value
* array-value test at `DateValidatorTest` restored
2017-06-05 11:50:02 +02:00
Carsten Brandt
b8d5a35916
Merge pull request #14241 from cebe/migration-namespaces
...
Added support for specifying aliases for migrationNamespaces
2017-06-05 11:38:26 +02:00
Paul Klimov
cd3c6404cb
Fixes #4999 : Added support for wildcards at yii\filters\AccessRule::$controllers
2017-06-02 21:19:38 +03:00
Carsten Brandt
5288577221
make migrationPath accept an array
2017-06-02 13:35:45 +02:00
Paul Klimov
0beb59305c
Fixes #13058 : Fixed caught exception thrown during view file rendering produces wrong output
2017-06-02 01:30:21 +03:00
Carsten Brandt
6e7ea782c0
fix cloning of DB connection for sqlite in-memory db
...
fixes #14131
close #14232
2017-06-01 11:43:49 +02:00