253 Commits

Author SHA1 Message Date
161526cd41 HTTPS everywhere (#19503) 2022-08-03 12:32:18 +03:00
474a67da99 Fix caching in Formatter::getUnitMessage() (#19445)
* Fix caching in `Formatter::getUnitMessage()`

* Update FormatterTest.php

* Update CHANGELOG.md
2022-06-16 11:32:08 +02:00
14369f0a51 Fix outdated links in Formatter (#19422) 2022-06-01 08:07:27 +02:00
0741c4cab0 Allow null values for date formatters in Formatter (#19348) 2022-04-11 12:11:33 +02: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
1271bc419f Fix #19041: Fix PHP 8.1 issues 2022-01-14 13:52:01 +03:00
e68b7ae162 Fix #19138: Allow digits in language code
Co-authored-by: ntesic <nikolatesic@gmail.com>
2022-01-08 12:32:19 +03:00
655786b7ed release version 2.0.44 2021-12-30 10:50:56 +03: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
ccf979196c Fix yii\i18n\GettextMessageSource PHPDoc (#18916) 2021-10-03 00:23:20 +03:00
01b6b2a5d1 Fix #18913: Add filename validation for MessageSource::getMessageFilePath()
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
2021-10-01 00:52:36 +03:00
e3028c524d Fix #18899: Replace usages of strpos with strncmp and remove redundant usage of array_merge and array_values 2021-09-28 11:06:46 +03:00
c8e4e0727a Fix #18674: Added more user-friendly exception messages for yii\i18n\Formatter 2021-08-09 10:26:10 +03:00
4276eb4955 Fix $value parameter types in yii\i18n\Formatter::normalizeDatetimeValue() 2021-07-08 10:30:32 +03:00
9d56179e9d Updated asUrl method to not introduce BC break (#18742) 2021-07-04 11:03:19 +02:00
c43a168a31 Fix #18712: Added $scheme option to yii\i18n\Formatter::asUrl() 2021-07-02 11:26:24 +03:00
d5a428e001 Fix some code smells (#18696) 2021-06-05 13:37:45 +03:00
6182284039 Update Formatter types 2021-03-04 17:03:03 +03:00
4e2045c040 release version 2.0.41 2021-03-04 00:51:35 +03:00
684310828b Fix #18464: Fix bug with processing fallback messages when translation language is set to null 2021-01-11 15:18:39 +03:00
b8f4958092 Fix #18442: Fix calls with array access to strings 2020-12-23 01:08:58 +03:00
ccb14ff667 release version 2.0.39 2020-11-10 13:58:35 +03:00
f3f5312469 Update BaseHtml and Formatter typehints (#18185) 2020-07-19 11:14:45 +03:00
d07cbdaab3 Fix #17975: Fix deleting unused messages with console command if message tables were created manually (auerswald, cebe)
Co-authored-by: AA <auerswald@users.noreply.github.com>
Co-authored-by: Carsten Brandt <mail@cebe.cc>
2020-05-02 13:45:38 +03:00
e20358241c Fix #17993: Added yii\i18n\Formatter::$currencyDecimalSeparator to allow setting custom symbols for currency decimal in IntlNumberFormatter 2020-05-02 11:58:01 +03:00
0ba67fac0c Fix #17767: Make Formatter::formatNumber method protected 2020-01-04 19:59:06 +03:00
5efe0bda8f Fix #17585: Fix yii\i18n\Formatter including the @calendar locale param in Yii::t() calls 2019-10-07 18:45:51 +03:00
a9097dbac3 Fix #17435: Fixed i18n_init migration for MSSQL 2019-07-15 23:05:26 +03:00
33405fa4a5 Fixes #17268: Fixed Formatter didn't take power into account 2019-04-15 17:48:32 +03:00
72b4e6d47c kB instead of KB (#16368)
* kB instead of KB

When kilobyte is referred to 1000 bytes the abbreviation should be written with lower case "k" as kB. Upper case K is usually intended to refer to 1024 multiplier
See this page: https://en.wikipedia.org/wiki/Kilobyte
2019-03-20 21:04:43 +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
ed64d65886 release version 2.0.16 2019-01-31 00:54:16 +01:00
22d30f1999 Fixes #15286: Fixed incorrect formatting of time with timezone information 2019-01-09 09:59:56 -05:00
1db55e6b0d Normalizing string numeric (#16943) 2018-12-10 11:50:50 +03:00
4d3a140482 Fixed additional regression in number formatting
Related to https://github.com/yiisoft/yii2/issues/16934
2018-12-06 17:35:30 +02:00
a03376413c Fixed regression in formatter when passed value is a string representation of float without decimals 2018-12-03 18:22:11 +02:00
8bccbd595d Update Formatter.php 2018-12-03 11:33:40 +01:00
fe07177ddd Update Formatter.php 2018-12-03 09:56:28 +01:00
bbfa45f133 Removed wrong spellout formatter test (#16924) 2018-12-01 23:43:02 +03:00
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
40d8639a91 Update Formatter.php 2018-11-02 10:20:28 +01:00
1a74b3d4f8 [minor] SCA with Php Inspections (EA Ultimate) (#15871)
* Php Inspections (EA Ultimate): use type casting where applicable

* Php Inspections (EA Ultimate): use constants where applicable

* Php Inspections (EA Ultimate): CS

* Php Inspections (EA Ultimate): address some of one-time used variables

* Php Inspections (EA Ultimate): address some of performance-related findings

* Php Inspections (EA Ultimate): address some of performance-related findings

* Php Inspections (EA Ultimate): revert a constant usage

* Php Inspections (EA Ultimate): revert sequential assignments

* Php Inspections (EA Ultimate): build is green again

* Php Inspections (EA Ultimate): revert array_merge tweaks

* Php Inspections (EA Ultimate): revert BC-incompatible one-time used variable tweak

* Update description [skip ci]

* Php Inspections (EA Ultimate): CS
2018-03-12 01:37:19 +03:00
f10cb6aeee SCA with Php Inspections (EA Ultimate) 2018-02-27 19:13:22 +01:00
22832b7c49 release version 2.0.14 2018-02-19 00:27:09 +02:00
e6f5c46cdc Fixes #15633: Deprecate some things going away/changing in 2.1
- Deprecated `yii\base\BaseObject::className()` in favor of native PHP syntax `::class`, which does not trigger autoloading
- Deprecated XCache and Zend data cache support as caching backends
- Deprecated `yii\BaseYii::powered()` method
- Added `yii\base\InvalidArgumentException` and deprecated `yii\base\InvalidParamException`
- Added `yii\BaseYii::debug()` and deprecated `yii\BaseYii::trace()`
2018-02-11 01:48:29 +03:00
e9bec0d246 Reordered property to top [skip ci] 2018-02-07 11:55:43 +03:00
10eac963d3 Fixed typo [skip ci] 2018-02-03 18:55:27 +03:00
63fdd26b7e Fixes #8527: Added yii\i18n\Locale component having getCurrencySymbol() method
Co-authored-by: Anton Gubarev <a.p.gubarev@gmail.com>
2018-02-03 18:01:54 +03:00
65f6b59b35 @inheritdoc notation changed 2018-01-23 13:11:24 +02:00