Commit Graph

3550 Commits

Author SHA1 Message Date
Patrick Nelson
5fa3c85280
FIX for #4417: Ensuring ->removeValidation() is defined on instances of Validator. Setup new API for enabling/disabling validation. Documentation and better type handling. 2017-05-16 12:58:00 +01:00
Damian Mooyman
f5f6fdce12
API Duplication of many_many relationships now defaults to many_many only
Fixes https://github.com/silverstripe/silverstripe-cms/issues/1453
2017-05-16 23:26:39 +12:00
Damian Mooyman
7a7e8e5f94
BUG Fix artifacts index.html download path 2017-05-16 14:54:10 +12:00
Damian Mooyman
259f957ce8 API Rename services to match FQN of interface / classes 2017-05-16 14:15:49 +12:00
Saophalkun Ponlu
a975b88661 Pass autofocus flag to front-end 2017-05-16 11:53:23 +12:00
Damian Mooyman
7a8dfd2785 Add lint-clean and cleanup code linting 2017-05-16 05:01:51 +12:00
Daniel Hensby
e741af9127
Merge branch 'pull/6905' 2017-05-12 12:21:02 +01:00
Damian Mooyman
0b70b008b3 API Implement InheritedPermission calculator (#6877)
* API Implement InheritedPermission calculator

* API Rename RootPermissions to DefaultPermissionChecker
API Refactor inherited permission fields into InheritedPermissionExtension
API Introduce PermissionChecker interface
2017-05-11 21:07:27 +12:00
Ingo Schommer
36214343f0 Merge pull request #6902 from open-sausages/pulls/4/remove-jsmin
Pulls/4/remove jsmin
2017-05-11 11:54:14 +12:00
Aaron Carlino
5b46461879 Remove JSMinifier implementation 2017-05-11 10:40:00 +12:00
Aaron Carlino
7fa47e234f New API for minified files using injectable service 2017-05-11 10:14:16 +12:00
Christopher Joe
17ddfab877 Fix Test form factories use the new interface 2017-05-11 09:57:55 +12:00
Aaron Carlino
4af71b9ed7 Pulls/4/remove reliance on admin dir (#6876)
* Stop relying on external constants

* Revise getTinyMCEPath method to throw exception when no path can be computed

* Throw exception on no gzip, better admin module check
2017-05-10 13:18:44 +12:00
Saophalkun Ponlu
fd51f35bc2 Update tests 2017-05-09 16:52:32 +12:00
Damian Mooyman
a136b8ad44 Merge pull request #6885 from open-sausages/pulls/4.0/fix-intl-test-consistency
Fix intl ICU inconsistencies
2017-05-09 15:52:22 +12:00
Ingo Schommer
0d9b383631 API Removed legacy form fields (fixes #6099) 2017-05-09 11:16:41 +12:00
Aaron Carlino
afd1575267 ENHANCEMENT GridField passes in context for canCreate 2017-05-09 09:15:09 +12:00
Ingo Schommer
493556e497 More robust datetime ICU tests
Some ICU versions (e.g. on CentOS 7.2 with PHP 5.6)
use lowercase rather than uppercase AM/PM indicators
2017-05-08 21:34:56 +12:00
Ingo Schommer
20c6066391 Remove flakey swedish intl test
The intl extension relies on system ICU libraries.
Which seems to behave differently on CentOS 7.2 with PHP 5.6 (returns as '53.292:18 US$').
See http://stackoverflow.com/questions/3991814/php-pecl-extension-intl-giving-garbled-results-for-swedish-ordinal-numbers/8691743#8691743

It's a redundant test, let's just avoid this noise.
2017-05-08 21:31:14 +12:00
Ben Speakman
27bca14f86 Test for getExtension() 2017-05-08 17:22:50 +12:00
Damian Mooyman
d2c6c539d2 Merge pull request #6872 from sminnee/fixture-by-table
NEW: Allow SapphireTest::objFromFixture() to accept either table or class
2017-05-05 15:14:01 +12:00
Sam Minnee
a05958b3ea FIX: i18n test fixtures stricter for Symfony3 2017-05-05 14:32:07 +12:00
Damian Mooyman
942c0257b7 API Upgrade to behat 3 2017-05-05 14:32:07 +12:00
Sam Minnee
1691e90fbd NEW: Allow SapphireTest::objFromFixture() to accept either table or class
Right now SapphireTest::objFromFixture() requires a class as the first
argument. This is fine when your fixture file uses classes as the keys,
but if populating a fixture via tables, objFromFixture() won’t work.

This patch lets you specify either the table name or the class name as
the key.

The benefit here is that you can build fixtures as raw inserts, which is
substantially quicker, and is likely to be a useful tool in building
more efficient test suites.
2017-05-05 10:53:49 +12:00
Damian Mooyman
1f8de20ce7
Fix FormSchemaTest.php linting issues 2017-05-04 13:56:54 +12:00
Damian Mooyman
8b9f41d4f4 BUG Fix ApcuCache and MemCache namespace 2017-05-04 12:17:33 +12:00
Damian Mooyman
0c52ea067c BUG Fix incorrect text collection of __CLASS__ following an Name::class constant (#6868) 2017-05-04 10:19:05 +12:00
Damian Mooyman
12fc690d80 Merge pull request #6850 from robbieaverill/bugfix/i18n-lang-region-same
FIX IntlLocales::validate when lang and region are the same e.g. de_DE
2017-05-01 08:41:44 +12:00
Robbie Averill
3a372a1f41 FIX IntlLocales::validate when lang and region are the same e.g. de_DE 2017-04-28 17:19:27 +12:00
Damian Mooyman
699d5d6a42 Fix i18nTextCollector handling of special string characters 2017-04-28 14:59:42 +12:00
Damian Mooyman
2ae8fde2d3 Fix tests 2017-04-28 14:59:42 +12:00
Uncle Cheese
d51c4891e2 New namespaced i18n keys 2017-04-28 14:59:42 +12:00
Uncle Cheese
494cbd1875 Ran upgrader for lang files 2017-04-28 14:59:42 +12:00
Ingo Schommer
daed727acc Fixed form schema validation 2017-04-28 08:30:59 +12:00
Ingo Schommer
a2ee6a76a0 Fixed formschematest 2017-04-27 21:44:28 +12:00
Ingo Schommer
60706c8efd Store $value in ISO and server timezone consistently, fix min/max timezone handling 2017-04-27 14:59:11 +12:00
Ingo Schommer
de8abe1167 API rename 2017-04-27 11:53:43 +12:00
Ingo Schommer
9b41350f64 More min/max setter tests 2017-04-27 11:53:34 +12:00
Ingo Schommer
958736502a Removed “T” str_replace, more comments 2017-04-27 10:32:22 +12:00
Ingo Schommer
a73abbfcb8 unit test cleanup 2017-04-27 09:18:38 +12:00
Ingo Schommer
1ec2abe75f Fixed timezone and normalised ISO handling
A few observations:
- ISO says “T” is optional (https://en.wikipedia.org/wiki/ISO_8601#cite_note-21),
- WHATWG says in the HTML5 spec that it’s optional (https://html.spec.whatwg.org/multipage/infrastructure.html#local-dates-and-times)
- W3C says it’s reqiured in 1997 (https://www.w3.org/TR/NOTE-datetime), but then later says it’s optional in its HTML5 spec (https://www.w3.org/TR/html5/infrastructure.html#floating-dates-and-times).
- Chrome doesn’t parse values with whitespace separators (requires "T")
- DataObject DBDatetime values and database columns use whitespace separators (and will have many devs relying on this format)
- MySQL only supports whitespace separators (https://dev.mysql.com/doc/refman/5.7/en/datetime.html)
- SQLite can parse both ways (https://sqlite.org/lang_datefunc.html)

So the goal here is to retain ORM/database compatibility with 3.x (whitespace separator),
while exposing "T" separators to the browser in HTML5 mode.

Regarding timezones, this fixes a regression where setValue() would not actually
apply the timezone (last $value assignment is ineffective now that sub fields are removed).
2017-04-26 22:55:29 +12:00
Ingo Schommer
a279d00e81 Min/max validations 2017-04-26 22:45:12 +12:00
Ingo Schommer
e97783b057 Better second handling 2017-04-26 22:45:08 +12:00
Saophalkun Ponlu
dba1f61f13 Fix tests related to date time 2017-04-26 22:45:07 +12:00
Christopher Joe
1f74221c2d Fix unit tests 2017-04-26 16:03:52 +12:00
Simon Erkelens
ff3ad6eb6b Use Config for authenticator settings 2017-04-22 14:48:56 +12:00
Damian Mooyman
2548bfba1e API Replace SS_HOST with SS_BASE_URL
API Remove Director::$test_servers / $dev_servers
API Remove MODULES_PATH / MODULES_DIR constants
ENHANCEMENT Injector backtick syntax now supports environment variables as well as constants
Fixes #6588
2017-04-20 22:28:57 +12:00
Damian Mooyman
136b67f597
API Major refactor of Hierarchy into MarkedSet 2017-04-13 16:27:13 +12:00
Damian Mooyman
7bc447eea8 Merge pull request #6795 from robbieaverill/bugfix/phpunit-config-bug-with-constants
FIX Ensure that mysite test boostrap configuration is loaded after core and before the database connection
2017-04-12 12:57:22 +12:00
Damian Mooyman
f2768c85b1 API Enable namespaced-localisation keys in templates
BUG Fix whitespaces in SSTemplateParser.peg
2017-04-11 18:07:53 +12:00
Robbie Averill
1ca51eb57a FIX Ensure that mysite test boostrap configuration is loaded after core and before the database connection 2017-04-11 14:32:53 +12:00
Daniel Hensby
1f0e1913cd
Merge branch '3.5' into 3 2017-04-08 20:25:27 +01:00
Robbie Averill
55eb7ebdcc FIX Do not insert requirements more than once in includeInHTML
This change consolidates the string replacements used to insert requirements into the page content to help ensure
that they are not compounding and overwriting eachother.

The added test case includes where a user may have a Javascript snippet that contains a closing head tag, and the
test ensures that it does not get injected with requirements as well as the actual head tag in the DOM.
2017-04-07 17:04:17 +12:00
Sam Minnee
22ad39e5ae FIX: Fix SSViewerTest in PHP7
PHP7 is a bit more picky about passing values by reference.
2017-04-05 11:05:29 +10:00
Loz Calver
454646c4df Fix invalid closure param in ShortcodeParserTest 2017-04-05 11:05:28 +10:00
Loz Calver
40bf945322 NEW: PHP 7 compatibility
This patch introduces PHP 7 compatability without breaking semver by adding DBInt
and DBFloat classes, with Int/Float classes that are only loaded into PHP 5 environments
2017-04-05 11:00:04 +10:00
Damian Mooyman
e61257c27b API Update embed/embed to 3.0
API Better shortcode generation for embed shortcodes
2017-04-04 10:20:08 +12:00
Damian Mooyman
9be22701fd API exists() no longer true for nullifyIfEmpty if empty string
Optimise DBString::exists() to skip shortcodes
2017-04-04 10:20:08 +12:00
Daniel Hensby
51f98c973f
Merge branch '3.5' into 3 2017-04-03 22:57:58 +01:00
Ingo Schommer
e3fbd1dcac Fixed coding conventions 2017-04-03 20:54:25 +12:00
Ingo Schommer
e9693467bf Fixed tests 2017-04-03 20:04:37 +12:00
Ingo Schommer
a70de91b33 Fix DatetimeFieldTest 2017-04-03 19:35:40 +12:00
Ingo Schommer
3b94d14e42 MERGE 2017-04-03 12:11:21 +12:00
Ingo Schommer
326aa37ea4 API HTML5 date/time fields, remove member prefs (fixes #6626) 2017-03-31 15:21:47 +13:00
Daniel Hensby
ac075eaf0b Remove TestListener and rely on PHPUnits APIs 2017-03-30 11:46:58 +13:00
Ingo Schommer
ac9d645e4e Root-level module support in Module->getResourcePath()
See https://github.com/silverstripe/silverstripe-framework/pull/6733
2017-03-29 10:19:31 +13:00
Ingo Schommer
556c9a537e Module->getResourcePath()
Based on Sam's feedback in https://github.com/silverstripe/silverstripe-framework/pull/6733
2017-03-28 17:22:30 +13:00
Damian Mooyman
874c6ccdd4 API Add experimental getResource() to Module 2017-03-28 14:13:47 +13:00
Loz Calver
b3d37880e9
FIX: many_many_extraFields breaks _SortColumn0 ordering (fixes #6730) 2017-03-27 09:16:13 +01:00
Damian Mooyman
ac3a9c9e6e API Split out SilverStripe\ORM\Versioned into new module 2017-03-27 11:03:39 +13:00
Daniel Hensby
0410b4c35e
Respect PHPUnit method visibility 2017-03-24 16:23:03 +13:00
Daniel Hensby
6b4a72dee8
Fixing deprecated PHPUnit APIs 2017-03-24 16:23:01 +13:00
Damian Mooyman
1186f07830 API Use mysql-safe table namespace separator 2017-03-24 14:17:30 +13:00
Sam Minnée
d91c6659be Merge pull request #6723 from open-sausages/pulls/4.0/assets-module
API Split SilverStripe\Assets into separate module
2017-03-23 09:21:27 +13:00
Damian Mooyman
dae6d5902f API Split SilverStripe\Assets into separate module 2017-03-21 11:12:51 +13:00
Damian Mooyman
e4c68bc2bf
Fix and test pluralisation usages 2017-03-21 10:49:30 +13:00
Damian Mooyman
54ba08a306 API Replace ManifestCache with ManifestCacheFactory
API Remove lots of deprecated module code from ClassManifest
2017-03-21 09:43:48 +13:00
Sam Minnee
5ea238c58b MINOR: Add a Versioned test for #6680
It turns out that cascaded query params as described in #6680 were
already implemented; this test confirms that.
2017-03-14 09:39:26 +13:00
Damian Mooyman
0c41a97a8b API Refactor Form request handling into FormRequestHandler
API Add HasRequestHandler interface
API Refactor Link() and url handling behaviour from Controller into RequestHandler
API RequestHandler classes now must define url_segment to have a default Link()
API Clean up redirectBack()
2017-03-10 15:04:33 +13:00
Christopher Joe
50deb17763 API remove UploadField, AssetField and associated files
Fixes #6481
2017-03-09 10:16:46 +13:00
Daniel Hensby
cdb4a86e1c
PHPParser optimisations and update 2017-03-06 10:35:25 +00:00
Damian Mooyman
f1b99b6fa7
API Enable theming of GroupedDropdownField
Based on partial back-port of 4.0 code
2017-03-06 11:44:42 +13:00
Daniel Hensby
f225b83e2b
Merge branch '3' 2017-03-03 15:55:22 +00:00
Daniel Hensby
e932b22388
Merge branch '3.5' into 3 2017-03-03 14:54:43 +00:00
Daniel Hensby
8aaa3e3a86
Merge branch '3.4' into 3.5 2017-03-03 14:54:29 +00:00
Daniel Hensby
7f194a917d
Merge pull request #6351 from steve-silverstripe/patch-2 2017-03-03 14:05:53 +00:00
Daniel Hensby
62e301bdba Merge pull request #6529 from timezoneone/3.5
Fix bug: In addOrderBy method, _SortColumn will only keep the last one if there are more than 1 multi-word columns
2017-03-03 12:45:05 +00:00
Shawn
72b6fb49b6 Fix bug: In addOrderBy method, _SortColumn will only keep the last one if there are more than 1 multi-word columns 2017-03-03 14:11:53 +13:00
Damian Mooyman
6ed98a3a94
BUG Prevent obsolete class cache breaking autoload
Remove hard-coded class paths
2017-03-01 10:06:15 +13:00
Damian Mooyman
ff47bc03d7 BUG Remove reference to $_SERVER within FakeController 2017-02-27 16:54:01 +13:00
Damian Mooyman
695194546d BUG Ensure test fixture uses test module manifest 2017-02-27 16:54:01 +13:00
Damian Mooyman
c452d5f6cd API Rename CoreConfigCreator to CoreConfigFactory
Fix rebase regressions
2017-02-27 16:54:01 +13:00
Damian Mooyman
8444a21cbf API Upgrade tests to use new Config API 2017-02-27 16:54:01 +13:00
Ingo Schommer
d220ca3f67 API Use symfony/cache (fixes #6252) 2017-02-26 13:07:59 +13:00
Daniel Hensby
1c55948fc1
Ensure test objects implement TestOnly 2017-02-21 20:30:15 +00:00
Daniel Hensby
7156da6279
Merge branch '3' 2017-02-20 22:19:33 +00:00
Daniel Hensby
0ddf3b4186
Merge branch '3.5' into 3 2017-02-20 21:33:31 +00:00
Daniel Hensby
5a6f784e42
Merge branch '3.4' into 3.5 2017-02-20 21:31:09 +00:00
Ingo Schommer
80723c077b Reinstated separated DateField functionality 2017-02-16 09:06:14 +13:00
Damian Mooyman
014f0d23ed
API Create SeparatedDateField
API Restrict allowed values parsed via DBDate::setValue
API Remove NumericField_Readonly
API Remove DBTime::Nice12 / Nice24
2017-02-15 11:07:58 +13:00
Daniel Hensby
7122e1fde7 FIX Comments ignored by classmanifest (#6619) 2017-02-15 10:46:04 +13:00
Damian Mooyman
029a8b9586
API Substitute Zend_Currency with NumberFormatter based solution
API Substitute Zend_Locale with Locale / NumberFormatter
API Substitute Zend_Date with IntlDateFormatter
API Added DBTIme::Nice12, FormatFromSettings
API Added Short() method to DBDate / DBTime / DBDatetime
API Add Date::getTimestamp()
API Added setSubmittedValue api for FormField
API Add second arg to base FormField::setValue()
API Major refactor of i18n into component data parts
API Implement Resettable interface to reset objects between tests
ENHANCEMENT Changed DBField::create_field return type to `static` to support better type hinting
ENHANCEMENT i18nTextCollector supports __CLASS__
2017-02-09 15:28:59 +13:00
Daniel Hensby
71383b827d
Merge branch '3' 2017-02-08 12:34:45 +00:00
Daniel Hensby
4d3cd9d9a2
Merge branch '3.5' into 3 2017-02-08 10:40:40 +00:00
Andrew Aitken-Fincham
b8a0944bda FIX/load fields if lazy ones exists 2017-02-08 08:52:48 +00:00
Damian Mooyman
c25c443d95 BUG Fix minor mysql 5.7 warning in SQLQueryTest (#6608)
Fixes #5451
2017-02-08 15:44:55 +13:00
Aaron Carlino
0982f77ec7 Feature/aggregate data filters (#6553) 2017-02-03 09:03:19 +13:00
Daniel Hensby
8c8231c03e
NEW Director::host() to determine host name of site 2017-01-31 21:36:04 +00:00
Daniel Hensby
873fd8c5bc
NEW replace _ss_environment.php with .env and environment vars 2017-01-31 20:40:17 +00:00
Daniel Hensby
a5da085cc7
Merge branch '3' 2017-01-31 17:03:53 +00:00
Daniel Hensby
669f6a3d41
Merge branch '3.5' into 3 2017-01-31 13:33:26 +00:00
Daniel Hensby
56b887f578
Merge branch '3.4' into 3.5 2017-01-31 13:33:00 +00:00
Damian Mooyman
7b26b4a1f3 BUG Ensure that tests run with flush=1 clean Flushables
BUG Restore opt-in flushing (regression from #4404)
2017-01-31 18:59:19 +13:00
Damian Mooyman
609b0a612c Merge pull request #6512 from silverstripe/pulls/3.4/ensure-string-return
Test fixes - reorder assertions and ensure string returned
2017-01-31 17:25:34 +13:00
Damian Mooyman
de02a3f733
Restored context parameter to i18n, and added to a “comment” key
Rolled pluralisation functionality into the i18n::_t() method
Warnings on missing default can now be turned off
2017-01-25 18:12:40 +13:00
Damian Mooyman
8a07c56bdf API Replace i18n message localisation with symfony/translation
API Implement enhanced pluralisation
Remove Zend_Translate and all Zend dependencies from i18n
Deprecated $context from i18n::_t()
Warn on missing default string for i18n::_t()
2017-01-25 17:08:12 +13:00
Robbie Averill
3583f1f79e API Convert::raw2json can be passed an optional bitmask of JSON constants as options 2017-01-24 13:27:16 +13:00
Daniel Hensby
8b4cce435e
Merge branch '3' 2017-01-17 14:17:45 +00:00
Damian Mooyman
d192a4f86f BUG Fix root folder getFilename() returning incorrect path (#6510) 2017-01-17 17:49:42 +13:00
Daniel Hensby
2ce80e448d
Merge branch '3.5' into 3 2017-01-16 21:00:14 +00:00
Stephan Bauer
17d123a3be BUG Ensure correct regeneration of ConfigManifest if only one of the cache files is missing 2017-01-16 21:24:34 +01:00
Daniel Hensby
de7372ad3b
Test fixes - reorder assertions and ensure string returned 2017-01-16 14:46:22 +00:00
Damian Mooyman
7d67c5b9bd
API Allow users to act-as another 2017-01-16 09:04:20 +13:00
Stephan Bauer
1f1fffe734 BUG Ensure correct regeneration of ConfigManifest if only one of the cache files is missing (fixes #6467) 2017-01-14 23:13:47 +01:00
Daniel Hensby
f2470cc98d Merge pull request #6459 from robbieaverill/feature/nofollow-robots-in-security
Add X-Robots-Tag noindex,nofollow header from Security controller to prevent indexing
2017-01-13 12:38:04 +00:00
Daniel Hensby
c4972da37e Merge pull request #6496 from robbieaverill/feature/remove-gridfield-components
API Enhancement: Allow "removeComponentsByType" to remove multiple component"s"
2017-01-13 11:29:04 +00:00
Robbie Averill
ce38f1f1fd API Enhancement: Allow "removeComponentsByType" to remove multiple component"s" 2017-01-13 23:30:30 +13:00
Daniel Hensby
3ea5015f8b NEW Move to SwiftMailer powered Emails (#6466)
* API Replace existing Email and Mailer classes with SwiftMailer powered email system

* DOCS New Email docs

* Initial feedback from Damian

* Making Mailer an interface

* Templates relocated

* Round of feedback

* More robust approach to plain parts

* Revert changes to TestMailer
2017-01-13 14:48:46 +13:00
Ingo Schommer
3b06e30558 Don’t add extension dot in FileNameFilter
File names are generally valid without an extension (although they might be disallowed by upload constraints),
so the filter should deal gracefully with them (“myfile” should return “myfile”, not “myfile.”)
2017-01-13 11:11:40 +13:00
Ingo Schommer
b1d5e97a3d Enforce unique Folder names, use AssetNameGenerator 2017-01-13 11:11:37 +13:00
Daniel Hensby
747c0770e7 Merge pull request #6446 from robbieaverill/feature/controllers-without-underscores
API Allow controller discovery without underscores (PSR-2 compliance)
2017-01-11 15:27:56 +00:00
Damian Mooyman
6b5efb91fd Merge pull request #6434 from open-sausages/features/4.0/ui-button-refresh
Refresh CMS UI buttons to new flat style and bootstrap classes
2017-01-11 14:22:25 +13:00
Robbie Averill
6fb49224b9 FIX SSViewer should resolve templates with or without underscores
* Capture fully qualified class name, without "Controller"
2017-01-11 09:59:28 +13:00
Robbie Averill
2f6f5b5eff Do not send the header if it is not defined 2017-01-11 08:26:04 +13:00
Daniel Hensby
f3b6bb1470
Merge branch '3' 2017-01-10 14:31:07 +00:00
Daniel Hensby
733511565e
Merge branch '3.5' into 3 2017-01-10 12:52:06 +00:00
Damian Mooyman
9e563ebd3a
API Moved iShouldSeeAButton to behat-extension 2017-01-10 14:39:24 +13:00
Robbie Averill
cb2dcc75f1 Add X-Robots-Tag noindex,nofollow header from Security controller to prevent indexing 2017-01-09 16:13:39 +13:00
Paul Clarke
178bd480eb API Changes required for asset search behaviour 2017-01-09 14:55:20 +13:00
Damian Mooyman
3e32b18c6b Merge pull request #6263 from dhensby/pulls/3/allow-unltd-grid-row-count
NEW Allow setting of unlimited row counts on GridFieldPaginator
2017-01-05 09:12:02 +13:00
Daniel Hensby
faccdef532 Merge pull request #6444 from robbieaverill/feature/add-group-tests
TEST Add Group tests for collating family IDs and getting all children
2016-12-29 23:41:31 +00:00
Robbie Averill
b4e183aba5
TEST Add Group tests for collating family IDs and getting all children 2016-12-30 11:27:52 +13:00
Daniel Hensby
776d2fbc66
NEW Allow setting of unlimited row counts on GridFieldPaginator 2016-12-29 14:10:13 +00:00
Robbie Averill
e8b959864e TEST Add historical password count test 2016-12-30 00:43:14 +13:00
Robbie Averill
37a009289c Consolidate temporary file creation and deletion logic. 2016-12-29 22:32:04 +13:00
Robbie Averill
7448622a1a FIX Replace ini casting to int with explicit split and cast for PHP 7.1. Add tests. 2016-12-29 21:55:52 +13:00
Daniel Hensby
664c0eafbe
Merge branch '3' 2016-12-28 14:30:54 +00:00
Daniel Hensby
c8a40605ec Merge pull request #6413 from volkerloew/1400-text-contextsummary
search term highlighting without altering case (fixes #1400)
2016-12-28 13:36:08 +00:00
Volker Löw
5e581eace7
search term highlighting without altering case (fixes #1400) 2016-12-28 13:03:35 +00:00
Damian Mooyman
b1b3a6ee13 Merge 3.4 into 3.5 2016-12-22 13:18:37 +13:00
Damian Mooyman
94c3bc9fa1 Merge 3.4.3 into 3.4 2016-12-22 13:16:12 +13:00
Damian Mooyman
f314b86ad8 BUG Temp disable shortcode SPLIT behaviour due to crash (#6436)
Fixes #5987
2016-12-22 10:08:46 +13:00
Damian Mooyman
ffdb99e78d BUG Temp disable shortcode SPLIT behaviour due to crash (#6436)
Fixes #5987
2016-12-21 18:55:00 +13:00
Damian Mooyman
9be5142fc1 API ChangeSet::publish() / canPublish() no longer treats hasChanges() = false as a permission error
BUG fix issues with doArchive() in live mode
2016-12-21 14:28:20 +13:00
Daniel Hensby
273a06d47d
TEST Duplicated DataObjects dont keep Created date value 2016-12-19 14:23:39 +00:00
Daniel Hensby
78ed003977
Merge branch '3.4' into 3.5 2016-12-19 10:48:10 +00:00
Damian Mooyman
c2a1e86f5d Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
Damian Mooyman
c007e85d1b
BUG Suppress HtmlEditorField casting
Fixes #6396
2016-12-19 16:03:48 +13:00
Daniel Hensby
efd8114fd5
Merge branch '3.4' into 3.5 2016-12-16 15:52:53 +00:00
Daniel Hensby
f8132b39af
Assertions should be $this->assert($expected, $actual) 2016-12-13 11:32:52 +00:00
Damian Mooyman
6e589aac75
API Updates to Form, ValidationResponse, ValidationException
API Implement form schema "errors" handling
2016-12-09 14:24:11 +13:00
Sam Minnee
6650561dac Don't use session and FormSchema to manage server-side React validation responses 2016-12-09 10:27:23 +13:00
Damian Mooyman
6b06fd9f2d
API Add buttonTooltop to PopoverField and fix critical positioning issue 2016-12-07 13:06:35 +13:00
Damian Mooyman
6107f45d1e
Temp patch to 5987 to prevent cms crashing 2016-11-30 11:20:22 +13:00
Daniel Hensby
2e538ca9ab
Merge tag '3.4.2' into 3.4
Release 3.4.2
2016-11-29 17:17:00 +00:00
Daniel Hensby
c6d43b477e
Merge branch '3' 2016-11-29 13:27:49 +00:00
Daniel Hensby
fb39022ef3
Merge branch '3.4' into 3.5 2016-11-29 11:40:37 +00:00
Daniel Hensby
3a009a5849
Merge branch '3.3' into 3.4 2016-11-29 11:39:58 +00:00
Damian Mooyman
9ec1d35f2b
BUG Fix behat tests unable to capture HTML editor fields 2016-11-29 14:49:39 +13:00
Damian Mooyman
97d0fc61d8
API Include psr-2 checks in CI 2016-11-29 13:00:58 +13:00
Daniel Hensby
1be2e70a2a
Merge branch '3' 2016-11-24 14:18:09 +00:00
Damian Mooyman
22cb3d0d74 Fix various ORM test issues 2016-11-23 19:25:12 +13:00
Damian Mooyman
6e8304ff2f API Namespace framework tests 2016-11-23 19:25:12 +13:00
Damian Mooyman
789cb5b465 Move files to psr-2 standard locations 2016-11-23 19:25:12 +13:00
Daniel Hensby
3e36f5691b
Merge branch '3.4' into 3.5.0 2016-11-22 11:31:39 +00:00
Daniel Hensby
f57244d526
Merge branch '3.3' into 3.4 2016-11-22 11:29:32 +00:00
Daniel Hensby
f17e21c4a3
Merge branch '3.2' into 3.3 2016-11-22 11:26:41 +00:00
Daniel Hensby
d2633be56d
Merge branch '3.1' into 3.2 2016-11-22 11:21:08 +00:00
Damian Mooyman
43917edc97 Cleanup FeatureContext 2016-11-22 16:58:01 +13:00
Christopher Joe
875811fdfd API Create loading state for schema
API Create stateOverride state for schema
Enhancement Moved crumbs property to rely on redux state
Enhancement Updated file app icon names
API Added InsertMediaModal functionality to HtmlEditorField
API Removed dependency on schema ID that is returned from server
API Added afterMessages property for FormBuilder to display content after the alert message
2016-11-22 16:58:00 +13:00
Daniel Hensby
69974d940a
Merge branch '3.3' into 3.4 2016-11-18 11:33:39 +00:00
Daniel Hensby
0ae4b57754
Merge branch '3.2' into 3.3 2016-11-18 11:32:36 +00:00
Daniel Hensby
5df077f24d
Merge branch '3.1' into 3.2 2016-11-18 11:29:19 +00:00
Damian Mooyman
f43a91a4f8 API Add FormField::canSubmitValue()
API Add HTMLText::getProcessShortcodes() / setProcessShortcodes()
API Split TextareaField::Value() into ValueEntities() with shortcodes disabled
2016-11-17 09:55:03 +13:00
Daniel Hensby
8e5f786b8d
Merge branch '3.4' into 3.5.0 2016-11-15 11:43:16 +00:00
Daniel Hensby
3f4445641d
Merge branch '3.3' into 3.4 2016-11-15 11:35:38 +00:00
Daniel Hensby
c7778a1e9a
Merge branch '3.2' into 3.3 2016-11-15 11:19:27 +00:00
Daniel Hensby
06d0210233
Merge branch '3.1' into 3.2 2016-11-15 11:18:46 +00:00
Damian Mooyman
cc9d17063a
Add tests for FormField submission behaviour
Fix ReadonlyField casting with empty values
Restore Value() behaviour for TextareaField
2016-11-15 11:55:48 +13:00
Daniel Hensby
61e4055bdb
[SS-2016-010] FIX Cast FormField values as Text to prevent readonly fields embeding rogue HTML 2016-11-14 10:38:15 +00:00
Daniel Hensby
17108ff50c
Merge branch '3.4' into 3.5.0 2016-11-10 14:23:38 +00:00
Daniel Hensby
bcc21c2403
Merge branch '3' 2016-11-10 01:09:35 +00:00
Damian Mooyman
ebae480c66
BUG Fix regression in aggregate column lookup from #6199 2016-11-10 11:13:02 +13:00
Daniel Hensby
5a7cde0e10
Merge branch '3.4' into 3.5.0 2016-11-09 16:14:40 +00:00
Loz Calver
6bf36fbd30
FIX: Correct return type for Member::currentUser() 2016-11-09 14:20:44 +00:00
Damian Mooyman
eefecc21fc BUG Fix incorrect include paths in tests and railsyml (#6279) 2016-11-03 14:41:19 +13:00
Damian Mooyman
ce10530f53 Merge pull request #6251 from open-sausages/pulls/4.0/schema-validation-rules
Implement client-side form validation feedback in React forms
2016-11-03 12:27:54 +13:00
Damian Mooyman
4ee78fc29d BUG Restore travis artifacts (#6277)
Fixes #6046
2016-11-03 12:17:15 +13:00
Damian Mooyman
1142757c21 API Add 'validation' to form schema 2016-11-03 10:07:24 +13:00
Damian Mooyman
019e99dd4d BUG Fix regressions from src folder creation (#6272) 2016-11-02 13:18:56 +13:00
Damian Mooyman
d7cb38434e
Create separate cms-config.yml for cms behat tests within framework 2016-11-02 10:54:09 +13:00
Damian Mooyman
6da36a9ed1
Fix some issues with tests 2016-11-02 09:11:35 +13:00
Damian Mooyman
c0c219e178
Fix invalid files_path 2016-11-01 17:55:43 +13:00
Damian Mooyman
5650254b53 NEW: Fixes to allow code files in src/ folder.
Separated from the file renames for clarity.
2016-11-01 16:35:32 +13:00
Chris Joe
82119888c1 Validation on server side for React forms (fixes #6205) 2016-10-28 16:13:29 +13:00
Damian Mooyman
1734e0d2a3 API Shorten overly-verbose invalid extension error (#6231)
Fixes #6198
2016-10-28 15:20:49 +13:00
Damian Mooyman
e386c6a153 FIX: Refactor bootstrap.php to allow for code sharing with cms bootstrap 2016-10-28 10:53:11 +13:00
Daniel Hensby
3859a1d7e7
Merge branch '3.4' into 3 2016-10-27 16:16:04 +01:00
Sam Minnee
7b44fc7bce FIX: Fix SSViewerTest in PHP7
PHP7 is a bit more picky about passing values by reference.
2016-10-26 15:38:13 +13:00
Ingo Schommer
a4a895ff43 Merge pull request #6219 from open-sausages/pulls/4.0/fix-behat-search-chosen
BUG Prevent intermittent "Element is not currently visible and so may not be interacted with"
2016-10-25 17:33:22 +13:00
Damian Mooyman
ea6851fd70 API Rename _versions table to _Versions
API Support case-sensitive changes to tables
Fixes #2365
2016-10-25 13:27:21 +13:00
Damian Mooyman
e83f3962a1
BUG Prevent intermittent "Element is not currently visible and so may not be interacted with" 2016-10-25 10:42:13 +13:00
Damian Mooyman
316ac86036
API Writes to versioned dataobjects always writes to stage even when written on live
API Remove "Archive" actions
API "Delete" actions for pages now archives records
BUG Fix batch actions failing on certain controllers
Fixes #6059
2016-10-21 13:16:32 +13:00
Damian Mooyman
7cd32b7d72
Remove unnecessary $schemaLink parameter 2016-10-21 11:11:18 +13:00
Ingo Schommer
1e478a5378 Consistently set 'id' in FormSchema
The URL to request the schema representation is the unique identifier.
We can't default to $request->getURL() since that's different for form submissions.

The schema.schema_url key is redundant, since the identifier is already contained on the top level 'id' key.
Keeping schema_url in a schema itself makes it less portable, particularly once we transition into
generic schemas which are not reliant on a particular record context (that's only contained in the schema_url)

This also fixes the issue of form schemas not refreshing after submit,
e.g. when form fields are added or removed.
2016-10-20 15:33:50 +13:00
Damian Mooyman
840f275235 API Created a generic FormFactory interface (#6178)
Created a generic DataObject FormFactory interface that can be substituted in place of getCMSFields. Different FormFactories can depend on different kinds of context, such as
'Record' or 'Controller' - it's the responsibility of the code calling the factory to interpret and
supply this context.

The expected use-case is that rather than overriding getCMSFields(), developers can
change CMS UIs by manipulating the FormFactory associated with the given DataObject.

This is an experimental UI and may change before 4.0 stable is released.
2016-10-20 12:42:24 +13:00
Jonathon Menz
b0445f72e4 FIX Ambiguous column SQL error
Specify the table for the field we’re fetching, in case a joined table has a field with the same name
2016-10-18 21:35:37 -07:00
Daniel Hensby
9a6121c867
Merge branch '3.4' into 3 2016-10-16 22:56:37 +01:00
Daniel Hensby
8afff154b8 Merge pull request #6171 from open-sausages/pulls/4.0/use-changeset-for-publish
API Versioned::publishRecursive() now uses a ChangeSet
2016-10-16 14:45:23 +01:00
Damian Mooyman
f60fe7d4a9
API Versioned::publishRecursive() now uses a ChangeSet
API Add IsInferred to inferred changesets
API Add SapphireTest::assertNotDOSContains
Fixes #5667
2016-10-13 17:38:08 +13:00
Damian Mooyman
055795d4d1
API Support fixture paths relative to current directory 2016-10-13 16:53:30 +13:00
Daniel Hensby
4c7ba731be
Merge branch 'open-sausages/pulls/3.4/fix-checkbox-datalist' into 3.4 2016-10-11 20:16:33 +01:00
Damian Mooyman
7368deca8f
BUG Fix issue with SS_List as datasource for dropdown field
BUG Fix validation issue with CheckboxSetField
Fixes #6166
2016-10-11 14:58:48 +13:00
Damian Mooyman
27d35403e8 API Force formschema to be reloaded on form submission
BUG Fix missing action state
2016-10-07 13:26:57 +13:00
Damian Mooyman
92e34b7434 API controller::join_links supports array values 2016-10-07 13:25:56 +13:00
Damian Mooyman
cb24d199b6 API Convert fieldSpec options to bitwise operators (#6161)
Fixes #6159
2016-10-06 23:23:22 +01:00
Damian Mooyman
11bbed4f76
API Move many methods from DataObject to DataObjectSchema 2016-10-06 19:57:24 +13:00
Damian Mooyman
f0dd9af699 API Support named join alias for many_many through list
Add tests for sorting on joined alias
2016-10-06 17:39:48 +13:00
Damian Mooyman
e7303170c2 API Implement many_many through
API Remove DataObject::validateModelDefinitions, and move to DataObjectSchema
API Remove deprecated 3.0 syntax for addSelect()
API made DataList::createDataObject public
API Move component parsing logic to DataObjectSchema
API Remove support for triangular has_many / belongs_many relationships
2016-10-06 17:39:48 +13:00
Damian Mooyman
380d6523c5
API Cleaned up versioned status checks 2016-10-06 10:31:09 +13:00
Christopher Joe
287809ec3b Refactored react FormFields to use react-bootstrap FormControl components
Addded Checkbox, CheckboxSet and Optionset (radio) fields
Refactored documentation
2016-10-05 10:25:21 +13:00
Jonathon Menz
797be6ac82 FIX Revert natural sort
More backwards compatible and more consistent with ORM sorting (fixes #6124)
2016-10-04 13:56:12 -07:00
Loz Calver
cc68d336b1 Tests to cover caching repeated template lookups 2016-10-03 16:01:02 +01:00
Stephan van Diepen
95b66d19b2
Added MySQL support for Bigint.
Conflicts:
	model/MySQLDatabase.php
2016-09-30 16:38:25 +01:00
Damian Mooyman
5a2e2b7ed5 Merge pull request #6089 from open-sausages/pulls/codecoverage
Code coverage via CodeCov.io
2016-09-27 10:23:30 +13:00
Ingo Schommer
9cb33ea5bf Fixed @covers namespaces 2016-09-27 07:46:17 +13:00
Daniel Hensby
74ecaded08
Merge branch '3' 2016-09-26 14:00:58 +01:00
Andrew Aitken-Fincham
ad0d68d133 add IPUtils.php to control and implement symfony IpUtils (#6062) 2016-09-26 12:44:55 +13:00
Daniel Hensby
004bb8f03a
Merge pull request #5998 from sminnee/remove-bbcode 2016-09-23 15:28:30 +01:00
Damian Mooyman
65ff0a4d38
BUG Fix incorrect backslash escaping in htaccess template 2016-09-22 19:11:08 +12:00
Damian Mooyman
aa7a9565ce BUG Fix incorrect ssviewertest path (#6060) 2016-09-22 18:03:14 +12:00
Ingo Schommer
60294654d9 Merge pull request #6056 from open-sausages/pulls/4.0/fix-file-validation
BUG Fix invalid file uploads not being validated
2016-09-22 16:22:01 +12:00
Damian Mooyman
e8375111b1
API Enable default value to be specified for dbstring types at the db level
Fixes #1409
2016-09-22 15:19:30 +12:00
Damian Mooyman
9a9cd97bc3 BUG Fix invalid file uploads not being validated 2016-09-22 14:55:06 +12:00
Sam Minnee
2e054af7b1 FIX: Throw more helpful error if tests are run badly.
If you run tests outside of a composer autoloader-based environment, or
your autoloader isn’t pulling in Constants.php, everything will break.

This provides a more helpful error message.
2016-09-21 09:43:14 +12:00
Sam Minnee
07396e4437 NEW: Move Travis behat test to run locally.
This shifts the behat test run to be triggered form composer activity
within the framework module directly,

 * silverstripe/serve is used to provide a webserver, based on the
   php -S command
 * se/selenium-server-standalone is used to install selenium rather than
   a download command

Because we’re using serve, the behat configuration can be locked down.

Further refinements could be made on this:

 * the behat-extension could be responsible for installing and
   starting/stopping selenium, making these tests more portable
 * xvfb initialisation could be provided with another bin tool in the
   begat-extension: vendor/bin/xvfb 1024x768
 * The bootstrap-file argument to serve could be provided as part of a
   composer.json setting. This would make it easier for developers to
   start a dev server simply by running vendor/bin/serve
 * the behat-extension could be responsible for installing and
   starting/stopping silverstripe/serve, removing the need for
   specifying base_url at all, and possibly utilising the same bootstrap
   file between serve and behat.
2016-09-17 15:40:37 +12:00
Sam Minnee
61d7c3af28 FIX: Fix tests when running directly from framework. 2016-09-17 15:40:32 +12:00
Sam Minnee
9dd5ebee8c NEW: Don’t set up SilverStripe project for test run
The SilverStripe project structure complicates the travis test run, and
the goal of this branch is to prevent it from being necessary.

 - Unit tests can be run simply with PHPUnit.
 - Behat test can be run with the silverstripe/serve module

Note that initially this commit doesn’t cater to the behat tests.

As part of this, we allow dev packages to be installed when testing

These settings don’t affect projects that use framework, only when
framework’s composer install / require calls are used themselves.

Since SS4 is pre-stable, these are important. They can probably be
removed once SS4 stable (and stable versions of support packages) have
been released.
2016-09-16 16:16:44 +12:00
Sam Minnee
93a0122c0f FIX: Don’t treat URLs as root relative when FRAMEWORK_DIR = “”
Code was assuming that FRAMEWORK_DIR would always have a value. If it
doesn’t (because you’re running a test instance of a naked framework)
This caused URLs to be treated as root relative, which creates some
duplicate-inclusion bugs.

The use of ltrim() works, but is a bit clumsy. A more flexible approach
to including front-end assets of given modules would be preferable;
ideally something that also let you keep your code outside of the
web root.
2016-09-16 16:16:39 +12:00
Ingo Schommer
8f23fa99a5 API Moved CMS-specific JavaScript to admin/thirdparty
The 'admin' module will be split off from 'framework',
where 'framework' only provides (mostly) frontend-agnostic PHP classes.
For example, HTMLEditorField.php has a TinyMCEConfig.php driver,
but doesn't come with its own JS includes.
2016-09-16 13:46:10 +12:00