Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC Add new query trace comment to changelog #404

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions en/02_Developer_Guides/07_Debugging/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ Backtrace::backtrace();
// prints a calls-stack
```

## Debugging database queries

You can opt in to including a comment on all ORM queries indicating where the query was executed by setting the [DBQueryBuilder.trace_query_origin](api:SilverStripe\ORM\Connect\DBQueryBuilder->trace_query_origin) configuration property or the `SS_TRACE_DB_QUERY_ORIGIN` environment variable to `true`.

Note that the environment variable, if set, will take precedence over the configuration property value.

This is useful if you're using a database proxy, or if you're using the [`showqueries` URL variable](url_variable_tools/#database).

## API documentation

- [Backtrace](api:SilverStripe\Dev\Backtrace)
Expand Down
1 change: 1 addition & 0 deletions en/04_Changelogs/5.2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ A [`LogicException`](https://www.php.net/manual/en/class.logicexception.php) is
- You can now upload [Braille ASCII file format](https://en.wikipedia.org/wiki/Braille_ASCII) (`.brf`) files to the CMS without needing to modify the [allowed file types](/developer_guides/files/allowed_file_types/).
- The assets admin section now respects the [`Upload_Validator.default_max_file_size`](api:SilverStripe\Assets\Upload_Validator->default_max_file_size) configuration if [`AssetAdmin.max_upload_size`](api:SilverStripe\AssetAdmin\Controller\AssetAdmin->max_upload_size) has not been explicitly set for your project. Previously, asset admin would ignore `Upload_Validator.default_max_file_size` and just use the PHP `upload_max_filesize` ini configuration by default.
- Redirector pages with a link to a missing or unpublished page/file will now return a 404 response. You can revert to the previous behaviour by setting the [`RedirectorPageController.missing_redirect_is_404`](api:SilverStripe\CMS\Model\RedirectorPageController->missing_redirect_is_404) configuration property to `false`.
- Developers can now opt in to including a comment on all ORM database queries indicating where they were executed from. See [debugging database queries](/developer_guides/debugging/#debugging-database-queries) for details.

## API changes

Expand Down
Loading