Skip to content

Commit

Permalink
test: Fix test against Limesurvey master branch (#1021)
Browse files Browse the repository at this point in the history
* test: Fix test against Limesurvey `master` branch

* Cache docker

* Revert "Cache docker"

This reverts commit 833fb94.

* Try a different commit

* Fix RC route

* Remove redundant case

* Add TODO

See LimeSurvey/LimeSurvey#3599
  • Loading branch information
edgarrmondragon committed Nov 4, 2023
1 parent 05cf225 commit 604bc45
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
7 changes: 5 additions & 2 deletions docs/contributing/unreleased-features.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Unreleased Features

Citric supports LimeSurvey features that are not yet released and are sitting in the [`master`](https://github.com/LimeSurvey/LimeSurvey/tree/master) or [`develop`] branches of the LimeSurvey repository. These features must be decorated with [citric._compat.future]`@future` in order to be warn users that they are using a feature that is not yet released.
Citric supports LimeSurvey features that are not yet released and are sitting in the [`master`](https://github.com/LimeSurvey/LimeSurvey/tree/master) or [`develop`](https://github.com/LimeSurvey/LimeSurvey/tree/develop) branches of the LimeSurvey repository. These features must be decorated with {func}`@future <citric._compat.future>` or {func}`@future_parameter <citric._compat.future_parameter>` in order to be warn users that they are using a feature that is not yet released.

The `.. future` directive will add a warning to the documentation.
There are also Sphinx directives that can be used to document these features:

* The `.. future` directive will add a warning to the documentation that the method is not yet supported in any released version of LimeSurvey.
* The `.. futureparam` directive will add a warning to the documentation that the parameter is not yet supported in any released version of LimeSurvey.
2 changes: 1 addition & 1 deletion src/citric/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import warnings
from functools import wraps

__all__ = ["FutureVersionWarning", "future"]
__all__ = ["FutureVersionWarning", "future", "future_parameter"]


def _warning_message(next_version: str) -> tuple[str, ...]:
Expand Down
8 changes: 8 additions & 0 deletions tests/resources/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
),
'request' => array(
'baseUrl' => '',
// TODO: Remove 'noCsrfValidationRoutes' this once it's fixed upstream
// https://github.com/LimeSurvey/LimeSurvey/pull/3599
'enableCsrfValidation' => true,
'noCsrfValidationRoutes' => array(
'rest',
'admin/remotecontrol',
'plugins/unsecure',
),
),
),
'config' => array(
Expand Down

0 comments on commit 604bc45

Please sign in to comment.