Commit graph

1138 commits

Author SHA1 Message Date
mark_story
63769ae4a6 Merge branch 'master' into 2.7
Conflicts:
	lib/Cake/VERSION.txt
2015-02-26 12:50:35 -05:00
AD7six
5066bc33b4 Fix whitespace for paginator counter call 2015-02-23 16:46:43 +00:00
AD7six
5342605d92 The parentheses were unbalanced 2015-02-23 15:21:39 +00:00
mark_story
831fe53f79 Ignore LC_TIME category when extracting messages.
Given that we use the specific LC_TIME file format, it doesn't make much
sense to extract translated strings into a PO file that cannot be used
later on.

Refs #5933
2015-02-22 22:39:38 -05:00
Michael Houghton
4f2ed15612 fix for confirm message on the bake templates 2015-02-21 10:21:37 +00:00
ADmad
18246daf17 Merge branch 'master' into 2.7 2015-02-15 21:15:02 +05:30
Markus Fischer
546941a79b i18n: Remove POT-Creation-Date
Prevent app locale files getting marked as modified in VCS even if the actual
content didn't change.

Fixes #5887
2015-02-15 12:38:48 +01:00
mark_story
eb85a875c0 Merge branch 'master' into 2.7 2015-02-10 23:00:43 -05:00
Emil Møller
3f715c4262 Load ClassRegistry Once 2015-02-04 21:29:16 +01:00
Rachman Chavik
acd32b71fe Fix: "bake plugin" generates incorrect directory for View/Layouts 2015-02-04 15:47:01 +07:00
Mark Story
35e0dc2bbd Merge pull request #5760 from cakephp/master
Merge master into 2.7
2015-01-27 20:48:15 -05:00
mark_story
a8ae12a700 Fix warnings when php://output is used with ConsoleOutput.
The php://output stream is not compatible with posix functions.

Refs #4901
2015-01-25 22:24:24 -05:00
Robert
f4933b29a8 CS fix 2015-01-19 08:51:57 +01:00
Robert
dedb2e4191 Added short plugin alias in shells 2015-01-19 08:51:57 +01:00
mark_story
ac9a212d44 Merge branch 'master' into 2.7
Conflicts:
	lib/Cake/Utility/String.php
2015-01-11 15:25:18 -05:00
antograssiot
c2f298a8b7 Replace our custom code fence with markdown standard fence 2015-01-09 13:47:25 +01:00
euromark
52ecccb1a2 App::uses and usage replacements for String => CakeText. 2015-01-05 01:00:57 +01:00
Edgaras Janušauskas
3ae61e9e16 Fix Extract task to correctly extract messages with context 2014-12-25 14:28:44 +02:00
mark_story
10717d9248 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/VERSION.txt
2014-12-23 11:22:00 -05:00
mark_story
5cf5fe53ee Clarify question.
Fixes #1870
2014-12-23 11:18:32 -05:00
mark_story
4d6611b328 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/VERSION.txt
2014-12-17 21:38:32 -05:00
mark_story
2637d35543 Don't quit bake when a table is missing.
When a table is missing print a warning to stderr but don't exit. This
allows people to use `bake fixture all` with non-conventional tables.

Refs #5377
2014-12-15 21:28:55 -05:00
euromark
e1c128bb99 Consolidate with conditions sniff. 2014-12-09 03:17:35 +01:00
euromark
2937ea9ba5 Make comparison stricter. 2014-12-08 11:39:15 +01:00
euromark
f302d8c4d3 Extract being less verbose until explicitly asked for. 2014-12-08 11:36:24 +01:00
mark_story
3095187952 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/VERSION.txt
2014-11-10 19:38:31 -05:00
mark_story
7718d473c4 Remove singularization on schema class names.
Using camelize() does the transformation we want without also
singularizing the name. This makes user input more transparent and fixes
issues around plugin schemas with plural names.

Refs #4993
2014-11-09 21:52:10 -05:00
mark_story
9ce3d89c81 Clean up formatting and make a failure exit non-zero.
Console tools should exit non-zero when a comman fails.

Refs #4993
2014-11-09 21:21:42 -05:00
mark_story
b98d2a3365 Merge branch 'master' into 2.6 2014-10-24 22:05:46 -04:00
Bryan Crowe
6f4c3b2765 Fix views overwrite warning text 2014-10-21 14:39:09 -04:00
mark_story
cf45d3fab8 Merge branch 'master' into 2.6 2014-09-22 20:46:28 -04:00
Mischa ter Smitten
a69e9bc63b Cs fixes 2014-09-18 10:50:35 +02:00
ADmad
3fb252ad2f Merge branch 'master' into 2.6 2014-09-13 00:37:16 +05:30
euromark
04ef39217f Take care of more int casts. 2014-09-10 16:29:23 +02:00
euromark
e77f96d8b7 Use (int) cast instead of intval() function for performance reasons and to unify it. 2014-09-10 15:52:57 +02:00
ptica
1959b97ba3 hardcode a relative path to core installed via composer
as book suggests
2014-09-08 11:57:01 +02:00
mark_story
734bb9223b Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/Core/App.php
	lib/Cake/VERSION.txt
