Commit graph

360 commits

Author SHA1 Message Date
imsamurai
87fef89737 fix phpcs errors 2013-11-14 02:19:31 +02:00
imsamurai
fd64d952b5 change position from afterDefault to beforeDefault during to wrong order, add test 2013-11-14 01:36:27 +02:00
imsamurai
e35823e72a fix tests, add numeric type for unsigned 2013-11-14 01:33:11 +02:00
imsamurai
5a40944a6f fix test name testBuildColumn3 to testBuildColumnUnsigned 2013-11-14 01:20:21 +02:00
imsamurai
2fcb4c3c6c - change check to strict for options of $fieldParameters
- add `types` parameter and strict check if it present in `$fieldParameters` (if it present and not contain column type field parameter will be skipped)
- add `noVal` parameter to `$fieldParameters` if it present and not empty value of this parameter from column will be ignored
- add `unsigned` column type for integer, float and biginteger. If it set to `true` an 'UNSIGNED' will be add in sql column part, if not set or set not to `true` this parameter will be skipped
2013-11-14 01:11:30 +02:00
Marc Würth
7018997979 Fixed some copyright and license statements in the file header DocBlocks 2013-11-14 00:07:03 +01:00
Marc Würth
7cfa0116f4 Removed "PHP 5" from file header DocBlocks
This statement does not serve a purpose anymore.
In a long forgotten world it indicated the main version number of PHP which the code in the file was compatible to.
http://pear.php.net/manual/en/standards.sample.php
But since PHP 5.1 and later this is only marginally true.
Thus I propose to remove it from CakePHP.
2013-11-13 22:58:39 +01:00
Marc Würth
ce47890e98 Replaced all remaining license references to the Open Group Test Suite License with the MIT License 2013-11-13 18:52:06 +01:00
Ber Clausen
b35c9671ad Explicitly build SQL statements, calling buildAssociationQuery(). 2013-11-11 23:27:50 -03:00
Ber Clausen
64f34b75a2 Fix a couple of failing tests. 2013-11-11 23:27:50 -03:00
Ber Clausen
53c6df554c Remove unused $resultSet argument from generateAssociationQuery(). 2013-11-11 23:27:50 -03:00
ADmad
d9ca148499 Merge branch 'master' into 2.5
Conflicts:
	CONTRIBUTING.md
	lib/Cake/Model/Model.php
	lib/Cake/VERSION.txt
2013-10-30 02:34:09 +05:30
Frank de Graaf
ab89f6ec97 Makes DboSource less string dependent. 2013-10-22 16:43:32 +02:00
Mark Story
ce74153389 Merge pull request #1691 from uzyn/2.5-decimal
Add support for decimal type in Schema.

Fixes #3171
2013-10-14 08:36:15 -07:00
Jose Lorenzo Rodriguez
df549898ad Merge remote-tracking branch 'origin/2.5' into k-halaburda-master 2013-10-12 01:05:02 +02:00
Jose Lorenzo Rodriguez
63b65e2f69 Fixing CS 2013-10-12 00:58:14 +02:00
José Lorenzo Rodríguez
8cdbafd312 Merge pull request #1631 from ovidiupruteanu/patch-2
flushMethodCache not working if called before cacheMethod
2013-10-11 15:56:19 -07:00
Bryan Crowe
81c2e9db84 Capitalize UUID acronym 2013-10-08 21:46:30 -04:00
euromark
7b57df5554 Correct method names and missing parent calls. 2013-10-07 20:24:28 +02:00
ovidiupruteanu
dd3b1e41bc Test case for DboSource::flushMethodCache 2013-10-01 21:34:40 +03:00
U-Zyn Chua
e527506c39 MySQL: Numeric data type now supported under decimal column. #3171 2013-09-28 23:05:53 +08:00
U-Zyn Chua
c74c8d49a1 Decimal support for SQLite. #3171 2013-09-28 14:36:55 +08:00
U-Zyn Chua
a1a3e70039 Decimal support for PostgreSQL. #3171 2013-09-28 14:07:00 +08:00
mark_story
5e9b22271a Merge branch 'master' into 2.5 2013-09-27 22:26:33 -04:00
U-Zyn Chua
7fb51ab50f Decimal support for MySQL. #3171 2013-09-28 09:23:46 +08:00
Andy Hobbs
56f1c9b8b5 Ticket 4108
- updated DboSourceTest::testFieldsCacheKeyWithSchemanameChange() to skip for Postgres and Sqlserver
2013-09-27 13:03:32 +01:00
mark_story
cc5795c67d Merge branch 'master' into 2.5 2013-09-26 10:07:10 -04:00
Andy Hobbs
0f7d6a90a1 Ticket 4108
- Added schemaName to DboSource::fields() method cache key to fix bug with changing schema name
2013-09-26 11:56:14 +01:00
mark_story
d2577fac60 Merge branch 'master' into 2.5 2013-09-21 20:01:50 -04:00
euromark
17bd465cae simplify tests 2013-09-19 00:17:21 +02:00
mark_story
a7a6fcae8a Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/VERSION.txt
2013-09-17 10:11:24 -04:00
euromark
382f75dbfc cs corrections, bool to boolean and int to integer. 2013-09-17 14:44:34 +02:00
mark_story
a2bd91638e Merge branch 'master' into 2.5 2013-09-12 19:47:13 -04:00
Ber Clausen
98a32c334a Fix CS. 2013-09-09 21:25:22 -03:00
mark_story
5210f831c8 Add test for insertMulti with id in the last spot.
Both tests work, so there are no changes to the implementation.

