Skip to content

Commit

Permalink
DOC Update SilverStripe to Silverstripe CMS
Browse files Browse the repository at this point in the history
- Remaining Developer Guides and Upgrading
- SilverStripe in a namespace or api has not been change
- To keep PRs easier no formatting was changed

Update merge conflics with two files

Update Silverstripe Ltd, Silverstripe Cloud and Silverstripe CMS

Silverstripe CMS Ltd > Silverstripe Ltd
Silverstripe CMS Platform > Silverstripe Cloud
Silverstripe CMS Framework > Silverstripe CMS

Resolve merge conflict

Remove Framework from Silverstripe CMS Framework

- 3 files

Change SilverStripe CMS to Silverstripe CMS
  • Loading branch information
Michael-HEIW committed Jul 30, 2021
1 parent 0d90932 commit fdbd899
Show file tree
Hide file tree
Showing 113 changed files with 536 additions and 542 deletions.
49 changes: 22 additions & 27 deletions docs/en/00_Getting_Started/00_Server_Requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,20 @@ see `MySQLDatabase::$sql_mode` for more details.) This setting is only available

### Overview

Silverstripe needs to handle a variety of HTTP requests, and relies on the hosting environment to be configured securely
Silverstripe CMS needs to handle a variety of HTTP requests, and relies on the hosting environment to be configured securely
to enforce restrictions. There are secure defaults in place for Apache, but you should be aware of the configuration
regardless of your webserver setup.

### Public webroot

The webroot of your webserver should be configured to the `public/` subfolder. Projects created prior to Silverstripe
The webroot of your webserver should be configured to the `public/` subfolder. Projects created prior to Silverstripe CMS
4.1 might be using the main project folder as the webroot. In this case, you are responsible for ensuring access to
system files such as configuration in `*.yml` is protected from public access. We strongly recommend switching to more
secure hosting via the `public/`. See [4.1.0 upgrading guide](/changelogs/4.1.0).

### Filesystem permissions

During runtime, Silverstripe needs read access for the webserver user to your base path (including your webroot). It
During runtime, Silverstripe CMS needs read access for the webserver user to your base path (including your webroot). It
also needs write access for the webserver user to the following locations:

* `public/assets/`: Used by the CMS and other logic to [store uploads](/developer_guides/files/file_storage)
Expand All @@ -81,20 +81,20 @@ also needs write access for the webserver user to the following locations:
See [Environment Management](/getting_started/environment_management).

If you aren't explicitly [packaging](#building-packaging-deployment)
your Silverstripe project during your deployment process, additional write access may be required to generate supporting
your Silverstripe CMS project during your deployment process, additional write access may be required to generate supporting
files on the fly. This is not recommended, because it can lead to extended execution times as well as cause
inconsistencies between multiple server environments when manifest and cache storage isn't shared between servers.

### Assets

Silverstripe allows CMS authors to upload files into the `public/assets/` folder, which should be served by your
Silverstripe CMS allows CMS authors to upload files into the `public/assets/` folder, which should be served by your
webserver. **No PHP execution should be allowed in this folder**. This is configured for Apache by default
via `public/assets/.htaccess`. The file is generated dynamically during the `dev/build` stage.