2014-09-06 23:04:20 -04:00
Mark Story
f82fd2d982 Merge pull request #4463 from ravage84/deprecated-annotaions
Update all @deprecated annotations
2014-09-04 08:48:45 -04:00
Markus Fischer
0c55adebe0 console: don't use colored output if there's no TTY
This prevents ANSI escape codes and style tags showing up in
cron-jobs, pipes or redirects.
2014-09-03 10:47:05 +02:00
Marc Würth
67ba9cb406 Update all @deprecated annotations
to adhere to the @deprecated <version> <description> format, where version and description are mandatory.
2014-09-02 17:03:22 +02:00
Marc Würth
edc6490f11 Removed Vendor folder from plugin baking task, updated test 2014-08-18 18:55:17 +02:00
Marc Würth
6e1b8f3ce8 Added missing folders to plugin baking task, updated test 2014-08-18 18:54:48 +02:00
ADmad
9d53a1e9ce Merge branch 'master' into 2.6 2014-08-15 12:37:13 +05:30
Brian Porter
7d8d2f2f18 Code sniff fix. 2014-08-11 11:51:09 -05:00
Brian Porter
543e520ccb Corrects logic to only apply default filename in **all** cases where none provided. 2014-08-11 10:34:30 -05:00
Brian Porter
6358208e32 Figures it'd be a missing paren. 2014-08-11 09:23:56 -05:00
Brian Porter
f93029b29f SchemaShell always uses --file param when present.
Addresses **part** of the problem described in #4174.

Corrects SchemaShell's startup logic so that when a `--file` param is provided by the user, it is always used even in the case that it matches the default file name (schema.php). This solves a problem when a user wishes to provide a classname using `--name`, but still wants to use the default filename.
2014-08-11 09:08:59 -05:00
Marc Würth
120bd37ffa Be forward compatible to PHP 7's "Uniform Variable Syntax"
https://wiki.php.net/rfc/uniform_variable_syntax
2014-08-11 01:33:25 +02:00
mark_story
9c3089796f Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/Model/Model.php
2014-08-08 23:28:06 -04:00
José Lorenzo Rodríguez
92957913d9 Merge pull request #4023 from cvo-technologies/2.6-basics-context
Add the other translation shortcuts for context support
2014-08-07 08:54:11 +02:00
euromark
e714341ce3 Auto-detect composer installed CakePHP folder. 2014-08-05 03:53:40 +02:00
euromark
9ef7b5713a CS fixes. 2014-08-04 13:53:52 +02:00
ADmad
713f430fc4 Merge branch 'master' into 2.6 2014-08-03 01:05:36 +05:30
Anthony GRASSIOT
aa42b80a4d a / an typo fixes fot API 2014-07-30 22:11:03 +02:00
ADmad
4e52941f59 Fix CS errors. 2014-07-27 12:54:15 +05:30
ADmad
9e21d048ce Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/VERSION.txt
2014-07-27 12:29:39 +05:30
euromark
99d6932ecc Fix project baking 2014-07-24 18:43:48 +02:00
mark_story
08de917b3c Fix accidental typo in SQL file.
Fixes #4061
2014-07-22 09:38:46 -04:00
Denys Kyselov
1434e79330 Typo fix 2014-07-21 23:55:49 -04:00
Denys Kyselov
79dc624062 Add removeSubcommand in ConsoleOptionParser 2014-07-21 23:55:42 -04:00
mark_story
9b8e6403fd Add indexes to db_acl.sql in skel directory.
Copy changes in app/Config/Schema into the skel directory.

