Commit Graph

20591 Commits

Author SHA1 Message Date
Sam Minnee
0cc72c91ad FIX: Use DELETE FROM instead of TRUNCATE for clearTable
clearTable is mainly used for clearing data between tests. In this case,
there are very few or zero records, and DELETE FROM is quicker than
TRUNCATE, which works by deleting and recreating the table.

This materially speeds up test execution, at least on MySQL.

Cherry-pick of SS3 ae9ab22a8f
2018-10-03 13:40:00 +13:00
Maxime Rainville
cefb81dabc
Merge pull request #8436 from creative-commoners/pulls/4.3/this-is-not-js
FIX Moving test to correct directory
2018-10-03 11:05:46 +13:00
Guy Marriott
5970fc2417
FIX Moving test to correct director 2018-10-03 10:47:17 +13:00
Robbie Averill
5a20bb5e20 Revert "FIX: Use DELETE FROM instead of TRUNCATE for clearTable"
This reverts commit 79c2b5ad42.
2018-10-02 14:35:10 +02:00
Robbie Averill
c8e7672ede
Merge pull request #8414 from creative-commoners/pulls/4/searching-for-a-name-conflict
FIX Avoid having search fields with the same names as form elements
2018-10-02 13:43:59 +02:00
Robbie Averill
2ca089bcce
Merge pull request #8433 from sminnee/faster-cleartable
FIX: Use DELETE FROM instead of TRUNCATE for clearTable
2018-10-02 10:43:54 +02:00
Robbie Averill
fa44b50b4f
Merge pull request #8431 from kalicki2k/patch-1
added an http / https switch
2018-10-02 10:35:16 +02:00
Loz Calver
27076aeb93
Merge pull request #8430 from sminnee/fix-6300
FIX: Don’t use USE_FRM in MySQL repair. Fixes #6300.
2018-10-02 10:28:17 +02:00
Sam Minnee
79c2b5ad42 FIX: Use DELETE FROM instead of TRUNCATE for clearTable
clearTable is mainly used for clearing data between tests. In this case,
there are very few or zero records, and DELETE FROM is quicker than
TRUNCATE, which works by deleting and recreating the table.

This materially speeds up test execution, at least on MySQL.

Implemented in SS3 at 815da76b056a716c8831d22bbf93528912cbcb28
2018-10-02 18:00:38 +13:00
Sebastian Kalicki
9051fb923d
removed http... 2018-10-02 05:19:27 +02:00
Sebastian Kalicki
c6c9ce8fbf
added an http / https switch 2018-10-02 00:10:55 +02:00
Sam Minnee
f2cbc1dfbb FIX: Don’t use USE_FRM in MySQL repair. Fixes #6300.
USE_FRM is a sufficiently dangerous option that it should require
manual DBA activity to carry out.

See http://dev.mysql.com/doc/refman/5.7/en/repair-table.html for more
info.
2018-10-02 10:48:47 +13:00
Robbie Averill
bfe2a7b7e6 Update testSearchFieldSchema to expect namespaced search fields 2018-10-01 12:44:19 +02:00
Maxime Rainville
755907d117
Merge pull request #8409 from open-sausages/pulls/4/treedropdown-caching
MINOR Add caching to the TreeDropdownField tree action
2018-10-01 13:56:21 +13:00
Guy Marriott
c503dbd634
Prefixing search filters for the React search form context 2018-10-01 13:38:32 +13:00
Maxime Rainville
13c89d0ed0 Add a comment and only apply caching if using the standard NumChildrenMethod 2018-10-01 11:29:51 +13:00
Robbie Averill
94d534383f
Merge pull request #8422 from hpeide/patch-1
Update index.md
2018-09-28 15:53:45 +02:00
Hans Philip Eide
140436692a
Update index.md
When exporting path to ~/.bash_profile the change do not take action before you reload the shell. Calling 'source  ~/.bash_profile' executes the change.
2018-09-28 15:44:58 +02:00
Robbie Averill
4d14e9b6b1
Merge pull request #8421 from creative-commoners/pulls/4.3/psr-5-deprecations
Update deprecation PHPDocs to be PSR-5 compliant
2018-09-28 14:18:54 +02:00
Loz Calver
10ff6c4f81
Merge pull request #8418 from creative-commoners/pulls/4.3/lower-complexity
MINOR Reduce some code complexity, update array syntax and injected SQLSelect etc
2018-09-28 12:51:08 +02:00
Robbie Averill
e4768e44b0 Use splat over call_user_func_array and reduce calls to func_get_args() 2018-09-28 12:32:20 +02:00
Robbie Averill
e57edcd060
Merge pull request #8387 from sminnee/fix-start-session-without-headers
FIX: Ensure existing session can be accessed if headers_sent()
2018-09-28 10:59:29 +02:00
Robbie Averill
f842ee2eec Update deprecation PHPDocs to be PSR-5 compliant
See: https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc-tags.md#55-deprecated
2018-09-28 10:49:14 +02:00
Loz Calver
aec562f048
Merge pull request #8419 from 3Dgoo/patch-1
minor i18nEntityProvider.php API documentation fix
2018-09-28 10:21:37 +02:00
Loz Calver
289f65fa05
Merge pull request #8413 from open-sausages/pulls/4/classmanifest-exceptions
NEW Show file path on PHP parser exceptions
2018-09-28 10:20:38 +02:00
Sam Minnee
b98c87a6c5 FIX: Ensure existing session can be accessed if headers_sent()
If a session already exists, and Session::start() isn’t called until
after a large enough block of content is output, then headers_sent()
will be false. The previous code prevented the session from being
started in this case. That might makes sense for the creation of a new
session, but it prevent legitimate access to an existing session.

