38 Commits

Author SHA1 Message Date
5df412df2c Fix #20282: Fix compatibility with PHP 8.4: deprecated constant E_STRICT 2024-12-06 12:31:20 +03:00
3fa2d61e54 Fix #20175: Fix bad result for pagination when used with GridView 2024-06-08 10:29:40 +03:00
52e4a3e645 release version 2.0.50 2024-05-30 20:23:31 +03:00
e2a167028b Upgrade to PSR12 coding standard (#20121) 2024-03-19 17:21:27 +03:00
161526cd41 HTTPS everywhere (#19503) 2022-08-03 12:32:18 +03:00
a87c02c712 Fix more types (#19333)
* Migration::upsert() returns void

* Unneeded `@property` tags

* Add missing `null` param/return types

* Null types for db\Query + db\ActiveQuery

* Fixed testSelect

* Null types for Validator

* Several more null types

* One more

* Make AccessRule::$allow always a boolean

It doesn't have any special null handling, so it's safe to default to false

* Validator::$skipOnEmpty is always a boolean

* Catch all throwable from Widget::widget()

* Don't limit $previous args to \Exception

The actual \Exception allows $previous to be any throwable in PHP 7+

* Add Throwable catch block to Instance::get()

* Throwable cleanup

Comment changes only.

- Document \Throwable instead of \Exception wherever appropriate
- Removed redundant exception/error classes when \Throwable is referenced

* Yii::setlogger() accepts null

* ArrayHelper::removeValue() can remove any type of value

* Change default $allow value to false
2022-04-03 11:20:21 +02:00
4628b91e73 Fix types (#19332)
* Migration::upsert() returns void

* Unneeded `@property` tags

* Add missing `null` param/return types

* Null types for db\Query + db\ActiveQuery

* Fixed testSelect
2022-03-30 18:40:10 +02:00
0041f034fd [doc] Update PHP doc links (#18957)
* Replace https://secure.php.net with https://www.php.net

* Replace http://www.php.net with https://www.php.net
2021-10-19 14:50:26 +02:00
95bf26a3ba Fix #18477: Fix detecting availability of Xdebug's stack trace in yii\base\ErrorException 2021-01-13 16:13:41 +03:00
ed1c087784 Fix #18317: Additional PHP 8 compatibility fixes
Co-authored-by: Bizley <pawel@positive.codes>
2020-10-23 12:42:44 +03:00
4c76dc4c90 Fix #16610: ErrorException trace was cut when using XDebug 2019-09-18 13:40:10 +03:00
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
4aa935e69e Fixes #12055: Changed boolean to bool and integer to int in phpdoc 2016-11-07 02:51:39 +03:00
32f4dc8997 Fixes #5385: links created from classes to corresponding guide articles (#12920) 2016-11-04 18:55:14 +03:00
9585939d9f Fixes #11723: Fixed PHP 7 + XDebug error handling displaying "Expected array for frame 0" 2016-06-09 15:30:48 +03:00
abc7dbbf0f added missing @since annotations 2015-08-04 12:40:12 +02:00
a2568d1ec8 updated some comments and @since annotations 2015-08-02 19:56:49 +02:00
6d9fe671de various code style and whitespace adjustments 2015-08-02 00:27:19 +02:00
8ced2ba96a Fixes #8933: Yii is now able to properly handle HHVM fatal errors 2015-07-28 10:32:52 +03:00
a92e214b9e Fixes #5770: Added more PHP error names for ErrorException 2014-10-31 09:52:45 -04:00
b2341edfcf add more default names of exceptions 2014-10-31 09:47:32 -04:00
33543cbdb3 improved error handler output on console app 2014-03-29 19:52:36 +01:00
bf3c75147d reverted breaking PHPdoc codestyle changes
issue #2852
2014-03-23 20:51:09 +01:00
b5f8a4dc22 Reformat code te be PSR-2 compatible 2014-03-16 10:46:21 +06:00
fad635440b Fixes #2655: Arrayable and ArrayableTrait are incompatible for some PHP versions. 2014-03-07 19:08:27 -05:00
1b7e1cd027 Merge pull request #2605 branch 'feature' of https://github.com/mongosoft/yii2 into code-style
* 'feature' of https://github.com/mongosoft/yii2:
  returned back formatting language files
  code style. WHILE
  code style. FOR
  code style. FOREACH
  code style. operator IF
  @param, @var, @property and @return must declare types as boolean, integer, string, array or null
  short echo tags
  short array syntax

Conflicts:
	extensions/apidoc/commands/RenderController.php
	extensions/apidoc/models/BaseDoc.php
	extensions/apidoc/models/Context.php
	extensions/apidoc/templates/bootstrap/Renderer.php
	extensions/apidoc/templates/bootstrap/layouts/guide.php
	extensions/apidoc/templates/bootstrap/layouts/main.php
	extensions/apidoc/templates/bootstrap/views/index.php
	extensions/apidoc/templates/html/Renderer.php
	extensions/apidoc/templates/offline/views/index.php
	extensions/apidoc/templates/offline/views/offline.php
	extensions/apidoc/templates/online/views/index.php
	extensions/elasticsearch/Connection.php
	extensions/redis/ActiveQuery.php
	framework/base/ErrorException.php
	framework/helpers/BaseFileHelper.php
	tests/unit/framework/helpers/FileHelperTest.php
2014-03-07 21:54:44 +01:00
96d131899f Fixed ErrorException changes 2014-03-07 13:46:21 +04:00
44558df59d #2603: yii\base\ErrorHandler now extends \ErrorHandler 2014-03-07 02:21:36 +04:00
c7e8d8b900 @param, @var, @property and @return must declare types as boolean, integer, string, array or null 2014-03-03 20:50:44 +03:00
0c38655217 psr-4 move 2014-01-10 21:41:43 -05:00
0d814fa523 Moved "framework" to "iii". 2013-05-09 12:00:15 -04:00
3616278ada typo. 2013-04-12 07:08:01 -04:00
f2027c1cdd Fixed errorexception trace type. 2013-04-10 23:36:44 -04:00
1df9114b9a refactored ErrorException handling. 2013-04-09 22:28:13 -04:00
4fdaab3560 updated file header. 2013-03-04 08:03:46 -05:00
7f1f1b7767 - Moved handling fatal errors into handleFatalError() method.
- Refactored checking for fatal error.
- Suppressed errors in exception handler in case of fatal errors.
2013-02-20 00:14:30 +04:00
97eda21ab6 ErrorException now extends from Exception 2013-02-20 00:00:25 +04:00
2d5db95149 More on error handling:
- Correct exit code for require errors in CLI mode. It was 0 even in case of error.
- Solved handling fatals and displaying custom error template w/o output buffering.
- If XDEBUG is available, error screen will display trace (implementation inspired by Kohana and Nette).
- Added ErrorException to store/display type of the error and user-friendly messages.
- Fatals are still logged in PHP log.
- Turned off native display_errors since we're now catching all errors.
- Added reserving memory (256kb) . Can be removed safely. In case of removal we're losing only memory exhausted error when allocating last very small chunk of memory.
- Properly handled errors in __toString (exception can't be thrown in this case).
- In the YII_DEBUG===false mode it's bad to display exception name even in page title.
- In the YII_DEBUG===true mode it's still useful to get user-friendly message additionally to exception name.
2013-02-13 03:51:29 +04:00