Commit Graph

602 Commits

Author SHA1 Message Date
Robert Korulczyk
a50d9d8e3e Enable include rule in php-cs-fixer (#14418) 2017-07-10 13:19:57 +03:00
Robert Korulczyk
fe8a0a6a2e Enable no_useless_else rule in php-cs-fixer (#14420) 2017-07-10 11:26:21 +03: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
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
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
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
Arthur Khachaturov
78ec17f13c Fixes #14201: yii\console\controllers\MessageController::extractMessagesFromTokens() is now protected 2017-06-09 17:44:00 +03:00
Nikolay Oleynikov
fdc91f351b Improved base migration controller documentation [skip ci] (#14253) 2017-06-09 11:36:03 +03:00
PowerGamer1
3dc8f426d0 Fix MessageController color output on non-color termnials
fixes #14248
close #14249
2017-06-06 20:45:26 +02:00
Carsten Brandt
844eacba26 Update BaseMigrateController.php
make sure console arguments are recognized as array.
2017-06-05 11:31:38 +02:00
Carsten Brandt
6ec6f8d76c moved include file logic to separate method 2017-06-02 13:35:45 +02:00
Carsten Brandt
5288577221 make migrationPath accept an array 2017-06-02 13:35:45 +02:00
Tobias Munk
deb1def9d3 added alias syntax support
fixes #13356
fixes #13359
2017-06-02 13:34:34 +02:00
Carsten Brandt
cb9462b224 Added support for specifying aliases for migrationNamespaces
This is used to specify pathes to migrations that do not have
namespaces.

While not directly supported by the migration command provideded by the
framework, these migrations exist in a lot of extensions because custom implementations
of migration controllers out of the framework were using this approach
to load multiple migrations from multiple paths.

Even the framework itself currently ships non-namespaced migrations:

- 17a1d91e4a/framework/rbac/migrations/m140506_102106_rbac_init.php
- 17a1d91e4a/framework/caching/migrations/m150909_153426_cache_init.php
- 17a1d91e4a/framework/log/migrations/m141106_185632_log_init.php

This change allows existing applications to adopt the new namespace-based approach
while keeping existing migrations. While it would be possible to add
namespaces to migrations in the application itself, it is not easily possible
to add namespaces to migrations that come from external sources like
extensions.
2017-06-02 13:34:34 +02:00
Carsten Brandt
4b9e48b8dc improved docs: link term "path alias" to the guide 2017-06-02 10:45:20 +02:00
SilverFire - Dmitry Naumenko
f7c9e6b852 Enhanced FixtureController::getFixtureRelativeName()
Updated CHANGELOG
2017-05-30 21:27:50 +03:00
Skiba Max
51dd58cf34 Fixed #13551: loading fixtures in subdirectories 2017-05-30 21:27:43 +03:00
lynicidn
96dae1cebc file will not loaded
https://github.com/yiisoft/yii2/tree/master/framework/test
2017-04-27 20:51:56 +03:00
Alexander Makarov
70cd75c84e Fixes #13226: yii cache command now warns about the fact that it's not able to flush APC cache from console 2017-04-26 03:19:49 +03:00
Vladimir Reznichenko
6da1ec6fb2 Fixes #13845: mt_rand() is not used instead of rand() in yii\captcha\CaptchaAction + minor code improvements 2017-03-24 13:50:13 +03:00
Sam
9459eaa277 Fixes #10372: Fixed console controller including complex typed arguments in help 2017-03-15 15:47:21 +03:00
Daniel Gómez Pan
73ddf2e65e Fixes #13670: Fixed alias option from console when it includes - or _ in option name 2017-02-28 16:39:03 +03:00
SilverFire - Dmitry Naumenko
1dc4618f3d Fixed MessageConstroller::saveMessagesToDb() to work on different DBMS correctly
Closes #13494
2017-02-21 23:37:17 +02:00
SilverFire - Dmitry Naumenko
e9a96ee834 Replced InvalidParamException with \yii\console\Exception in Request::resolve() 2017-02-21 08:24:15 +02:00
SilverFire - Dmitry Naumenko
86b08e29d2 Enhanced yii\console\Request::resolve() to prevent passing parameters, that begin from digits
Closes #8641
2017-02-20 23:17:40 +02:00
Bizley
59801958fe example corrected (#13555) 2017-02-10 23:33:15 +01:00
Bizley
1749c46c5d Fixes #11502: Fixed yii\console\controllers\MessageController to properly populate missing languages in case of extraction with "db" format 2017-02-02 02:50:34 +03:00
Carsten Brandt
c19b2f7dc8 release version 2.0.11 2017-02-01 17:46:29 +01:00
Klimov Paul
862a5dd6b7 Added support for field yii\console\controllers\BaseMigrateController::$migrationNamespaces setup from CLI 2017-01-16 16:48:44 +02:00
Klimov Paul
25a7ed60e7 Docs about namespaced migrations fixed 2017-01-10 14:22:50 +02:00
Carsten Brandt
7c98000391 Update Controller.php 2017-01-07 21:15:30 +01:00
Dmitry Naumenko
2853dcbad7 Update FixtureController.php 2017-01-02 10:13:43 +02:00
Sidney Lins (slinstj)
9173656b53 Improves error message for invalid namespace in FixtureController 2017-01-02 00:07:50 -02:00
Pavel Ivanov
8060300bf4 Small optimization of yii\console\Request::resolve() 2016-12-31 20:57:24 +03:00
Pavel Ivanov
4db3bcd64c Fixes #13277: Invalid parsing of -- in CLI 2016-12-31 16:31:07 +02:00
Klimov Paul
194577c55e Code style fix 2016-12-26 15:39:33 +02:00
Daniel Gómez Pan
b985ea3476 Fix #13108: Negative integer parameter causes "Unknown alias" error w… (#13220)
* Fix #13108: Negative integer parameter causes "Unknown alias" error when you execute command console

* Fix #13108: Fix small issues

* Update Request.php

change order
2016-12-17 21:30:36 +02:00
Carsten Brandt
7fead4f011 Merge pull request #12959 from yiisoft/bash-completion
Added bash completion file for ./yii commands
2016-12-03 01:25:06 +01:00
Carsten Brandt
187c44e43e implement suggestion for unknown command in console application
suggestion is based on two principles:

- first suggest commands the begin with the unknown name, to suggest
  commands after accidentally hitting enter
- second find similar commands by computing the levenshtein distance
  which is a measurement on how many changes need to be made to convert
  one string into another. This is perfect for finding typos.
2016-12-03 01:17:50 +01:00
Carsten Brandt
1d3495d84d Alternative implementation for Unknown command suggestions
alternative implementation for #12661, proof of concept, does not
include filtering by similarity yet.

issue #12659
2016-12-03 01:13:28 +01:00
SilverFire - Dmitry Naumenko
4454d05410 Added ZSH completion, moved scripts to a separate directory 2016-12-03 00:36:40 +01:00
Carsten Brandt
05b17ebb65 Added bash completion file for ./yii commands
This allows to auto-complete commands available by the `./yii`
executable on the bash by expanding the first argument with the TAB key.
E.g. Typing `./yii [TAB]` will list all commands. `./yii mig[TAB]` will
auto-complete to `./yii migrate` and tab after that will list all
migration sub-commands(actions).

fixes #475
2016-12-03 00:36:40 +01:00
SG5
1141fc81a7 Fixes #12735: Fixed yii\console\controllers\MigrateController creating multiple primary keys for field bigPrimaryKey:unsigned 2016-12-02 01:03:24 +03:00
Klimov Paul
18b0dab360 Fixed yii\console\controllers\AssetController::adjustCssUrl() breaks URL reference specification (url(#id)) 2016-11-29 10:24:39 +02:00
Alexey Rogachev
e705519c5a Fixes #13071: Help option for commands was not working in modules 2016-11-27 16:14:08 +03:00
Klimov Paul
1157657cab Fixed incorrect order of migrations history in case yii\console\controllers\MigrateController::$migrationNamespaces is in use 2016-11-14 14:24:53 +02:00
Robert Korulczyk
1a70f60332 Merge master into doc-fixes
Conflicts:
	framework/web/AssetManager.php
2016-11-13 15:35:18 +01:00
Robert Korulczyk
7a3a342127 Fix errors reported by apidoc extension. (#12986) 2016-11-13 14:51:21 +01:00
Robert Korulczyk
450eefaa50 Some phpdoc fixes from scrutinizer. 2016-11-12 22:11:30 +01:00