Refs #4052
2014-07-21 21:31:05 -04:00
Marlin Cremers
fbeb8fe26b Add the other translation shortcuts for context support 2014-07-21 15:47:04 +02:00
mark_story
0aabc5d910 Merge branch 'master' into 2.6 2014-07-18 21:50:05 -04:00
Mark Story
dbe7329e54 Merge pull request #3703 from MMS-Projects/i18n-context-2.6
Basic support for I18n contexts as requested by #2063
2014-07-18 21:48:19 -04:00
David Yell
28ec1c40a5 When specifying Session as a component and using Session flash messages, you end up with 'Paginator, Session, Session' which doesn't make sense. Added an array_unique to remove any duplicated components. 2014-07-18 15:37:22 +01:00
Marlin Cremers
b47f91c47c Add context support to the I18n class which resolves cakephp/cakephp#2063
This change adds Gettext context support to the I18n class. This
allows custom translations for verbs and nouns and more.
2014-07-17 11:01:11 +02:00
mark_story
2bcd817367 Merge branch 'master' into 2.6 2014-07-03 11:13:06 -04:00
euromark
974ca851c2 Correct doc blocks according to cs guidelines.
Remove superfluous empty lines.
2014-07-03 15:36:42 +02:00
mark_story
b1610c145e Merge branch 'master' into 2.6 2014-07-02 23:39:16 -04:00
euromark
73dcb2cb91 cs correction 2014-06-26 14:22:34 +02:00
Renan Gonçalves
1a89a3cb9d Exiting with 1 when Exception::getCode() returns non-integer values.
From php.net/exception.getcode
> Returns the exception code as integer in Exception but possibly as other type in Exception descendants (for example as string in PDOException).
2014-06-26 13:26:20 +02:00
mark_story
a2673d8bf0 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/Core/App.php
2014-06-25 09:22:10 -04:00
euromark
b3507b199a Update doc blocks regarding return $this 2014-06-25 00:06:51 +02:00
euromark
05709908a7 Fix composer app issues with cake.php 2014-06-24 17:49:18 +02:00
euromark
26fe1265ab Mark App::pluginPath as deprecated and don't use it anymore. 2014-06-24 11:52:29 +02:00
mark_story
6bacc5bb46 Merge branch 'master' into 2.6 2014-06-22 21:25:06 -04:00
euromark
d81d568cc0 make coredispatcher fully BC again 2014-06-20 14:05:18 +02:00
mark_story
497ecd3f80 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/VERSION.txt
2014-06-19 21:41:02 -04:00
euromark
6161aae54e also bring template one in sync. 2014-06-17 13:08:13 +02:00
euromark
a9de83daeb console cake cleanup and unification
remove duplicate define
2014-06-17 02:28:52 +02:00
mark_story
92eeef8ae0 Merge branch 'master' into 2.6 2014-06-02 22:57:25 -04:00
MaziyarMK
596c1c27cb added HTML for styling tables
added <thead> and <tbody> to table for easier styling of generated templates.
2014-05-31 20:50:29 +00:00
mark_story
7e8d378502 Merge branch 'master' into 2.6 2014-05-29 21:46:16 -04:00
mark_story
f6c868d706 Fix remaining doc block errors in Console/ 2014-05-27 23:34:53 -04:00
mark_story
8f5acb0932 Fix CS errors in skel/ 2014-05-27 23:21:32 -04:00
mark_story
bb58bbe642 Fix API doc errors in Console/ 2014-05-27 23:16:05 -04:00
mark_story
0c8406c034 Merge branch 'master' into 2.6 2014-05-27 20:55:06 -04:00
mark_story
edcbf4e92f Manually port f287bc76c0 to 2.6
Git won't let me merge the changes as I have 'unstaged changes'.
2014-05-27 20:54:36 -04:00
Mark Story
f287bc76c0 Force .bat files to have CRLF endings.
Newer versions of git convert line endings on checkout. This also causes
these files to show up as always modified when the repo is cloned
because the index and working copy have different line endings.

Hopefully this fixes the issue.

Fixes #3585
2014-05-27 19:06:08 -04:00
Mischa ter Smitten
329fd3fe4c Consistent use of Shell::err for errors 2014-05-27 12:29:09 +02:00
mark_story
587f2da09e Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/VERSION.txt
2014-05-22 14:29:43 -04:00
Brian Porter
9452d5e1b6 Harden the bin/cake script to avoid breakage when local shell environment has a CDPATH set. 2014-05-19 11:05:28 -05:00
mark_story
2e4d6eb009 Merge branch 'master' into 2.6
Conflicts:
	lib/Cake/VERSION.txt
2014-05-16 21:26:30 -04:00
mark_story
153141a6c7 Make help clearer around how to use UpgradeShell.
Closes #3504
2014-05-15 11:32:32 -04:00
euromark
aefc459907 Fixes baked postLink()s 2014-05-13 17:14:11 +02:00
ADmad
aa7f18840c Merge branch '2.5' into 2.6 2014-05-04 14:40:39 +05:30
ADmad
d466e00644 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/Model/Datasource/DboSource.php
	lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
	lib/Cake/Utility/Folder.php
	lib/Cake/VERSION.txt
2014-05-04 14:35:36 +05:30
euromark
7a287a6942 More coding standard corrections. 2014-04-29 14:19:33 +02:00
euromark
5e5a776de8 Backporting overwrite() from 3.0 to 2.6. 2014-04-29 02:18:27 +02:00
mark_story
de0062de77 Merge branch 'master' into 2.5 2014-04-25 22:10:02 -04:00
Harold Putman
d62e5e1b00 Prevent infinite loop caused when argv not set.
If shell is invoked with the wrong PHP executable (not CLI) and argv is not an array,  array_search on null causes infinite number of error messages.
2014-04-24 11:48:19 -04:00
mark_story
d54fbe6f60 Merge branch 'master' into 2.5 2014-04-18 22:13:56 -04:00
Carl Sutton
5ac60288fd Fix closing non resource
I get a load of these errors when running tests in the shell, this check stops the errors from happening

Warning: 2 :: fclose() expects parameter 1 to be resource, integer given on line 298 of CORE\Cake\Console\ConsoleOutput.php
Trace:
fclose - [internal], line ??
ConsoleOutput::__destruct() - CORE\Cake\Console\ConsoleOutput.php, line 298
ToolbarComponent::_saveState() - APP\Plugin\DebugKit\Controller\Component\ToolbarComponent.php, line 307
ToolbarComponent::beforeRedirect() - APP\Plugin\DebugKit\Controller\Component\ToolbarComponent.php, line 307
ObjectCollection::trigger() - CORE\Cake\Utility\ObjectCollection.php, line 132
call_user_func - [internal], line ??
CakeEventManager::dispatch() - CORE\Cake\Event\CakeEventManager.php, line 247
Controller::redirect() - CORE\Cake\Controller\Controller.php, line 765
AuthComponent::_unauthenticated() - CORE\Cake\Controller\Component\AuthComponent.php, line 364
AuthComponent::startup() - CORE\Cake\Controller\Component\AuthComponent.php, line 304
ObjectCollection::trigger() - CORE\Cake\Utility\ObjectCollection.php, line 132
call_user_func - [internal], line ??
CakeEventManager::dispatch() - CORE\Cake\Event\CakeEventManager.php, line 247
Controller::startupProcess() - CORE\Cake\Controller\Controller.php, line 675
Dispatcher::_invoke() - CORE\Cake\Routing\Dispatcher.php, line 182
Dispatcher::dispatch() - CORE\Cake\Routing\Dispatcher.php, line 160
2014-04-14 14:15:46 +01:00
Bryan Crowe
1a73906a50 Fix failing NoActions comparison test 2014-04-13 23:28:13 -04:00
Bryan Crowe
f7cc0c1802 Add newline after actions in controller template 2014-04-13 21:56:27 -04:00
euromark
a7744e6ff4 a few more corrections 2014-04-08 01:49:33 +02:00
euromark
0ece694a75 microptimize options and default merge and other string key array merges 2014-04-08 01:25:14 +02:00
Jose Lorenzo Rodriguez
343d3279b9 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/Test/Case/Utility/FileTest.php
	lib/Cake/VERSION.txt
2014-04-06 21:50:41 +02:00
mark_story
b8e21c99ee Only count _id if it is the last 3 characters in the field name.
This prevents issues when baking models for tables containing `_id`.

Fixes #3230
2014-04-04 21:26:31 -04:00
Brian Porter
e5dd8acb60 Adds phpunit required version to TestShell "not found" error message. 2014-04-01 11:08:46 -05:00
mark_story
f9b45f1b60 Merge branch 'master' into 2.5 2014-03-30 21:24:55 -04:00
sam-at-github
dbbf6c6ad9 No array short syntax in 2.4\! 2014-03-29 22:40:58 +11:00
sam-at-github
863a8555d9 Fixed CS issues. Fixed bug - added missing condition to find. 2014-03-29 22:36:06 +11:00
sam-at-github
a3fe7cd245 on cake acl delete <> delete all matching records. Makes more sense than deleting one of possibly many. 2014-03-29 13:37:08 +11:00
mark_story
2c5d96e916 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/Model/Datasource/DboSource.php
2014-02-16 14:24:19 -05:00
mark_story
a5d50da040 Remove dead and unused code. 2014-02-11 16:38:24 -05:00
ADmad
9de3418079 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/Model/Permission.php
2014-02-11 18:17:59 +05:30
ADmad
d838e7b56f Updated upgrade shell to change CakeRequest::onlyAllow() usages. 2014-02-10 18:18:09 +05:30
ADmad
1da79080ac Updated bake templates to use CakeRequest::allowMethod() 2014-02-10 17:56:57 +05:30
Mark Story
7a72431442 Merge pull request #2770 from ukk1337/master
Added missing 'Session'-Component in bake
2014-02-09 16:04:25 -05:00
Eric Martins
2793dca671 Fix ApiGen errors 2014-02-07 18:29:54 -02:00
mark_story
be8ebfc005 Merge branch 'master' into 2.5 2014-02-05 09:22:46 -05:00
mark_story
919cb7d90e Fix bake templates to generate functioning code.
Closes #2776
2014-02-05 09:21:49 -05:00
ukk1337
3cd6bb39bd fixed coding standard errors 2014-02-04 15:37:23 +01:00
ukk1337
60c289fd68 removed indentation 2014-02-04 13:47:50 +01:00
ukk1337
9670a5af88 Added missing 'Session'-Compomnent in bake
If a Controller was baked interactively and one want to use Session flash messages, the required 'Session'-Component wasn't added to the $components-Array
2014-02-04 13:35:48 +01:00
mark_story
4d57d3ce5b Fix plugin path filtering when directories do not exist.
When paths do not exist we should correctly remove them from the output
paths.