This mostly manifested when running debugging tools such as showqueries,
which may output content before the session is started.
2018-09-28 13:25:13 +12:00
3Dgoo
785b0c69da
minor i18nEntityProvider.php API documentation fix
Fixing documentation typo.
2018-09-28 10:28:00 +10:00
Ingo Schommer
25759ffc5f NEW Show file path on PHP parser exceptions 2018-09-28 08:58:47 +12:00
Robbie Averill
1b0293d8c5 Replace array syntax, use some strict comparison and remove unnecessary elseif 2018-09-27 17:37:37 +02:00
Robbie Averill
594fa30b82 Remove redundant elseif complexity and switch to short array syntax 2018-09-27 17:29:52 +02:00
Robbie Averill
adb4d1f92d MINOR Reduce some code complexity, update array syntax and injected SQLSelect etc 2018-09-27 16:40:23 +02:00
Loz Calver
89df5515ae
Merge pull request #8415 from DorsetDigital/patch-8
Doc update - add FQCN to example code
2018-09-27 11:29:42 +02:00
DorsetDigital
da38505446
Doc update - add FQCN to example code
Add fully qualified classname to aggregate caching example
2018-09-27 10:21:01 +01:00
Guy Marriott
c54e7317d2
FIX Avoid having search fields with the same names as form elements 2018-09-27 17:39:50 +12:00
Robbie Averill
2f67be61c1
Merge pull request #8410 from lekoala/patch-13
FormField::debug should handle all types of values
2018-09-26 14:30:55 +02:00
Thomas Portelange
f103648f8c
value can be something else than a string
if the value is not a string (an array for instance), sprintf will fail
2018-09-26 11:35:40 +02:00
Sam Minnée
a31a496362
Merge pull request #8399 from lekoala/patch-12
var_export does not handle circular references
2018-09-26 20:58:25 +12:00
Maxime Rainville
77339b7e75 MINOR Add caching to the TreeDropdownField tree action 2018-09-26 17:24:06 +12:00
Robbie Averill
a8070dcfc3
Merge pull request #8404 from Carlo1139/patch-1
Typo in code snippet
2018-09-25 10:39:51 +02:00
Carlo1139
748409e61a
Typo in code snippet
Changed $ction to $action
2018-09-25 10:35:19 +02:00
Sam Minnée
5b7a84141b NEW: Add Hierarchy::prepopulate_numchildren_cache() (#8380)
* NEW: Add Hierarchy::prepopulate_numchildren_cache()
API: Hierarchy::stageChildren() customisations must be applied to the base class and not include record-specific behaviour.

Adds the ability to prepopulate the cache for Hierarchy::numChildren()
in a batch.

Note that this optimisation means that stageChildren() is not called on
each record in order to calculate numChildren(). This means that the
structure of the stageChildren() query must be the same for all records
and the behaviour cannot be customised only for a subclass of the base
data class. For example, apply your customisations to SiteTree and not
a subclass.

This is an useful part of optimising the query count on tree generation.
See https://github.com/silverstripe/silverstripe-framework/issues/8379

* NEW: Add Hierarchy::prepopulateTreeDataCache()

This provides a more extensible way of preopulating caches for optimised
tree generation.

Fixes https://github.com/silverstripe/silverstripe-framework/issues/8391
2018-09-25 12:25:23 +12:00
Robbie Averill
3eacecbb1c
Merge pull request #8398 from open-sausages/pulls/4/test-flush
FIX Don't flush manifests in tests by default
2018-09-25 00:19:32 +02:00
Robbie Averill
f2556ded1c
Merge pull request #8400 from creative-commoners/pulls/4.3/semver-break
FIX Revert semver break in adding GridField type hint to method signature
2018-09-24 13:56:15 +02:00
Robbie Averill
0276f6c089 FIX Revert semver break in adding GridField type hint to method signature 2018-09-24 13:39:33 +02:00
Thomas Portelange
72b25d1a97
var_export does not handle circular references
this often happens in SilverStripe, a plain print_r is much safer
2018-09-24 12:31:06 +02:00
Ingo Schommer
a2bb70c46d FIX Don't flush manifests in tests by default
It's massively slowing down test execution,
particularly for rapid execution through test-driven-development (TDD)
2018-09-24 18:12:35 +12:00
Robbie Averill
3b7802bb51
Merge pull request #8388 from sminnee/showqueries-backtrace
NEW: Add ?showqueries=backtrace
2018-09-19 11:21:36 +02:00
Sam Minnee
40dde226fd NEW: Add ?showqueries=backtrace
This variant of showqueries will include a backtrace after each query.
This is extremely verbose but can be helpful when diagnosing where
queries have come from.

This is something that I have frequently added as a local hack on my
environment, I figured that exposing it as a formal feature would be
useful.
2018-09-19 14:28:40 +12:00
Luke Edwards
f1893adea9
Merge pull request #8385 from open-sausages/pulls/4/proppa-pig
Update docs to reflect prop-types change
2018-09-19 13:14:15 +12:00
Luke Edwards
d9d22a2895 Update docs to reflect prop-types change 2018-09-19 10:05:49 +12:00