octicon-git-branch(16/) Commit Graph

2276 Commits

Author SHA1 Message Date
Alexander Makarov
ee644ee997 Added more composer autoload optimization strategies to performance tuning guide [skip ci] 2017-03-13 13:25:56 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Makarov
d37b82d505 Added tip about using PSR-3 loggers to docs [skip ci] 2017-03-09 02:15:40 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Robert Korulczyk
e448ed7444 Update docs 2017-03-01 12:22:53 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
5727699445 Aadded OWASP references to security guide (#13667) [skip ci]
Currently security guide is very thrifty with information on what a topic is about. So for beginners it is not clear why something like CSRF or XSS protection is even needed.

I added a few reference links to allow reading about more background behind the topics.
2017-02-27 11:31:04 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Hiren Bhut
17d03977a0 Fixed mistake in guide code for list retrieval from the DB (#13634) 2017-02-24 00:44:50 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
SilverFire - Dmitry Naumenko
50927d0751 Enhanced core-validators docs
Closes #13485
2017-02-21 22:36:26 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Bob Olde Hampsink
30b7fc8dc1 Fixes #13577: yii\db\QueryBuilder::truncateTable should work consistent over all databases 2017-02-20 23:38:50 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Roman Grinyov
2e32e97c02 fix anchor
http://www.yiiframework.com/doc-2.0/guide-db-migrations.html#creating-migrations
2017-02-16 23:30:45 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Makarov
39d3316e65 Rereferenced OCI PDO emulation from docs [skip ci] 2017-02-15 11:58:45 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Makarov
7db178d8bb Fixes #13526: added reference to loading default values from schema to DefaultValueValidator section of validation guide [skip ci] 2017-02-14 20:50:26 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
bf13f01b85 fixed some guide issues 2017-02-10 23:30:53 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
7e8d9c5c5f added note about protocol relative URL pattern to the guide 2017-02-08 12:28:07 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Makarov
93fbc55b23 Added edge case handling to aggregation example in docs [skip ci]
See https://github.com/yiisoft/yii2/issues/12491#issuecomment-276593948
2017-02-02 20:47:22 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Nobuo Kihara
e99deef49c docs/guide/structure-assets.md minor fixes [ci skip] (#13498) 2017-02-02 17:50:29 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Makarov
72a690216a Fixes #13466: Added info about generating migration which adds multiple columns at once [skip ci] 2017-02-01 01:17:27 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
8faedcbd7c Refactored UrlManagerTest to cover more use cases
UrlManager is a complex class with a large bunch of options that needs
to be tested
and we had a few regressions in the past even though there are already a
lot of tests
covering it. Test coverage measured by lines does not help us determine
how good it is tested,
we need test coverage for every major path through the code.

I have refactored the UrlManager tests to reflect the different options
and cases to
have a better overview of which cases are covered and which are not.

UrlManager has two main operation modes:

- "default" url format, which is the simple case. These are covered by
  methods in `UrlManagerTest`.

- "pretty" url format. This is the complex case, which involves UrlRules
  and url parsing.
  I have created two separate classes for this case:
  Url creation for "pretty" url format is covered by
`UrlManagerCreateUrlTest`.
  Url parsing for "pretty" url format is covered by
`UrlManagerParseUrlTest`.

Each of the test classes have a `getUrlManager` method that creates a
UrlManager instance
with a specific configuration and certain variations in options.
It is also tested that options that are not relevant in a certain
operation mode have no effect on the result.

To make sure to not remove tests that have existed before, here is a map
of where code has been moved.
The following test methods existed in the [old test
class](4187718c14/tests/framework/web/UrlManagerTest.php):

- `testCreateUrl()` split between UrlManagerTest and
  UrlManagerCreateUrlTest variations should all be covered by
`variationsProvider()`.
- `testCreateUrlWithNullParams()` covered by UrlManagerCreateUrlTest by
  `testWithNullParams()`
- `testCreateUrlWithEmptyPattern()`
- `testCreateAbsoluteUrl()` covered in UrlManagerCreateUrlTest by new
  tests via `variationsProvider()`.
- `testCreateAbsoluteUrlWithSuffix()` covered in UrlManagerCreateUrlTest
  by `testAbsolutePatterns`.

- `testParseRequest()` covered by UrlManagerParseUrlTest, UrlNormalizer
  related parts moved to UrlNormalizerTest.
- `testParseRESTRequest()` moved to UrlManagerParseUrlTest
- `testHash()` covered in different tests in UrlManagerCreateUrlTest.
- `testMultipleHostsRules($host)` kept as is.

Before:

    $ vendor/bin/phpunit tests/framework/web/UrlManagerTest.php
    ...
    OK (12 tests, 89 assertions)

After:

    $ vendor/bin/phpunit tests/framework/web/UrlManager*.php
    ...
    OK (72 tests, 648 assertions)
2017-01-31 02:38:35 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
Nobuo Kihara
a3a868e427 docs/guide fix [ci skip] (#13470)
* docs/guide/runtime-sessions-cookies.md typo fix [ci skip]

* docs/guide/tutorial-core-validators.md typo fixed [ci skip]
2017-01-30 11:39:14 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Nobuo Kihara
8803496cf5 docs/guide/output-data-widgets.md typo fix [ci skip] (#13459) 2017-01-28 11:45:51 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Nobuo Kihara
9deb24e262 docs/guide/output-client-scripts.md typo fix [ci skip] (#13455) 2017-01-27 17:00:17 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Makarov
3f66fb6cdf Suggest latest PHP 7 usage in the guide [skip ci] 2017-01-18 19:00:50 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
alchimik
96069b341a fixed some links in doc (#13390) 2017-01-14 21:37:31 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Makarov
4c2e5119b6 Fixes #13387: Extracted "Custom validator for multiple attributes" into community cookbook 2017-01-14 13:09:49 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Klimov Paul
25a7ed60e7 Docs about namespaced migrations fixed 2017-01-10 14:22:50 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Bizley
b113ad460a Docs about cache key limitation (#13341) [skip ci] 2017-01-07 17:48:00 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Nobuo Kihara
11f8078ec4 docs/guide/db-migrations.md readability improved [skip ci] 2017-01-07 10:43:27 +09:00 octicon-file-diff(16/) octicon-file-code(16/)
Nobuo Kihara
8e12383048 docs/guide/db-active-record.md typo fix (#13335) [skip ci] 2017-01-06 16:27:36 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
4f59ec2f5b Update concept-di-container.md 2017-01-06 13:57:49 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
Nobuo Kihara
b37598d0ee docs/guide/concept-di-container.md typo fix (#13331) [skip ci] 2017-01-06 08:14:20 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Nobuo Kihara
1bcdcdefc8 fixes typos in docs/guide/concept-di-container.md [ci skip] (#13330) 2017-01-05 18:41:18 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexey Rogachev
a232c74e3b Added small specification to result of conversion object to array (#13329) [skip ci] 2017-01-05 14:31:54 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
1e513a91d1 edited guide runtime-routing 2017-01-03 14:24:34 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
bonzzy
4cc2a620ba tutorial-console fix param input (#13315) 2017-01-02 14:30:25 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
SilverFire - Dmitry Naumenko
178d319556 Added Cache::getOrSet() 2016-12-30 23:49:18 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Evgeniy Tkachenko
b62edcb78d Update input-forms.md (#13292) [skip ci] 2016-12-30 00:26:35 +07:00 octicon-file-diff(16/) octicon-file-code(16/)
SilverFire - Dmitry Naumenko
9d67f9b31d Updated guide 2016-12-29 11:26:28 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Evgeniy Tkachenko
e27a13bb19 Improved HATEOAS example (#13250) [skip ci] 2016-12-26 18:15:02 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
e13a18ba8b added missing version information
fixes #13259
2016-12-20 22:40:44 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
Evgeniy Tkachenko
c3c6035117 updated images gii (#13244) [skip ci] 2016-12-19 16:10:05 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Dmitry Naumenko
3624eae23f Merge pull request #13217 from yiisoft/throwable
Catch `\Throwable` in critical places
2016-12-18 19:53:27 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Dmitry Naumenko
405c8b7e43 Merge pull request #13188 from yiisoft/guide-client-scripts
Edited and extended Guide section about client scripts
2016-12-18 19:21:43 +02:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
cb52c42cf5 more details about PHP 5 and 7 compatibility regarding Throwable 2016-12-17 00:43:48 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
a3b6dfbb7b Catch \Throwable in critical places
Added catch `\Throwable` to be compatible with PHP7.
Added it in cases where object state needs to be kept consistent.

Mainly on transactions but also some other places where some values are
reset before exiting.

Most of them could probably be refactored by using `finally` in 2.1, as
that requires PHP 5.5.

fixes #12619
2016-12-16 02:20:02 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Makarov
837b33767c Fixes #11697: Added filterHaving(), andFilterHaving() and orFilterHaving() to yii\db\Query
Signed-off-by: Alexander Makarov <sam@rmcreative.ru>
2016-12-14 23:58:04 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexey Rogachev
7be8ccbb41 All words in h3 in docs must start with capital letter (#13207) 2016-12-14 12:44:15 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexey Rogachev
a1581329cf Fixes #13183: Docs for working with separated migrations (#13201) 2016-12-14 13:19:43 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Makarov
b13940c31d Minor syntax and style fixes 2016-12-13 02:39:05 +03:00 octicon-file-diff(16/) octicon-file-code(16/)
Carsten Brandt
b6e250857c Edited and extended Guide section about client scripts
This section had the "under development note" for a long time and was
lacking a lot of information.
It should also contain info about `yii.js` but that is to be added in
another PR.
2016-12-13 00:07:45 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexey Rogachev
bd85b7ced2 Closes #6242: Access to validator in inline validation (#13027)
* Closes #6242: Access to validator in inline validation

* Updated PHPDoc according to PR review [skip ci]

* Imrpoved PHPDoc, updated guide info [skip ci]

* Fixes related with PR review

* Corrected CHANGELOG [skip ci]

* Update input-validation.md

added version info
2016-12-08 23:29:53 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
Nikola Kovacs
f5beaf3edf Make validator getClientOptions public
This allows implementing custom client-side validation
without extending every validator.

Fixes #11163
close #13145
2016-12-08 01:30:36 +01:00 octicon-file-diff(16/) octicon-file-code(16/)
Alexander Makarov
0e5efb91eb Replaced links to non-existing widget demos with links to API docs and guide [skip ci] 2016-12-07 18:59:48 +03:00 octicon-file-diff(16/) octicon-file-code(16/)