Closes #4048
2013-09-09 19:43:15 -04:00
mark_story
2fc3222322 Fix whitespace. 2013-09-09 12:20:54 -04:00
ovidiupruteanu
7019c79b81 Quoting test for null value and string column 2013-09-09 17:14:09 +03:00
ADmad
c27aa99af9 Merge branch 'master' into 2.5 2013-09-08 20:36:40 +05:30
mark_story
6a6371b2d4 Fix CROSS JOINs
While seldomly used, CROSS joins should not generate invalid SQL.

Fixes #4050
2013-09-05 12:45:48 -04:00
mark_story
130ccf4714 Merge branch '2.4' into 2.5 2013-08-28 12:35:17 -04:00
mark_story
f18d354f55 Merge branch 'master' into 2.4 2013-08-28 12:35:07 -04:00
mark_story
c1ae41da51 Correctly generate bigint primary keys in sqlite.
generate bigint primary keys correctly. Autoincrement cannot be set as
it only works with INTEGER columns[1]. I decided to use some string
manipulations as the entire SQL generation bits are a bit janky and I've
already re-written them for 3.0.

[1] https://www.sqlite.org/autoinc.html

Closes #GH-1552
2013-08-27 18:11:04 -04:00
Chen Cohen
a0014e7a30 Ticket 4011 - Adding matchers support for Hash::remove() and Hash::insert() 2013-08-24 02:02:01 +03:00
mark_story
3244b9e3d7 Merge branch 'master' into 2.4 2013-08-16 14:47:01 -04:00
Mischa ter Smitten
0e49a23065 Makes the locale test not always pass, be verbose when it is skipped. 2013-08-14 22:32:04 +02:00
Jose Lorenzo Rodriguez
9d07fc4330 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Console/ShellDispatcher.php
	lib/Cake/Utility/CakeNumber.php
	lib/Cake/View/Elements/sql_dump.ctp
2013-08-11 23:31:10 +02:00
euromark
1339a9dfe1 coding standards according to new sniffer rules 2013-08-08 01:03:21 +02:00
ADmad
38b050a711 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Console/Command/ConsoleShell.php
2013-08-04 19:26:55 +05:30
euromark
6c1e60953b fix cs 2013-08-03 03:02:52 +02:00
Marc Würth
1cac1846a3 Added missing calls to setUp & tearDown in tests 2013-07-29 01:52:39 +02:00
ADmad
4ded269549 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Controller/Component/Auth/BlowfishAuthenticate.php
	lib/Cake/VERSION.txt
