Commit graph

46 commits

Author SHA1 Message Date
euromark
b811afbc44 double spaces to single ones 2012-12-22 23:48:15 +01:00
Ceeram
6672eafe53 fix whitespace errors 2012-12-21 16:05:32 +01:00
Vinícius Krolow
c724f0739a Clean up code.
* It is not need to check the same thing twice
* One if condition instead of two ifs
* Ternary codition instead of checking if variable is null
* Returning early to avoid unnecessary conditional levels
* It is not needed to put an else as the if before already has returned
* Changing ternary conditional to PHP 5.2
* Removing some not needed conditions in the if, also changed to return false (instead of NULL) to follow the code block docs
* Changing to check before if the class_exists so we make sure that class was autoloaded before the condition

Squash of commits in https://github.com/cakephp/cakephp/pull/1034
2012-12-20 20:31:04 -05:00
Jose Lorenzo Rodriguez
8538c0e8ea Avoiding problems with relative paths in shell dispatcher 2012-10-28 12:57:44 +01:00
mark_story
e58c93c39d Fix trailing whitespace. 2012-10-01 21:21:53 -04:00
James Michael DuPont
2d46fc60be Fixing undefined variable usage
Squash of pull request #872
2012-09-28 20:46:25 -04:00
Renan Gonçalves
fe5b49e6eb Fixing variable name used to set error handlers. 2012-09-24 13:41:56 +02:00
AD7six
6b6fdd2b84 don't dump fatal errors as html on the cli 2012-04-29 16:25:07 +02:00
mark_story
a24aca6ffc Fix a few code standards errors. 2012-04-06 22:56:01 -04:00
mark_story
34e1afd8ef Add support for custom console error handling
Both errors and exceptions can be configured for the console
at the application layer now.

Fixes #2696
2012-03-22 20:52:49 -04:00
Juan Basso
c754fb2dcb Updated copyright to 2012. 2012-03-12 22:46:46 -04:00
mark_story
db8c6b5c78 Fix most of the coding standards issues in Console/ 2012-03-03 18:55:29 -05:00
mark_story
205bfb506f Add Shell::$plugin and update getOptionParser()
Adding a plugin property allows the correct
usage/help information to be generated.

Fixes #2359
2011-12-10 21:31:21 -05:00
ADmad
73674c648c Moving AppShell inside Console/Command for consistency with file location of other App classes. Also making all core shells and tasks extends AppShell instead of Shell. Closes #2278 2011-11-26 02:48:49 +05:30
Renan Gonçalves
d9e8b3b6a2 Parsing every parameter until there is no more. Good to have alias but with the ability to override the arguments. 2011-10-21 12:20:43 +02:00
mark_story
7a4aa401d1 Adding backwards compatible plugin syntax.
Thie got lost during 2.0, and it inflecting only the shell name
is kind of bad.
2011-10-19 21:33:03 -04:00
Renan Gonçalves
1cf67b1e55 Little cleanup in exceptions.
- Removed duplicated or non-used exceptions.
- Making the error messages more descriptive and stardard.
2011-10-15 20:08:02 +02:00
mark_story
aa7448e3ed Fixing incorrect exit codes on console exceptions.
Uncaught exceptions on the console would result in exit code 0.
This is not helpful in *nix scripting.

- Update the ConsoleErrorHandler to not inherit from the web error handler.
- Make ErrorHandler::_mapErrorCode() public as it isn't overly private.
- Make ConsoleErrorHandler methods instance methods so mocking can be done.
- Add a _stop method to correctly exit.
- Update tests.
2011-10-03 22:48:50 -04:00
Juan Basso
f5a54d00dd Changed methods and attributes from private to protected. 2011-08-20 00:43:34 -04:00
Juan Basso
620a65b2fc Merge branch '2.0' into 2.0-api-doc
Conflicts:
	lib/Cake/Test/Case/View/Helper/CacheHelperTest.php
	lib/Cake/Utility/Debugger.php
2011-08-14 21:12:05 -04:00
Mark Story
6e2870c706 Removing APP_PATH it is always the same as APP.
Fixing a typo in index.php.
2011-08-03 20:06:47 -04:00
Juan Basso
895c10af7b Adjusted some types in @param, @return and @var. 2011-07-31 22:57:17 -04:00
Juan Basso
fedadc091c Included @throws in API that was missing. 2011-07-31 16:55:52 -04:00
Juan Basso
a0ee8b49fe Fixed some API doc in console. 2011-07-28 22:05:29 -04:00
Jose Lorenzo Rodriguez
cfd2d9e00b Updating all @package annotations in doc blocks 2011-07-26 01:46:14 -04:30
Mark Story
74e2cb1507 Updating doc blocks and @package strings for Console
classes.
2011-07-25 21:46:52 -04:00
Juan Basso
21348169fa Camelized templates folder. 2011-05-30 23:02:39 -04:00
Juan Basso
192812ee7f Updating the copyright to 2011. 2011-05-30 22:32:43 -04:00
Heath Nail
eecd91e99f Load AppShell class. 2011-05-18 21:05:21 -04:00
AD7six
998cba0759 remove CONSOLE_LIBS constnat 2011-05-15 17:36:39 +02:00
Jose Lorenzo Rodriguez
91bce16e9d Merge remote-tracking branch 'origin/2.0' into 2.0-merge
Conflicts:
	lib/Cake/Test/Case/Console/Command/Task/TemplateTaskTest.php
	lib/Cake/Test/Case/Controller/Component/Auth/FormAuthenticate.php
	lib/Cake/Test/Case/Log/Engine/FileLog.php
	lib/Cake/Test/test_app/Plugin/TestPlugin/View/Helper/plugged_helper.php
	lib/Cake/Test/test_app/Plugin/TestPlugin/View/Helper/test_plugin_app.php
	lib/Cake/tests/Case/Controller/Component/Auth/FormAuthenticate.php
	lib/Cake/tests/Case/Controller/Component/Auth/FormAuthenticateTest.php
	lib/Cake/tests/Case/Log/Engine/FileLog.php
	lib/Cake/tests/Case/Log/Engine/FileLogTest.php
	lib/Cake/tests/test_app/plugins/test_plugin/View/Helper/PluggedHelper.php
	lib/Cake/tests/test_app/plugins/test_plugin/View/Helper/TestPluginAppHelper.php
	lib/Cake/tests/test_app/plugins/test_plugin/View/Helper/plugged_helper.php
	lib/Cake/tests/test_app/plugins/test_plugin/View/Helper/test_plugin_app.php
