From f4ec6b44cbcfc37b98b9a69f38027d99eaa32532 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Fri, 6 Oct 2023 15:57:29 +1300 Subject: [PATCH 1/3] DOC Make error log file path absolute --- en/03_Upgrading/07_Deprecations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/03_Upgrading/07_Deprecations.md b/en/03_Upgrading/07_Deprecations.md index fe9ef2e0b..51b3e5897 100644 --- a/en/03_Upgrading/07_Deprecations.md +++ b/en/03_Upgrading/07_Deprecations.md @@ -55,7 +55,7 @@ SilverStripe\Core\Injector\Injector: ErrorLogFileHandler: class: Monolog\Handler\StreamHandler constructor: - - "var/www/silverstripe.log" + - "/var/www/silverstripe.log" - "warning" # warning is the level deprecation warnings are logged as Psr\Log\LoggerInterface.errorhandler: calls: From 09c1df4e1ab176e1f9b05a65086c090dfe8ae33e Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Fri, 6 Oct 2023 15:59:34 +1300 Subject: [PATCH 2/3] DOC Fix API links on fluent upgrade page --- en/03_Upgrading/07_Upgrading_Fluent.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/en/03_Upgrading/07_Upgrading_Fluent.md b/en/03_Upgrading/07_Upgrading_Fluent.md index b18bf1df1..3435813b9 100644 --- a/en/03_Upgrading/07_Upgrading_Fluent.md +++ b/en/03_Upgrading/07_Upgrading_Fluent.md @@ -132,14 +132,14 @@ The following actions in the history tab in the CMS are affected: ### Standard Versioned methods -Fluent 6 alters how many of the [`Versioned`](api:SilverStripe/Versioned/Versioned) methods work as the data source is changed to use the localised tables. This has a large impact on the CMS UI and behaviour (as mentioned in the previous section). +Fluent 6 alters how many of the [`Versioned`](api:SilverStripe\Versioned\Versioned) methods work as the data source is changed to use the localised tables. This has a large impact on the CMS UI and behaviour (as mentioned in the previous section). Examples of impacted methods: -- [`isOnDraft()`](api:SilverStripe/Versioned/Versioned::isOnDraft()) -- [`isPublished()`](api:SilverStripe/Versioned/Versioned::isPublished()) -- [`isArchived()`](api:SilverStripe/Versioned/Versioned::isArchived()) -- [`stagesDiffer()`](api:SilverStripe/Versioned/Versioned::stagesDiffer()) +- [`isOnDraft()`](api:SilverStripe\Versioned\Versioned::isOnDraft()) +- [`isPublished()`](api:SilverStripe\Versioned\Versioned::isPublished()) +- [`isArchived()`](api:SilverStripe\Versioned\Versioned::isArchived()) +- [`stagesDiffer()`](api:SilverStripe\Versioned\Versioned::stagesDiffer()) Simply put, any code you have checking the versioned state of a record used to return results for the base (unlocalised) record. To get the result for the localised record, specialised methods had to be called. @@ -243,9 +243,9 @@ These changes aren't likely to break anything in your project, but we recommend Some unit tests may break. There's no one solution for problems you may encounter, but some general recommendations that might help are: - avoid localised tables in yaml fixtures - - localise models in your PHP code instead, either in the `setUp()` method or via ORM calls (for example explicitly calling [`$obj->write()`](api:SilverStripe/ORM/DataObject::write()) after fetching the fixture object) + - localise models in your PHP code instead, either in the `setUp()` method or via ORM calls (for example explicitly calling [`$obj->write()`](api:SilverStripe\ORM\DataObject::write()) after fetching the fixture object) - avoid including version history in your yaml fixtures - - use ORM methods like [`$obj->publishRecursive()`](api:SilverStripe/Versioned/RecursivePublishable:publishRecursive()) after fetching the fixture objects instead + - use ORM methods like [`$obj->publishRecursive()`](api:SilverStripe\Versioned\RecursivePublishable:publishRecursive()) after fetching the fixture objects instead ## Further reading From 4407a5b2422391305903b2e747ba45db71a952b3 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Fri, 6 Oct 2023 16:03:13 +1300 Subject: [PATCH 3/3] DOC Fix broken syntax --- .../01_adding_dataobjects_to_the_schema.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/en/02_Developer_Guides/19_GraphQL/02_working_with_dataobjects/01_adding_dataobjects_to_the_schema.md b/en/02_Developer_Guides/19_GraphQL/02_working_with_dataobjects/01_adding_dataobjects_to_the_schema.md index 1f8aa03d6..ecf605f6d 100644 --- a/en/02_Developer_Guides/19_GraphQL/02_working_with_dataobjects/01_adding_dataobjects_to_the_schema.md +++ b/en/02_Developer_Guides/19_GraphQL/02_working_with_dataobjects/01_adding_dataobjects_to_the_schema.md @@ -204,15 +204,16 @@ A couple things to note here: * By assigning a value of `true` to the field, we defer to the model to infer the type for the field. To override that, we can always add a `type` property: -```yaml -MyProject\Models\Product: - fields: - onSale: - type: Boolean -``` + ```yaml + MyProject\Models\Product: + fields: + onSale: + type: Boolean + ``` * The mapping of our field names to the `DataObject` property is case-insensitive. It is a convention in GraphQL APIs to use lowerCamelCase fields, so this is given by default. + [/notice] ### Bulk loading models @@ -239,9 +240,9 @@ elemental: # An arbitrary key to define what these directives are doing load: inheritanceLoader: include: - - DNADesign\Elemental\Models\BaseElement + - DNADesign\Elemental\Models\BaseElement exclude: - - MyApp\Elements\MySecretElement + - MyApp\Elements\MySecretElement # Add all fields and read operations apply: fields: