mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-06 01:31:22 +02:00
* NEW Make resources dir configurable. * Removing reference to old `resources` and updating doc #8519 * Rrtarget to 4.4 release. * DOC Reference SS_RESOURCES_DIR in Environment doc. * API Add a Resources method to SilverStripe\Core\Manifest\Module to read the resources-dir from composer.json * Clean up reference to SS_RESOURCES_DIR env var * Set default resources-dir * Update test to use RESOURCES_DIR const in expected resource url method * Correcting typos Co-Authored-By: maxime-rainville <maxime@rainville.me> * MINOR Correctubg minor typos * DOCS Document the intricacies of exposing static assets.
1.9 KiB
1.9 KiB
4.4.0
Overview
- Correct PHP types are now returned from database queries
- The name of the directory where vendor module resources are exposed can now be configured by defining a
extra.resources-dir
key in yourcomposer.json
file. If the key is not set, it will automatically default toresources
. New projects will be preset to_resources
. This will avoid potential conflict with SiteTree URL Segments. - dev/build is now non-destructive for all Enums, not just ClassNames. This means your data won't be lost if you're switching between versions, but watch out for code that breaks when it sees an unrecognised value!
Upgrading
Adopting to new _resources
directory
- Update your
.gitignore
file to ignore the new_resources
directory. This file is typically located in the root of your project or in thepublic
folder. - Add a new
extra.resources-dir
key to your composer file.
{
// ...
"extra": {
// ...
"resources-dir": "_resources"
}
}
- Expose your vendor assets by running
composer vendor-expose
. - Remove the old
resources
folder. This folder will be located in thepublic
folder if you have adopted the public web root, or in the root of your project if you haven't.
You may also need to update your server configuration if you have applied special conditions to the resources
path.
Changes to internal APIs
PDOQuery::__construct()
now has a 2nd argument. If you have subclassed PDOQuery and overridden __construct() you may see an E_STRICT error- The name of the directory where vendor module resources are exposed can now be configured by adding a
extra.resources-dir
key to your composer file. The new default insilverstripe/installer
has been changed to_resources
rather thanresources
. This allows you to useresources
as a URL segment or a route.