2011-05-15 00:40:54 -04:30
Jose Lorenzo Rodriguez
eea981940e Replacing config string in favor of Config 2011-05-13 03:36:45 -04:30
mark_story
011aeae951 Giving a useful value to FULL_BASE_URL in CLI if it doesn't get defined by the developer. 2011-05-10 21:05:14 -04:00
Renan Gonçalves
abbe5aaea2 Updating console to use i18n'ed strings. 2011-04-25 21:24:16 +02:00
Jose Lorenzo Rodriguez
1d384ec68f Reverting change for console help, and improving it so it returns help for the command intended to be run 2011-04-22 16:46:32 -04:30
Jose Lorenzo Rodriguez
fa1d7da56e Making shells return help if a ConsoleException is catched, like when passing bad parameters 2011-04-22 16:08:26 -04:30
mark_story
a0660ffd9d Fixing constants being incorrect when calling cake console from the root of the source tree checkout. 2011-04-16 09:32:54 -04:00
AD7six
4f29f58a5e correct path to tmp and core.php file when running outside your app dir.
also wrapped HttpException class declaraion in an if !class_exists test
- the class exists in the pecl http extension.
2011-03-16 12:13:47 +01:00
Jose Lorenzo Rodriguez
a1fe95e072 REverting some changes made to constants 2011-03-08 17:32:22 -04:30
Jose Lorenzo Rodriguez
65136e8cb1 Re-adding the support for the topmost plugins folder and homogenizing some constants in shell dispatcher 2011-03-08 15:08:28 -04:30
José Lorenzo Rodríguez
4cebe55a9b Merge remote-tracking branch 'origin/2.0' into 2.0-class-loading
Conflicts:
	app/webroot/index.php
	lib/Cake/Controller/Component/AuthComponent.php
	lib/Cake/Network/CakeRequest.php
	lib/Cake/tests/cases/libs/controller/components/auth.test.php
2011-02-21 22:28:30 -04:30
José Lorenzo Rodríguez
4c0e06c451 Merge remote branch 'origin/2.0' into 2.0-class-loading
Conflicts:
	cake/bootstrap.php
	cake/libs/view/helpers/js.php
	lib/Cake/Model/AclNode.php
	lib/Cake/Model/ConnectionManager.php
	lib/Cake/bootstrap.php
	lib/Cake/tests/cases/libs/controller/controller.test.php
2011-01-02 02:00:03 -04:30
José Lorenzo Rodríguez
07e43bb0f8 Merge remote branch 'origin/2.0' into 2.0-class-loading
Conflicts:
	cake/libs/view/scaffolds/edit.ctp
	cake/libs/view/scaffolds/form.ctp
	cake/tests/test_app/plugins/test_plugin/views/tests/scaffold.edit.ctp
	cake/tests/test_app/plugins/test_plugin/views/tests/scaffold.form.ctp
	cake/tests/test_app/views/posts/scaffold.edit.ctp
	cake/tests/test_app/views/posts/scaffold.form.ctp
	lib/Cake/Error/ErrorHandler.php
	lib/Cake/Model/Behavior/TranslateBehavior.php
	lib/Cake/Model/Datasource/CakeSession.php
	lib/Cake/Routing/Router.php
	lib/Cake/TestSuite/TestManager.php
	lib/Cake/View/scaffolds/edit.ctp
	lib/Cake/tests/cases/console/shells/bake.test.php
	lib/Cake/tests/cases/libs/cake_log.test.php
	lib/Cake/tests/cases/libs/cake_request.test.php
	lib/Cake/tests/cases/libs/view/helpers/number.test.php
	lib/Cake/tests/test_app/plugins/test_plugin/views/tests/scaffold.edit.ctp
	lib/Cake/tests/test_app/views/posts/scaffold.edit.ctp
2010-12-15 01:13:05 -04:30
José Lorenzo Rodríguez
b5122e6e81 Fixing more console classes 2010-12-07 01:44:47 -04:30
José Lorenzo Rodríguez
e3690ebccb Making shells run again 2010-12-07 01:26:10 -04:30
José Lorenzo Rodríguez
1c0a4c9e0a Starting to move console classes 2010-12-07 00:47:53 -04:30
Renamed from cake/console/shell_dispatcher.php (Browse further)