2013-07-07 12:22:12 +05:30
euromark
af455b4121 correct return types in doc blocks 2013-07-05 17:19:22 +02:00
euromark
e7f380d2b7 doublespace to single space 2013-07-05 14:36:40 +02:00
mark_story
f09693f6e8 Merge branch 'master' into 2.4 2013-06-29 23:26:26 -04:00
Marc Würth
9591f55394 Annotated testReconnect 2013-06-27 17:15:56 +02:00
Juan Basso
19c94d0211 Fixed default datestyle for postgres tests 2013-06-25 00:15:03 -04:00
Juan Basso
accc98f55d Resetting the datestyle to not affect other tests 2013-06-24 23:36:40 -04:00
mark_story
cd3c54bb9d Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/VERSION.txt
2013-06-10 22:12:10 -04:00
euromark
4518624187 more whitespace coding standard corrections 2013-06-09 17:39:48 +02:00
ADmad
636cc8c103 Merge branch 'master' into 2.4 2013-06-09 18:08:32 +05:30
euromark
394bf1054d remove name attribute where not necessary, clean up doc blocks 2013-06-08 04:29:08 +02:00
Jose Lorenzo Rodriguez
f14c55916f Repeating previous change for SQLite, so it passes on PHP 5.5 2013-06-06 18:12:07 +02:00
Jose Lorenzo Rodriguez
04a6bfbda6 Fixing postgres test for PHP 5.5 2013-06-06 17:55:55 +02:00
Jose Lorenzo Rodriguez
51af8800f2 Rewriting assertion to account for the actual case and not breaking in
PHP 5.5
2013-06-06 17:45:52 +02:00
ADmad
3303a2cda1 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Console/Templates/skel/Config/Schema/db_acl.php
	lib/Cake/Console/Templates/skel/Config/Schema/i18n.php
	lib/Cake/Console/Templates/skel/Config/Schema/sessions.php
	lib/Cake/Console/Templates/skel/Config/acl.ini.php
	lib/Cake/Console/Templates/skel/Config/acl.php
	lib/Cake/Console/Templates/skel/Config/bootstrap.php
	lib/Cake/Console/Templates/skel/Config/core.php
	lib/Cake/Console/Templates/skel/Config/database.php.default
	lib/Cake/Console/Templates/skel/Config/email.php.default
	lib/Cake/Console/Templates/skel/Config/routes.php
	lib/Cake/Console/Templates/skel/Console/Command/AppShell.php
	lib/Cake/Console/Templates/skel/Console/cake.bat
	lib/Cake/Console/Templates/skel/Console/cake.php
	lib/Cake/Console/Templates/skel/Controller/AppController.php
	lib/Cake/Console/Templates/skel/Controller/PagesController.php
	lib/Cake/Console/Templates/skel/Model/AppModel.php
	lib/Cake/Console/Templates/skel/View/Errors/error400.ctp
	lib/Cake/Console/Templates/skel/View/Errors/error500.ctp
	lib/Cake/Console/Templates/skel/View/Helper/AppHelper.php
	lib/Cake/Console/Templates/skel/View/Layouts/Emails/html/default.ctp
	lib/Cake/Console/Templates/skel/View/Layouts/ajax.ctp
	lib/Cake/Console/Templates/skel/View/Layouts/default.ctp
	lib/Cake/Console/Templates/skel/View/Layouts/error.ctp
	lib/Cake/Console/Templates/skel/View/Layouts/flash.ctp
	lib/Cake/Console/Templates/skel/View/Pages/home.ctp
	lib/Cake/Console/Templates/skel/index.php
	lib/Cake/Console/Templates/skel/webroot/index.php
	lib/Cake/Console/Templates/skel/webroot/test.php
2013-06-02 18:03:59 +05:30
Marc Würth
4c9f0414cb Improved the DocBlocks and other code cleanup
Fixed @license tag, url comes first
Whitespace and other minor code cleanup
Added some docblocks
2013-05-31 00:11:19 +02:00
ADmad
a10275fb8b Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php
2013-05-05 14:36:46 +05:30
ADmad
db26e24cb7 Remove error setting when reading/deleting non-existent key.
Fixes #3813
2013-05-04 03:16:33 +05:30
mark_story
d4036310e4 Update limit() for Postgres
It should work like the parent class.
2013-05-02 23:27:26 -04:00
mark_story
00569ea405 Update limit() for Sqlite.
It should behave as the parent class does.
2013-05-02 23:25:13 -04:00
mark_story
2096d3f632 Clamp limit values to be unsigned integers.
This solves large page numbers potentially turning into scientific
notation when being formatted into queries. It also further safeguards
against SQL manipulation.

Refs #GH-1263
2013-05-02 22:36:50 -04:00
ADmad
06a5c509c0 Merge branch 'master' into 2.4 2013-04-21 19:15:55 +05:30
mark_story
0f3d28c6ea Fix condition parsing in mysql specific cases.
When using collation + array values the incorrect operator would be
used. IN should be used over =.