Fixes #2748
2014-01-30 21:40:08 -05:00
mark_story
c1ab6fa9d1 Merge branch 'master' into 2.5 2014-01-30 10:13:37 -05:00
joostdekeijzer
42daa25340 Fix Console "extract i18n from sources" to handle quotes in Model::validate parameters correctly 2014-01-29 14:53:52 +01:00
ADmad
c093804b35 Merge branch 'master' into 2.5 2014-01-26 17:39:50 +05:30
mark_story
46eda802e5 Fix mising connection parameter to schema objects.
When calling create/update the created schema object should be passed
the current connection.

Fixes #2668
2014-01-16 17:19:22 -05:00
mark_story
75dd2ff1fb Merge branch 'master' into 2.5 2014-01-16 15:20:40 -05:00
Matthew Ouyang
7b27b0d1ab add whitespace to end-of-file 2014-01-15 09:53:21 -05:00
Matthew Ouyang
0661d7832b add AllTestsTest for skeleton app 2014-01-14 17:51:50 -05:00
euromark
29e15386b2 Follow the deprecation note of 2.1 migration guide and switch to fetch(title)
correct assert order for test
2014-01-09 16:45:49 +01:00
pummra
5605ff48ab Update ControllerTask.php
Removed $admin from message in regards to no controllers being baked in all() function
2014-01-08 12:23:03 +00:00
pummra
a981c7fa8c Removed trailing whitespace. 2014-01-08 10:16:06 +00:00
pummra
0214ac403e Update ControllerTask.php
Updated if statement for clarity and also fixed spelling mistake.
2014-01-08 10:10:40 +00:00
pummra
d41bb0b1b3 Update ControllerTask.php
Added an output message if no controllers are baked using the all() function.
2014-01-08 09:52:05 +00:00
Mark Story
cd9c135c88 Merge pull request #2601 from dereuromark/2.5-upgrade
2.5 upgrade
2014-01-07 06:43:10 -08:00
euromark
483cd13a26 rename method 2014-01-06 20:00:45 +01:00
euromark
3e48d2e082 Add return early statements for redirecting in controllers. 2014-01-04 13:18:14 +01:00
euromark
85337a5d15 correct templates 2014-01-03 13:28:45 +01:00
Mark Story
8e6d26773c Merge pull request #2438 from bar/2.5-console-options-format
Set console options in the same fashion for every shell/task.
2013-12-10 19:53:54 -08:00
Brian Porter
bfdc41e8bb Baked test methods are marked incomplete.
Previously empty (and "passing") test methods now include PHPunit's `markTestIncomplete()` to better reflect the truth of the resulting file: The test methods are stubbed out, but are not yet complete and passing.

It is much easier when _running_ tests to locate incomplete test methods.

Fixes 2437.
2013-12-05 22:54:26 -06:00
Ber Clausen
5c08c77b93 Set console options in the same fashion for every shell/task. 2013-12-05 22:59:01 -03:00
mark_story
430ef88118 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/VERSION.txt
2013-11-25 23:15:15 -05:00
Rob Spencer
cda9320e96 Added support for passing additional flags to mysql connection 2013-11-24 00:47:06 -05:00
mark_story
eac6d7850f Remove pointless array cast. 2013-11-23 12:36:15 -05:00
mark_story
311189a662 Sort tables before returning them.
This fixes unsorted table lists in the various bake related tasks.

Fixes #2386
2013-11-23 12:34:16 -05:00