Merge remote-tracking branch 'origin/3.0' into 3.1

Conflicts:
	.travis.yml
	admin/javascript/LeftAndMain.AddForm.js
	docs/en/reference/requirements.md
This commit is contained in:
Ingo Schommer 2013-04-02 02:00:50 +02:00
commit c08ab18c03
12 changed files with 67 additions and 50 deletions

View File

@ -10,25 +10,28 @@ Requires a [`silverstripe-installer`](http://github.com/silverstripe/silverstrip
See [installation on different platforms](http://doc.silverstripe.org/framework/en/installation/), See [installation on different platforms](http://doc.silverstripe.org/framework/en/installation/),
and [installation from source](http://doc.silverstripe.org/framework/en/installation/from-source). and [installation from source](http://doc.silverstripe.org/framework/en/installation/from-source).
## Development and contribution ## ## Bugtracker ##
If you would like to make changes to SilverStripe core product, we have an extensive [guide to contributing code](http://doc.silverstripe.org/framework/en/misc/contributing/code) that we invite you to look at before submitting a pull request. Bugs are tracked on [github.com](https://github.com/silverstripe/framework/issues).
Please read our [issue reporting guidelines](http://doc.silverstripe.org/framework/en/misc/contributing/issues).
If you would like to get involved, but don't know what to fix, the [Trac tickets](http://open.silverstripe.org/report/125) are a good place to start. ## Development and Contribution ##
For other ways to contribute, see the [code contribution guidelines](http://doc.silverstripe.org/framework/en/misc/contributing) If you would like to make changes to the SilverStripe core codebase, we have an extensive [guide to contributing code](http://doc.silverstripe.org/framework/en/misc/contributing/code).
## Links ## ## Links ##
* [Requirements](http://doc.silverstripe.org/framework/en/installation/server-requirements) * [Server Requirements](http://doc.silverstripe.org/framework/en/installation/server-requirements)
* [Changelogs](http://doc.silverstripe.org/framework/en/changelogs/) * [Changelogs](http://doc.silverstripe.org/framework/en/changelogs/)
* [Bugtracker](http://open.silverstripe.org) * [Bugtracker: Framework](https://github.com/silverstripe/sapphire/issues)
* [Bugtracker: CMS](https://github.com/silverstripe/silverstripe-cms/issues)
* [Bugtracker: Installer](https://github.com/silverstripe/silverstripe-installer/issues)
* [Forums](http://silverstripe.org/forums) * [Forums](http://silverstripe.org/forums)
* [Developer Mailinglist](https://groups.google.com/forum/#!forum/silverstripe-dev) * [Developer Mailinglist](https://groups.google.com/forum/#!forum/silverstripe-dev)
## License ## ## License ##
Copyright (c) 2007-2012, SilverStripe Limited - www.silverstripe.com Copyright (c) 2007-2013, SilverStripe Limited - www.silverstripe.com
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

View File

@ -19,7 +19,3 @@ the language and functions which are used in the guides.
* [How to create a navigation menu](navigation-menu). Create primary navigation for your website. * [How to create a navigation menu](navigation-menu). Create primary navigation for your website.
* [Paginating A List](pagination). Add pagination for an SS_List object. * [Paginating A List](pagination). Add pagination for an SS_List object.
* [How to make a simple contact form](simple-contact-form). * [How to make a simple contact form](simple-contact-form).
## Feedback
If you have a topic you would like covered in these how to's please ask for it on our [Bug Tracker](http://open.silverstripe.org)

View File

@ -217,7 +217,7 @@ Composer will scan all of the repositories you list, collect meta-data about the
Now add an "upstream" remote to the original repository location so you can rebase or merge your fork as required. Now add an "upstream" remote to the original repository location so you can rebase or merge your fork as required.
cd advancedworkflow cd cms
git remote add -f upstream git://github.com/silverstripe/silverstripe-cms.git git remote add -f upstream git://github.com/silverstripe/silverstripe-cms.git
For more information, read the ["Repositories" chapter of the Composer documentation](http://getcomposer.org/doc/05-repositories.md). For more information, read the ["Repositories" chapter of the Composer documentation](http://getcomposer.org/doc/05-repositories.md).

View File

@ -71,7 +71,7 @@ If you aren't familiar with git and GitHub, try reading the ["GitHub bootcamp do
We also found the [free online git book](http://progit.org/book/) and the [git crash course](http://gitref.org/) useful. We also found the [free online git book](http://progit.org/book/) and the [git crash course](http://gitref.org/) useful.
If you're familiar with it, here's the short version of what you need to know. Once you fork and download the code: If you're familiar with it, here's the short version of what you need to know. Once you fork and download the code:
* **Don't develop on the master branch.** Always create a development branch specific to "the issue" you're working on (mostly on [open.silverstripe.org](http://open.silverstripe.org)). Name it by issue number and description. For example, if you're working on Issue #100, a `DataObject::get_one()` bugfix, your development branch should be called 100-dataobject-get-one. If you decide to work on another issue mid-stream, create a new branch for that issue--don't work on both in one branch. * **Don't develop on the master branch.** Always create a development branch specific to "the issue" you're working on (mostly on our [bugtracker](/misc/contributing/issues)). Name it by issue number and description. For example, if you're working on Issue #100, a `DataObject::get_one()` bugfix, your development branch should be called 100-dataobject-get-one. If you decide to work on another issue mid-stream, create a new branch for that issue--don't work on both in one branch.
* **Do not merge the upstream master** with your development branch; *rebase* your branch on top of the upstream master. * **Do not merge the upstream master** with your development branch; *rebase* your branch on top of the upstream master.

View File

@ -12,15 +12,14 @@ and a GitHub user account.
## Editing online ## Editing online
The easiest way of making a change to the documentation is to find the appropriate .md The easiest way of making a change to the documentation is by clicking the "Edit this page" link at
file in the [github.com/silverstripe/sapphire](https://github.com/silverstripe/sapphire/tree/3.0/docs/) repository the bottom of the page you want to edit. Alternativly, you can find the appropriate .md file in
the [github.com/silverstripe/sapphire](https://github.com/silverstripe/sapphire/tree/3.0/docs/) repository
and press the "edit" button. You will need a GitHub account to do this. You should make the changes in the lowest branch they apply to. and press the "edit" button. You will need a GitHub account to do this. You should make the changes in the lowest branch they apply to.
* After you have made your change, describe it in the "commit summary" and "extended description" fields below, and press "Commit Changes". * After you have made your change, describe it in the "commit summary" and "extended description" fields below, and press "Commit Changes".
* After that you will see form to submit a Pull Request. You should just be able to submit the form, and your changes will be sent to the core team for approval. * After that you will see form to submit a Pull Request. You should just be able to submit the form, and your changes will be sent to the core team for approval.
Each documentation page has have an "edit" link, to make it easier for you to find this feature.
## Editing on your computer ## Editing on your computer
If you prefer to edit the content on your local machine, you can "[fork](http://help.github.com/forking/)" If you prefer to edit the content on your local machine, you can "[fork](http://help.github.com/forking/)"

View File

@ -6,12 +6,16 @@
If you have discovered a bug in SilverStripe, we'd be glad to hear about it - If you have discovered a bug in SilverStripe, we'd be glad to hear about it -
well written bug reports can be half of the solution already! well written bug reports can be half of the solution already!
Our bugtracker is located on [open.silverstripe.org](http://open.silverstripe.org/).
* [Framework Bugtracker](https://github.com/silverstripe/sapphire/issues)
* [CMS Bugtracker](https://github.com/silverstripe/silverstripe-cms/issues)
* [Documentation Bugtracker](https://github.com/silverstripe/sapphire/issues)
* Search on [http://silverstripe.org/modules](http://silverstripe.org/modules) for module-specific bugtrackers
Before submitting a bug: Before submitting a bug:
* Ask for assistance on the [forums](http://silverstripe.org/forums), [core mailinglist](http://groups.google.com/group/silverstripe-dev) or on [IRC](http://silverstripe.org/irc) if you're unsure if its really a bug. * Ask for assistance on the [forums](http://silverstripe.org/forums), [core mailinglist](http://groups.google.com/group/silverstripe-dev) or on [IRC](http://silverstripe.org/irc) if you're unsure if its really a bug.
* [Search for existing tickets](http://open.silverstripe.org/query?keywords=~&description=~&summary=~&col=id&col=summary&col=owner&col=type&col=status&col=priority&col=milestone&col=changetime&desc=1&order=changetime) before reporting a new one * Search for similar, existing tickets
* Is this a security issue? Please follow our separate reporting guidelines below. * Is this a security issue? Please follow our separate reporting guidelines below.
* Is this a issue with the core framework or cms? Modules have their own issue trackers (see [silverstripe.org/modules](http://www.silverstripe.org/modules)) * Is this a issue with the core framework or cms? Modules have their own issue trackers (see [silverstripe.org/modules](http://www.silverstripe.org/modules))
* Try to reproduce your issue on a [clean installation](http://doc.silverstripe.org/framework/en/installation/composer#using-development-versions), maybe the bug has already been fixed on an unreleased branch? * Try to reproduce your issue on a [clean installation](http://doc.silverstripe.org/framework/en/installation/composer#using-development-versions), maybe the bug has already been fixed on an unreleased branch?
@ -21,12 +25,28 @@ Before submitting a bug:
If the issue does look like a new bug: If the issue does look like a new bug:
* [Create a new ticket](http://open.silverstripe.org/newticket) * [Create a new ticket](https://github.com/silverstripe/sapphire/issues/new)
* Describe the steps required to reproduce your issue, and the expected outcome. Unit tests and screencasts can help here. * Describe the steps required to reproduce your issue, and the expected outcome. Unit tests, screenshots and screencasts can help here.
* Describe your environment as detailed as possible: SilverStripe version, Browser, PHP version, Operating System, any installed SilverStripe modules. * Describe your environment as detailed as possible: SilverStripe version, Browser, PHP version, Operating System, any installed SilverStripe modules.
* Add keywords to help us organize issues, and please be realistic about the issue priority. Don't set milestones.
* *(optional)* [Submit a pull request](/misc/contributing/code) which fixes the issue. * *(optional)* [Submit a pull request](/misc/contributing/code) which fixes the issue.
Lastly, don't get your hopes up too high. Unless your issue is a blocker affecting a large
number of users, don't expect SilverStripe developers to jump onto it right way.
Your issue is a starting point where others with the same problem can collaborate
with you to develop a fix.
## Feature Requests
<div class="warning" markdown='1'>
Please don't file "feature requests" as issues. If there's a new feature you'd like to see
in SilverStripe, you either need to write it yourself (and [submit a pull request](/misc/contributing/code))
or convince somebody else to write it for you. Any "wishlist" type issues without code attached
can be expected to be closed as soon as they're reviewed.
</div>
In order to gain interest and feedback in your feature, we encourage you to present
it to the community through the [forums](http://silverstripe.org/forums), [core mailinglist](http://groups.google.com/group/silverstripe-dev) or on [IRC](http://silverstripe.org/irc).
## Reporting Security Issues ## Reporting Security Issues
Report security issues to [security@silverstripe.com](mailto:security@silverstripe.com). See our "[Release Process](release-process)" documentation for more info, and read our guide on [how to write secure code](/topics/security). Report security issues to [security@silverstripe.com](mailto:security@silverstripe.com). See our "[Release Process](release-process)" documentation for more info, and read our guide on [how to write secure code](/topics/security).

View File

@ -7,9 +7,4 @@ sections.
* [Contributing](contributing): How you can be a part of the SilverStripe Open Source community * [Contributing](contributing): How you can be a part of the SilverStripe Open Source community
* [Module release process](module-release-process): Creating and looking after a module * [Module release process](module-release-process): Creating and looking after a module
* [Release process](release-process): Describes the Framework and CMS release process * [Release process](release-process): Describes the Framework and CMS release process
* [SS markdown](ss-markdown): Markdown syntax for our technical documentation * [SS markdown](ss-markdown): Markdown syntax for our technical documentation
## Feedback
If you have a topic you would like covered in the misc section please ask for it on our [Bug Tracker](http://open.silverstripe.org)

View File

@ -52,7 +52,7 @@ your modules page on silverstripe.org
Both Google Code and github.com provide their own bugtracker - we encourage you to use any built-in tools that come with Both Google Code and github.com provide their own bugtracker - we encourage you to use any built-in tools that come with
your version control hoster. Most Silverstripe-maintained modules have their bugtracker on your version control hoster. Most Silverstripe-maintained modules have their bugtracker on
[open.silverstripe.org](http://open.silverstripe.org). [github.com](http://www.github.com) (see [issue reporting guidelines](/misc/contributing/issues)).
Providing bugtracking is a major form of communicating with your users in an efficient way, and will provide a good overview Providing bugtracking is a major form of communicating with your users in an efficient way, and will provide a good overview
of outstanding work and the stability of your code to an interested user. of outstanding work and the stability of your code to an interested user.
@ -111,7 +111,7 @@ that you can link from the `README.md` file. Example:
tutorial.md tutorial.md
howto-search-mymodule.md howto-search-mymodule.md
The ["docsviewer" module](http://open.silverstripe.org/browser/modules/docsviewer/trunk) can be used The ["docsviewer" module](https://github.com/silverstripe/silverstripe-docsviewer) can be used
to list and render content inside a `docs/` folder (although it is not required, Markdown is designed to list and render content inside a `docs/` folder (although it is not required, Markdown is designed
to be readable in plain text as well). to be readable in plain text as well).
@ -120,7 +120,6 @@ to be readable in plain text as well).
In return for all your hard work in putting a high-quality module on the site, the SilverStripe project has the following In return for all your hard work in putting a high-quality module on the site, the SilverStripe project has the following
options to support you: options to support you:
* Use of [trac](http://open.silverstripe.org) to keep your bugs and feature requests organised
* Advertising of your module on the http://silverstripe.org/modules/ modules page once it has reached a beta stage and shown * Advertising of your module on the http://silverstripe.org/modules/ modules page once it has reached a beta stage and shown
to meet our requirements above. to meet our requirements above.
* We might showcase your module on our blog and/or newsletter, when it's first released and/or when a major version with * We might showcase your module on our blog and/or newsletter, when it's first released and/or when a major version with

View File

@ -9,13 +9,13 @@ The current maintainer responsible for planning and performing releases is Ingo
## Release Planning ## Release Planning
Our most up-to-date release plans are typically in the [roadmap](http://open.silverstripe.com/roadmap). Our most up-to-date release plans are typically in the ["framework" milestone](https://github.com/silverstripe/sapphire/issues/milestones) and ["cms" milestone](https://github.com/silverstripe/silverstripe-cms/issues/milestones).
New features and API changes are typically discussed on the [core New features and API changes are typically discussed on the [core
mailinglist](http://groups.google.com/group/silverstripe-dev). They are prioritized by the core team as tickets on mailinglist](http://groups.google.com/group/silverstripe-dev). They are prioritized by the core team as tickets on
[open.silverstripe.org](http://open.silverstripe.com/). github.com.
Release dates are usually not published prior to the release, but you can get a good idea of the release status by Release dates are usually not published prior to the release, but you can get a good idea of the release status by
reviewing the [release milestone](http://open.silverstripe.com/roadmap) on open.silverstripe.org. Releases will be reviewing the release milestone on github.com. Releases will be
announced on the [release announcements mailing list](http://groups.google.com/group/silverstripe-announce). announced on the [release announcements mailing list](http://groups.google.com/group/silverstripe-announce).
Releases of the *cms* and *framework* modules are coupled at the moment, they follow the same numbering scheme. Module Releases of the *cms* and *framework* modules are coupled at the moment, they follow the same numbering scheme. Module
@ -85,7 +85,7 @@ micro release.
## Deprecation ## Deprecation
Needs of developers (both on core framework and custom projects) might outgrow the capabilities Needs of developers (both on core framework and custom projects) can outgrow the capabilities
of a certain API. Existing APIs might turn out to be hard to understand, maintain, test or stabilize. of a certain API. Existing APIs might turn out to be hard to understand, maintain, test or stabilize.
In these cases, it is best practice to "refactor" these APIs into something more useful. In these cases, it is best practice to "refactor" these APIs into something more useful.
SilverStripe acknowledges that developers have built a lot of code on top of existing APIs, SilverStripe acknowledges that developers have built a lot of code on top of existing APIs,
@ -94,33 +94,38 @@ so we strive for giving ample warning on any upcoming changes through a "depreca
How to deprecate an API: How to deprecate an API:
* Add a `@deprecated` item to the docblock tag, with a `{@link <class>}` item pointing to the new API to use. * Add a `@deprecated` item to the docblock tag, with a `{@link <class>}` item pointing to the new API to use.
* Update the deprecated code to throw an `E_USER_NOTICE` error, with a message starting with the string 'DEPRECATED:'. * Update the deprecated code to throw a `[api:Deprecation::notice()]` error.
In time, we may use that string to identify deprecation errors, so please ensure that you add this string to the notice level error. * Both the docblock and error message should contain the **target version** where the functionality is removed.
So if you're committing the change to a 3.1 pre-release version, the target version will either be 3.2 or 4.0,
depending on how disruptive the change is.
* Deprecations should just be committed to pre-release branches, ideally before they enter the "beta" phase.
If deprecations are introduced after this point, their target version needs to be increased by one.
* Make sure that the old deprecated function works by calling the new function - don't have duplicated code! * Make sure that the old deprecated function works by calling the new function - don't have duplicated code!
* Mark in which release the function was deprecated (find out next release in the [roadmap](http://open.silverstripe.com/roadmap)), so we can determine when to finally remove it. * The commit message should contain an `API` prefix (see ["commit message format"](/misc/contributing/code#commit-messages))
* Deprecated APIs can be removed after developers had a chance to react to the changes. As a rule of thumb, leave the code with the deprecation warning in for at least three micro releases. Only remove code in a minor or major release.
Here's an example for replacing `Director::isDev()` with a (theoretical) `Env::is_dev()`: Here's an example for replacing `Director::isDev()` with a (theoretical) `Env::is_dev()`:
:::php :::php
/** /**
* Returns true if your are in development mode * Returns true if your are in development mode
* @deprecated (since 2.2.2) Use {@link Env::is_dev()} instead. * @deprecated 3.1 Use {@link Env::is_dev()} instead.
*/ */
public function isDev() { public function isDev() {
user_error("DEPRECATED: Use Env::is_dev() instead.", E_USER_NOTICE); Deprecation::notice('3.1', 'Use Env::is_dev() instead');
return Env::is_dev(); return Env::is_dev();
} }
* Deprecated APIs can be removed after developers had a chance to react to the changes. As a rule of thumb, leave the code with the deprecation warning in for at least three micro releases. Only remove code in a minor or major release. For example:
* Deprecated as of in 2.2.2 This change could be committed to a 3.1.0-alpha2 release, stays deprecated in all following minor releases
* Still deprecated in 2.2.3 (3.1.0-beta1, 3.1.0, 3.1.1), and gets removed from 3.2.0. If the change was introduced in an already
* Still deprecated in 2.2.4 released version (e.g. 3.1.1), the target version becomes 3.2 instead.
* Removed from 2.3.0
## Security Releases ## Security Releases
### Reporting an issue ### Reporting an issue
Report security issues to [security@silverstripe.com](mailto:security@silverstripe.com). Please don't file security Report security issues to [security@silverstripe.com](mailto:security@silverstripe.com).
issues in our [bugtracker](http://open.silverstripe.org). Please don't file security issues in our [bugtracker](/misc/contributing/issues).
### Acknowledgement and disclosure ### Acknowledgement and disclosure

View File

@ -185,4 +185,4 @@ slightly different JS/CSS requirements, the whole lot will be refetched.
nature of an ajax-request. Needs some more research nature of an ajax-request. Needs some more research
## API Documentation ## API Documentation
`[api:Requirements]` `[api:Requirements]`

View File

@ -647,5 +647,4 @@ afraid to experiment with using other approaches.
* [css](css) * [css](css)
* [Unobtrusive Javascript](http://www.onlinetools.org/articles/unobtrusivejavascript/chapter1.html) * [Unobtrusive Javascript](http://www.onlinetools.org/articles/unobtrusivejavascript/chapter1.html)
* [Quirksmode: In-depth Javascript Resources](http://www.quirksmode.org/resources.html) * [Quirksmode: In-depth Javascript Resources](http://www.quirksmode.org/resources.html)
* [behaviour.js documentation](http://open.silverstripe.org/browser/modules/sapphire/branches/2.4/thirdparty/behaviour/README.md)

View File

@ -124,6 +124,7 @@
else this.loadTree(null, updateFn); else this.loadTree(null, updateFn);
}, },
setValue: function(val) { setValue: function(val) {
this.data('metadata', $.extend(this.data('metadata'), {id: val}));
this.find(':input:hidden').val(val).trigger('change'); this.find(':input:hidden').val(val).trigger('change');
}, },
getValue: function() { getValue: function() {