Fixes #3772
2013-04-18 21:52:22 -04:00
mark_story
041c2d289f Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Console/Shell.php
2013-03-26 20:31:54 -04:00
mark_story
729ef8fe58 Fix default null not being reflected by SqlServer
Apply patch from 'Josh Rehm' to fix null default values from being
stomped on when reflecting table schema.

Fixes #3615
2013-03-19 21:02:27 -04:00
mark_story
81dc4c1e85 Merge branch 'master' into 2.4 2013-03-13 20:30:25 -04:00
Ceeram
8374eb92cc fix failing tests. test and mocked sources would cause exceptions 2013-03-13 22:31:23 +01:00
Rémi Dewitte
ab510d1700 Add settings array to connection parameters that executes SET statements once connected 2013-03-07 23:45:42 +01:00
nojimage
84725993e5 Postgres datasource support regular expression operators. 2013-02-22 10:14:06 +09:00
Mark
3b02013f7d Merge pull request #1127 from dereuromark/master-strict-comparison
Strict comparison for strings where applicable
2013-02-14 01:10:48 -08:00
mark_story
f104bd3504 Use simpler asserts.
Refs #3622
2013-02-13 22:43:18 -05:00
nojimage
fbb1a812dd Create rename field statements in postgres
Refs #3622
2013-02-13 22:24:21 -05:00
mark_story
0d9ef854ff Fix FULLTEXT column generation
Fixes #3618
2013-02-12 09:00:57 -05:00
euromark
111366d5c8 == to === and != to !== where applicable 2013-02-12 03:38:08 +01:00
Graham Weldon
66d856d883 Added extra line for referencing license file for copyright 2013-02-08 21:22:51 +09:00
Graham Weldon
7b860debe4 This commit is dedicated to Mark Story, who has put in much dedicated time and effort into CakePHP over the years.
I just wanted to ruin his evening, because this change needs to be merged into CakePHP 3.0.
2013-02-08 20:59:49 +09:00
Perry
5ac5e784de fix a DboDataSource buildJoinStatement bug that table prefix is appended to subquery 2013-01-31 17:01:59 +08:00
Ceeram
16be9d4990 remove unused local vars 2013-01-23 17:22:06 +01:00
euromark
11a88042bd fix doc block endings 2013-01-11 15:06:54 +01:00
mark_story
6f5ff4d7dd Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/Model/CakeSchema.php
	lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
2012-12-13 20:20:42 -05:00
Mark Story
45f6ade800 Merge pull request #997 from rhelms/2.2.5-text-index-in-fixture
Cater for length part of TEXT field in indexes for MySQL'

Fixes #3428
2012-12-12 17:27:30 -08:00
Reuben Helms
07dbc4a527 Cater for length part of TEXT field in indexes for MySQL
Cater for length on TEXT column in index for _alterIndexes

Handle nested arrays in schemas

Used when writing indexes containg TEXT field for MySQL

Change comment style from code review

Remove stray space

Only generate length part of TEXT index column field when necessary

Override buildIndex() in Mysql instead of name()
Revert DboSource::buildIndex to previous state
Update Mysql::_alterIndexes for code reuse
Update MysqlTest to handle quoted index names.

Make code clearer, as per code review

Adjust function comments, as per code review
2012-12-13 08:33:43 +10:00
mark_story
8b0a7ee13d Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/VERSION.txt
2012-12-07 20:53:10 -05:00
euromark
881127ef4d unify new lines at the end of the file 2012-12-05 15:00:24 +01:00
mark_story
002700071d Fix incorrectly quoted fields when using the || operator.
Fixes #3404
2012-12-02 20:59:56 -05:00
mark_story
82d20ed948 Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/Test/Case/Model/ModelReadTest.php
	lib/Cake/Test/Case/View/MediaViewTest.php
2012-11-24 15:44:52 -05:00
Ceeram
eadc3a75e5 fix coding standards 2012-11-21 15:39:03 +01:00
Nicolas
a77e46cbfd Added accidentally removed tests back in. 2012-11-17 23:14:40 +01:00
Nicolas
1b704fb7cf Unit tests added. 2012-11-17 19:34:02 +01:00
mark_story
9ef9b8b662 Remove off by a second errors. 2012-11-12 21:47:05 -05:00