Additionally, access is whitelisted by file extension through a dynamically generated whitelist based on
the `File.allowed_extensions` setting
(see [File Security](/developer_guides/files/file_security#file-types)). This whitelist uses the same defaults
configured through file upload through Silverstripe, so is considered a second line of defence.
configured through file upload through Silverstripe CMS, so is considered a second line of defence.

### Secure Assets {#secure-assets}

Expand Down Expand Up @@ -134,9 +134,9 @@ Don't forget to include this additional folder in any syncing and backup process

### Building, Packaging and Deployment {#building-packaging-deployment}

It is common to build a Silverstripe application into a package on one environment (e.g. a CI server), and then deploy
It is common to build a Silverstripe CMS application into a package on one environment (e.g. a CI server), and then deploy
the package to a (separate) webserver environment(s). This approach relies on all auto-generated files required by
Silverstripe to be included in the package, or generated on the fly on each webserver environment.
Silverstripe CMS to be included in the package, or generated on the fly on each webserver environment.

The easiest way to ensure this is to commit auto generated files to source control. If those changes are considered too
noisy, here's some pointers for auto-generated files to trigger and include in a deployment package:
Expand All @@ -154,49 +154,49 @@ noisy, here's some pointers for auto-generated files to trigger and include in a

### Web Worker Concurrency

It's generally a good idea to run multiple workers to serve multiple HTTP requests to Silverstripe concurrently. The
It's generally a good idea to run multiple workers to serve multiple HTTP requests to Silverstripe CMS concurrently. The
exact number depends on your website needs. The CMS attempts to request multiple views concurrently. It also
routes [protected and draft files](/developer_guides/files/file_security)
through Silverstripe. This can increase your concurrency requirements, e.g. when authors batch upload and view dozens of
through Silverstripe CMS. This can increase your concurrency requirements, e.g. when authors batch upload and view dozens of
draft files in the CMS.

When allowing upload of large files through the CMS (through PHP settings), these files might be used
as [protected and draft files](/developer_guides/files/file_security). Files in this state get served by Silverstripe
as [protected and draft files](/developer_guides/files/file_security). Files in this state get served by Silverstripe CMS
rather than your webserver. Since the framework uses [PHP streams](https://www.php.net/manual/en/ref.stream.php), this
allows serving of files larger than your PHP memory limit. Please be aware that streaming operations don't count towards
PHP's [max_execution_time](https://www.php.net/manual/en/function.set-time-limit.php), which can risk exhaustion of web
worker pools for long-running downloads.

### URL Rewriting

Silverstripe expects URL paths to be rewritten to `public/index.php`. For Apache, this is preconfigured
Silverstripe CMS expects URL paths to be rewritten to `public/index.php`. For Apache, this is preconfigured
through `.htaccess` files, and expects using the `mod_rewrite` module. By default, these files are located
in `public/.htaccess` and `public/assets/.htaccess`.

### HTTP Headers

Silverstripe can add HTTP headers to responses it handles directly. These headers are often sensitive, for example
Silverstripe CMS can add HTTP headers to responses it handles directly. These headers are often sensitive, for example
preventing HTTP caching for responses displaying data based on user sessions, or when serving protected assets. You need
to ensure those headers are kept in place in your webserver. For example, Apache allows this
through `Header setifempty` (see [docs](https://httpd.apache.org/docs/current/mod/mod_headers.html#header)).
See [Developer Guide: Performance](/developer_guides/performance/)
and [Developer Guides: File Security](/developer_guides/files/file_security) for more details.

Silverstripe relies on the `Host` header to construct URLs such as "reset password" links, so you'll need to ensure that
Silverstripe CMS relies on the `Host` header to construct URLs such as "reset password" links, so you'll need to ensure that
the systems hosting it only allow valid values for this header.
See [Developer Guide: Security - Request hostname forgery](/developer_guides/security/secure_coding#request-hostname-forgery)
.

### CDNs and other Reverse Proxies

If your Silverstripe site is hosted behind multiple HTTP layers, you're in charge of controlling which forwarded headers
If your Silverstripe CMS site is hosted behind multiple HTTP layers, you're in charge of controlling which forwarded headers
are considered valid, and which IPs can set them.
See [Developer Guide: Security - Request hostname forgery](/developer_guides/security/secure_coding#request-hostname-forgery)
.

### Symlinks

Silverstripe is a modular system, with modules installed and updated via the `composer` PHP dependency manager. These
Silverstripe CMS is a modular system, with modules installed and updated via the `composer` PHP dependency manager. These
are usually stored in `vendor/`, outside of the `public/` webroot. Since many modules rely on serving frontend assets
such as CSS files or images, these are mapped over to the `public/_resources/` folder automatically. If the filesystem
supports it, this is achieved through symlinks. Depending on your hosting and deployment mechanisms, you may need to
Expand All @@ -205,7 +205,7 @@ See [silverstripe/vendor-plugin](https://github.com/silverstripe/vendor-plugin)

### Caches

Silverstripe relies on various [caches](/developer_guides/performance/caching/)
Silverstripe CMS relies on various [caches](/developer_guides/performance/caching/)
to achieve performant responses. By default, those caches are stored in a temporary filesystem folder, and are not
shared between multiple server instances. Alternative cache backends such as Redis can be
[configured](/developer_guides/performance/caching/).
Expand All @@ -232,12 +232,12 @@ through the CMS.
There are various community supported installation instructions for different environments. Nginx is a popular choice,
see [Nginx webserver configuration](https://forum.silverstripe.org/t/nginx-webserver-configuration/2246).

Silverstripe is known to work with Microsoft IIS, and generates `web.config` files by default
Silverstripe CMS is known to work with Microsoft IIS, and generates `web.config` files by default
(
see [Microsoft IIS and SQL Server configuration](https://forum.silverstripe.org/t/microsoft-iis-webserver-and-sql-server-support/2245))
.

Additionally, there are community supported guides for installing Silverstripe on various environments:
Additionally, there are community supported guides for installing Silverstripe CMS on various environments:

* [Hosting via Bitnami](https://bitnami.com/stack/silverstripe/virtual-machine): In the cloud or as a locally hosted
virtual machine
Expand All @@ -248,12 +248,12 @@ Additionally, there are community supported guides for installing Silverstripe o
* [Vagrant with silverstripe-australia/vagrant-environment](https://github.com/silverstripe-australia/vagrant-environment)
* [Vagrant with BetterBrief/vagrant-skeleton](https://github.com/BetterBrief/vagrant-skeleton)

## PHP Requirements for older Silverstripe releases {#php-support}
## PHP Requirements for older Silverstripe CMS releases {#php-support}

Silverstripe's PHP support has changed over time and if you are looking to upgrade PHP on your Silverstripe site, this
Silverstripe CMS's PHP support has changed over time and if you are looking to upgrade PHP on your Silverstripe CMS site, this
table may be of use:

| Silverstripe Version | PHP Version | More information |
| Silverstripe CMS Version | PHP Version | More information |
| -------------------- | ----------- | ---------------- |
| 3.0 - 3.5 | 5.3 - 5.6 | [requirements docs](https://docs.silverstripe.org/en/3.4/getting_started/server_requirements/)
| 3.6 | 5.3 - 7.1 | |
Expand All @@ -265,11 +265,6 @@ table may be of use:

Silverstripe CMS supports the following web browsers:

* Google Chrome

This comment has been minimized.

Copy link
@chillu

chillu Sep 8, 2021

Member

Unintended delete, fixed through #10087

* Internet Explorer 11
* Microsoft Edge
* Mozilla Firefox

We aim to provide satisfactory experiences in Apple Safari. Silverstripe CMS works well across Windows, Linux, and Mac
operating systems.

Expand Down
26 changes: 13 additions & 13 deletions docs/en/00_Getting_Started/02_Composer.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ title: Composer
summary: What is composer and how to use it with Silverstripe CMS
---

# Using Silverstripe with Composer
# Using Silverstripe CMS with Composer

## Requirements

[Composer](http://getcomposer.org/) is a package management tool for PHP that lets you install and upgrade Silverstripe
[Composer](http://getcomposer.org/) is a package management tool for PHP that lets you install and upgrade Silverstripe CMS
and its modules. We also have separate instructions
for [installing modules with Composer](/developer_guides/extending/modules).

Expand Down Expand Up @@ -49,14 +49,14 @@ composer create-project silverstripe/installer ./my-project 4.3.3
```

When `create-project` is used with a release version like above, it will try to get the code from archives instead of
creating git repositories. If you're planning to contribute to Silverstripe,
creating git repositories. If you're planning to contribute to Silverstripe CMS,
see [Using development versions](#using-development-versions).

## Adding modules to your project

Composer isn't only used to download Silverstripe CMS, it is also used to manage all Silverstripe modules. You can find
thousands of modules on [https://addons.silverstripe.org](https://addons.silverstripe.org). Installing a module can be
done with the following command:
Composer isn't only used to download Silverstripe CMS, it is also used to manage all Silverstripe CMS modules.
You can find thousands of modules on [https://addons.silverstripe.org](https://addons.silverstripe.org).
Installing a module can be done with the following command:

```
composer require silverstripe/blog
Expand All @@ -79,7 +79,7 @@ a little different. The version string for the `4` branch is `4.x-dev`.
## Updating dependencies

Except for the control code of the Voyager space probe, every piece of code in the universe gets updated from time to
time. Silverstripe modules are no exception.
time. Silverstripe CMS modules are no exception.

To get the latest updates of the modules in your project, run this command:

Expand Down Expand Up @@ -111,14 +111,14 @@ So your deployment process, as it relates to Composer, should be as follows:

## Composer managed modules, Git and .gitignore

Modules and themes managed by Composer should not be committed with your projects source code. Silverstripe ships with
Modules and themes managed by Composer should not be committed with your projects source code. Silverstripe CMS ships with
a [.gitignore](http://git-scm.com/docs/gitignore) file by default which prevents this. For more details
read [Should I commit the dependencies in my vendor directory?](https://getcomposer.org/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md)
.

## Dev Environments for Contributing Code {#contributing}

So you want to contribute to Silverstripe? Fantastic! You can do this with composer too. You have to tell composer three
So you want to contribute to Silverstripe CMS? Fantastic! You can do this with composer too. You have to tell composer three
things in order to be able to do this:

- Keep the full git repository information
Expand All @@ -138,11 +138,11 @@ on [composer version naming](http://getcomposer.org/doc/02-libraries.md#specifyi

The `--keep-vcs` flag will make sure you have access to the git history of the installer and the requirements

The `--dev` flag is optional, and can be used to add a couple modules which are useful for Silverstripe development:
The `--dev` flag is optional, and can be used to add a couple modules which are useful for Silverstripe CMS development:

* The `behat-extension` module allows running [Behat](http://behat.org) integration tests
* The `docsviewer` module will let you preview changes to the project documentation
* The `buildtools` module which adds [phing](http://phing.info) tasks for creating Silverstripe releases
* The `buildtools` module which adds [phing](http://phing.info) tasks for creating Silverstripe CMS releases

Once the `create-project` command completes, you need to edit the `composer.json` in the project root and remove
the `@stable` markers from the `silverstripe/cms` and `silverstripe/framework` version entries.
Expand Down Expand Up @@ -194,7 +194,7 @@ is to ensure that when developers are getting started, running `composer update`
unstable version

However it is relatively easy to tell composer to use development versions. Not only is this required if you want to
contribute back to the Silverstripe project, it also allows you to get fixes and API changes early.
contribute back to the Silverstripe CMS project, it also allows you to get fixes and API changes early.

This is a two step process. First you get composer to start a project based on the latest unstable
silverstripe/installer
Expand Down Expand Up @@ -324,7 +324,7 @@ on [packagist.org](http://packagist.org).

Follow the packagist.org advice on choosing a [unique name and vendor prefix](https://packagist.org/about). Please don't
use the `silverstripe/<modulename>` vendor prefix, since that's reserved for modules produced by Silverstripe Ltd. In
order to declare that your module is in fact a Silverstripe module, use the "silverstripe" tag in the composer.json
order to declare that your module is in fact a Silverstripe CMS module, use the "silverstripe" tag in the composer.json
file, and set the "type" to "silverstripe-module".

### What about themes?
Expand Down
12 changes: 6 additions & 6 deletions docs/en/02_Developer_Guides/00_Model/01_Data_Model_and_ORM.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ information.
* Each database row maps to a PHP object.
* Each database column maps to a property on a PHP object.

All data tables in Silverstripe are defined as subclasses of [DataObject](api:SilverStripe\ORM\DataObject). The [DataObject](api:SilverStripe\ORM\DataObject) class represents a
All data tables in Silverstripe CMS are defined as subclasses of [DataObject](api:SilverStripe\ORM\DataObject). The [DataObject](api:SilverStripe\ORM\DataObject) class represents a
single row in a database table, following the ["Active Record"](http://en.wikipedia.org/wiki/Active_record_pattern)
design pattern. Database Columns are defined as [Data Types](/developer_guides/model/data_types_and_casting) in the static `$db` variable
along with any [relationships](relations) defined as `$has_one`, `$has_many`, `$many_many` properties on the class.
Expand Down Expand Up @@ -41,7 +41,7 @@ so on. After writing this class, we need to regenerate the database schema.

## Generating the Database Schema

After adding, modifying or removing `DataObject` subclasses, make sure to rebuild your Silverstripe database. The
After adding, modifying or removing `DataObject` subclasses, make sure to rebuild your Silverstripe CMS database. The
database schema is generated automatically by visiting the URL http://www.yoursite.com/dev/build while authenticated as an administrator.

This script will analyze the existing schema, compare it to what's required by your data classes, and alter the schema
Expand All @@ -60,7 +60,7 @@ It **won't** do any of the following
* Delete tables
* Delete fields
* Rename any tables that it doesn't recognize. This allows other applications to coexist in the same database, as long as
their table names don't match a Silverstripe data class.
their table names don't match a Silverstripe CMS data class.


[notice]
Expand Down Expand Up @@ -129,7 +129,7 @@ Using the `create()` method provides chainability, which can add elegance and br
[/notice]


Database columns and properties can be set as class properties on the object. The Silverstripe ORM handles the saving
Database columns and properties can be set as class properties on the object. The Silverstripe CMS ORM handles the saving
of the values through a custom `__set()` method.

```php
Expand Down Expand Up @@ -692,7 +692,7 @@ Note: Alternatively you can set defaults directly in the database-schema (rather
## Subclasses

Inheritance is supported in the data model: separate tables will be linked together, the data spread across these
tables. The mapping and saving logic is handled by Silverstripe, you don't need to worry about writing SQL most of the
tables. The mapping and saving logic is handled by Silverstripe CMS , you don't need to worry about writing SQL most of the
time.

For example, suppose we have the following set of classes:
Expand Down Expand Up @@ -751,7 +751,7 @@ The way the ORM stores the data is this:
* In all the tables, ID is the primary key. A matching ID number is used for all parts of a particular record:
record #2 in Page refers to the same object as record #2 in [SiteTree](api:SilverStripe\CMS\Model\SiteTree).

To retrieve a news article, Silverstripe joins the [SiteTree](api:SilverStripe\CMS\Model\SiteTree), [Page](api:SilverStripe\CMS\Model\SiteTree\Page) and NewsPage tables by their ID fields.
To retrieve a news article, Silverstripe CMS joins the [SiteTree](api:SilverStripe\CMS\Model\SiteTree), [Page](api:SilverStripe\CMS\Model\SiteTree\Page) and NewsPage tables by their ID fields.

## Related Lessons
* [Introduction to the ORM](https://www.silverstripe.org/learn/lessons/v4/introduction-to-the-orm-1)
Expand Down
Loading

0 comments on commit fdbd899

Please sign in to comment.