Commit Graph

2891 Commits

Author SHA1 Message Date
Ingo Schommer
8cf38720b5 Fix Chosen.js selector for Behat feature
The recent upgrade to Chosen.js 1.5 changes the generated markup:
It still renders an <a> tag, but without the "href" attribute.
This attribute isn't actually required to uniquely identify
the link in this structure.
2016-04-20 13:52:51 +12:00
Damian Mooyman
0bd62735bc BUG Fix issue with Requirements mangling custom scripts (#5337)
API Remove deprecated $template parameter from Requirements::includeInHTML
2016-04-19 17:20:30 +12:00
Hamish Friedlander
9a5db5f760 Fix ChangeSet test mixing Object ID and ChangeSetItem ID up 2016-04-15 14:42:32 +12:00
Hamish Friedlander
35e642d0bf Add two new accessors to ChangeSetItem
You shouldn't have to worry about exactly formatting the reference to
get a ChangeSetItem related to a DataObject, and doing it that way makes
you vulnerable to breakages like introduced in previous API change
2016-04-15 14:42:24 +12:00
Hamish Friedlander
2d16d69ddb API Use base data class for ChangeSetItem#ObjectClass, not just ClassName
This is a data structure change, but makes ChangeSetItems less likely to break
on /dev/build where a ClassName changes
2016-04-15 14:41:26 +12:00
Daniel Hensby
d7289a17fc Merge pull request #5271 from bummzack/5244-remove-email-subclasses
Fix 5244: Removed Email Subclasses
2016-04-08 17:09:44 +01:00
Roman Schmid
ca4036b882 Removed Email Subclasses used by the Member class (Member_ChangePasswordEmail and Member_ForgotPasswordEmail).
Added a test for the forgot password email.
Improved the test for the change-password email.
Fixed issue where `SapphireTest::mailer` was cleared during `setUp` by moving instantiation of the mailer at the end of the `setUp` method.
No longer use deprecated i18n method in test-setup.
Replace potentially real Email Address with a fake one.
2016-04-06 09:54:17 +02:00
Ingo Schommer
f0906f6e92 Merge pull request #5261 from tractorcow/pulls/4.0/fixup-tinymce
BUG fix missing language on non-global TinyMCE Configs
2016-04-06 19:32:55 +12:00
Damian Mooyman
3c2b53157e API Update Versioned methods 2016-04-04 14:50:16 +12:00
Damian Mooyman
87ee4365e7 API Implement ChangeSets for batch publishing 2016-04-04 14:46:38 +12:00
Damian Mooyman
640691f544 BUG fix missing language on non-global configs
BUG Prevent external plugins from being passed to the minifier
API Change TinyMCEConfig::requireJS to getScriptURL() for testabilitiy
2016-04-04 09:59:31 +12:00
Damian Mooyman
d8d005d1e2 BUG move test file to correct folder and fix class_exists 2016-03-31 17:06:23 +13:00
Damian Mooyman
e8a68c42ce BUG Prevent live manifest loading files from nested test directories
E.g. framework/admin/tests
2016-03-31 15:58:23 +13:00
Damian Mooyman
0fa7271ec2 Merge pull request #5239 from open-sausages/pulls/4.0/form-schema-fixes
Form schema fixes
2016-03-31 09:49:55 +13:00
Ingo Schommer
1049288cb5 Merge pull request #5240 from madmatt/pulls/fix-dbstringtest-annotations
MINOR: Fix PHPUnit @covers assertions for DBStringTest
2016-03-29 16:13:50 +13:00
Hamish Friedlander
700cf9bd56 Merge pull request #5223 from tractorcow/pulls/4.0/transactions
API Add SS_Database::withTransaction for nice enclosed transactions
2016-03-29 10:54:04 +13:00
Ingo Schommer
8ae2894890 Fix form schema ID getter
Also moved keys of higher importance to start of array,
easier to review this way
2016-03-28 21:54:24 +13:00
madmatt
41a3a86862 MINOR: Fix PHPUnit @covers assertions for DBStringTest
This resolves issues when PHPUnit is run strictly, where it exits when
it hits an @covers annotation that references a method that doesn't exist
2016-03-26 17:58:28 +13:00
madmatt
c972692313 MINOR: Fix PHPUnit @covers assertions for GridFieldTest
This resolves issues when PHPUnit is run strictly, where it exits when
it hits an @covers annotation that references a method that doesn't exist
2016-03-26 11:55:01 +13:00
Damian Mooyman
8abede1339 API Add SS_Database::withTransaction for nice enclosed transactions 2016-03-24 09:57:07 +13:00
Damian Mooyman
094745ec0f API Formally support custom ownership relations
API 'owned_by' is no longer mandatory for relations backed by normal db relations
API Extension setOwner/clearOwner is now nested
2016-03-23 14:49:34 +13:00
Sam Minnee
aeccb8b8e0 API: Move DBField subclasses into SilverStripe\Model\FieldType namespace
API: Deprecate SS_Datetime.

The DBField subclasses are have all been renamed to start with “DB” and
be in the SilverStripe\Model\FieldType namespace. To keep DataObject
definitions concise, the original short variations of their names are
preserved as service definitions. Most of the field generation code
doesn’t need to change, but where field classes are referenced directly,
changes will be needed.

SS_Datetime, which is commonly referenced outside the model system
itself, has been preserved as a subclass of DBDatetime. This has been
marked as deprecated and can be removed in SilverStripe 5.

A few places that referred to $db and $casting values weren’t using
the Injector to instantiate the relevant classes. This meant that the
remapping we have created as part of moving classes into a namespace
didn’t work.
2016-03-22 18:09:30 +13:00
Sam Minnee
262f487053 MINOR: Avoid access-changing subclass in test.
Using a subclass to change the visibility of protected items didn’t
seem necessary in this case, if we add a reasonably logical getter
method.
2016-03-22 17:39:09 +13:00
Sam Minnee
083799ec03 FIX: Minimal data-model changes to support PHP7.
The tidiest fix for this will be to update the namespace/naming of all
field types to follow this pattern. I’ve broken out the minimum
necessary to support PHP7 as its own commit, in case anyone needs to
backport that (e.g. if someone wanted to patch a SS 3 system to get
PHP7 support).

Rather than introduce a new API for fieldtype namespace simplification,
I’ve just used Injector. We may come up with a new configuration tool
that is better, but this has the advantage of existing now, and as such
I think is a good first step.
2016-03-22 17:39:08 +13:00
Ingo Schommer
8ae794ee99 API TinyMCE Image shortcodes 2016-03-21 09:23:40 +13:00
Damian Mooyman
0848aca462 API Massive refactor of Versioned
API Implemented recursive versioned actions (publish, etc)
API Un-deprecate delete batch action
API Changed Versioned getters and setters for stages
BUG Inject query parameters during DataObject construction to prevent incorrect lazy loading
2016-03-17 13:43:53 +13:00
Damian Mooyman
3dada00905 Cleanup trailing whitespace 2016-03-09 10:20:31 +13:00
Damian Mooyman
6d88caa9b3 Merge pull request #5132 from open-sausages/features/form-schema
API Form schema
2016-03-07 14:08:36 +13:00
Ingo Schommer
3b11d73c46 Merge remote-tracking branch 'origin/3'
# Conflicts:
#	forms/gridfield/GridFieldDetailForm.php
#	javascript/GridField.js
2016-03-07 09:26:35 +13:00
Ingo Schommer
e1fcc64c41 Form field schema state
See https://github.com/silverstripe/silverstripe-framework/issues/4938
2016-03-03 13:36:48 +13:00
David Craig
404ac4ae43 Initial schemaState implementation 2016-03-03 08:20:54 +13:00
David Craig
afccef718c Initial Form Field Schema implementation
- Adds FormSchema class
- Adds FormSchema dependency to LeftAndMain via Injector
- Adds schema allowed_action method to LeftAndMain for generating Form schemas
- Adds FormFieldSchemaTrait to for schema getters and setters on FormFields
2016-03-03 08:20:54 +13:00
Damian Mooyman
b196d33bfa API Ownership API
API Filter Relation. query parameters from relations when creating objects
API Versioned::publish now triggers invokeWithExtensions
API Update behaviour of versioned for all_versions mode to respect ID filters
API Tweak behaviour of inherited query parameters
2016-02-29 14:38:44 +13:00
Damian Mooyman
e1865151c5 Merge pull request #5098 from bummzack/5086-fix-member-validator
Fix for issue #5086
2016-02-26 14:39:53 +13:00
Ingo Schommer
e88c3c8098 Merge pull request #5094 from tractorcow/pulls/4.0/invokewithextensions
API Extensible::invokeWithExtension has same method signature as Extensible::extend
2016-02-26 13:09:40 +13:00
Roman Schmid
f691a5da32 Improve Member_Validator to:
- properly check for existing members.
- allow extensions.
- remove old code and replace with new syntax and add config API.

Fix issue in Group code where Member_Validator was instantiated via "new" which didn't allow injector overrides.
Added unit-tests.

Establish a link between the member and the validator for said member.
2016-02-25 16:10:52 +01:00
Damian Mooyman
c275c21057 API Extensible::invokeWithExtension has same method signature as Extensible::extend 2016-02-25 17:32:41 +13:00
Damian Mooyman
0ee1564896 BUG Fix deprecated API usage in DataFormatter API and DataObjectTest
PHPDoc Cleanup
API DataFormatter::convertStringToArray is now abstract
2016-02-25 17:10:09 +13:00
Damian Mooyman
3b0a9f4ba2 Merge remote-tracking branch 'origin/3'
# Conflicts:
#	admin/javascript/LeftAndMain.Menu.js
#	control/HTTPRequest.php
#	css/GridField.css
#	css/GridField.css.map
#	docs/en/02_Developer_Guides/03_Forms/Field_types/01_Common_Subclasses.md
#	docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md
#	docs/en/02_Developer_Guides/06_Testing/index.md
#	docs/en/02_Developer_Guides/14_Files/01_File_Management.md
#	docs/en/02_Developer_Guides/14_Files/02_Images.md
#	filesystem/Upload.php
#	javascript/HtmlEditorField.js
#	model/Image.php
#	model/connect/MySQLDatabase.php
#	model/fieldtypes/Enum.php
#	model/versioning/Versioned.php
#	scss/GridField.scss
2016-02-25 14:51:59 +13:00
Daniel Hensby
2fdc96a0de Update PHPUnit from 3.7 to 4.8 2016-02-24 21:42:20 +13:00
Damian Mooyman
9fed5561f4 Merge remote-tracking branch 'origin/3.3' into 3
# Conflicts:
#	core/Constants.php
#	dev/DevelopmentAdmin.php
2016-02-24 17:39:04 +13:00
Damian Mooyman
5f2d3f31d7 Merge remote-tracking branch 'origin/3.2' into 3.3
# Conflicts:
#	dev/DevelopmentAdmin.php
#	docs/en/02_Developer_Guides/08_Performance/02_HTTP_Cache_Headers.md
#	lang/cs.yml
#	lang/lt.yml
2016-02-24 17:29:06 +13:00
Damian Mooyman
ff5ed6efeb Merge remote-tracking branch 'origin/3.2.2' into 3.2 2016-02-24 17:03:43 +13:00
Damian Mooyman
e2c77c5a8f [ss-2016-002] Ensure Gridfield actions respect CSRF 2016-02-24 11:33:53 +13:00
Tyler Kidd
375bbf954e Enhancement and fix for issue #3186 2016-02-23 14:53:52 -06:00
Ingo Schommer
589fee1a8a Removed obsolete TestRunner->$skipTests flag
Taken care of by the default PHPUnit implementation of markTestSkipped()
2016-02-23 22:29:58 +13:00
Ingo Schommer
d1af214ef5 API Removed custom dev/tests/ execution
Rely on standard vendor/bin/phpunit via CLI instead.
See https://github.com/silverstripe/silverstripe-framework/issues/4254

- Not disabling xdebug. That should be harmful, and is actively harming test development
- No longer able to specifically skip tests via the `SkipTests` request parameter. Use phpunit.xml groups and the `--exclude-group` CLI argument instead
- No longer able to specify multiple comma-separated module folders. use phpunit.xml groups and the `--group` CLI argument instead
- Not explicitly calling `SSViewer::flush_template_cache()` (was never the case on running `phpunit` CLI anyway, and shouldn't be required any more)
2016-02-23 20:19:35 +13:00
Damian Mooyman
510c556739 API File has Versioned extension
API Improved support for versioned DataObject
API GridField extensions for versioned dataobjects
API De-couple File and ErrorPage
API File::handle_shortcode now respects canView()
API AssetControlExtension is now able to delete, publish, or protect files
API Upload now protects new assets by default
2016-02-23 13:46:28 +13:00
Damian Mooyman
65a0981c08 BUG Correct behaviour of publish with $createNewVersion = true
Fixes #5040
Cleanup code to make behaviour more apparent
2016-02-23 10:15:49 +13:00
Damian Mooyman
f20ad434ce API Update TinyMCE to 4.x
API Allow HtmlEditorField to be individually configured
BUG Fix incorrect change detection
BUG Fix missing i18n files
2016-02-23 10:10:02 +13:00