Skip to content
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Latest
------

### Changes
* [#84](https://github.com/cleverage/flysystem-process-bundle/issues/84) Reference pages: exceptions of the bundle.

### Fixes
* [#75](https://github.com/cleverage/flysystem-process-bundle/issues/75) `FileFetchTask` (`flysystem_file_fetch`): an unknown storage fails at initialization with an explicit message (`Unknown storage "…" (option "…")`, with the known storages) instead of `Service "…" not found`, When the task is executed after a failed initialization (process-bundle v5 goes on), it fails with an explicit message instead of `Typed property … must not be accessed before initialization`. Update documentation, add tests.

Expand Down
7 changes: 7 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,10 @@ No option can be configured under `cleverage_flysystem_process`: a key there is
- [SFTP stale connection on long-running processes](troubleshooting.md#sftp-long-running-process-fails-with-got-packet-type--connection-closed-prematurely)
(`Got packet type` / `Connection closed prematurely`)
- [CleverAge/ProcessBundle documentation](https://github.com/cleverage/process-bundle/blob/main/docs/index.md)

## Exceptions

The exceptions named without namespace in the reference pages (e.g. `UnexpectedValueException`) are the ones of the
bundle, `CleverAge\FlysystemProcessBundle\Exception\*`: they extend the SPL exceptions of the same name and implement
`CleverAge\ProcessBundle\Exception\ProcessExceptionInterface`, so that all the errors of the process bundles can be
caught at once.
4 changes: 2 additions & 2 deletions docs/reference/tasks/file_fetch_task.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Accepted inputs

* When `file_pattern` is set, the input is ignored.
* Otherwise, `string|array<string>`: path, or list of paths, of the file(s) to copy, relative to the root of the
`source_filesystem` storage. An empty input throws an `\UnexpectedValueException`
`source_filesystem` storage. An empty input throws an `UnexpectedValueException`
(`No pattern neither input provided for the Task`).

If the task is the first task of the process and takes its files from the input, set the process `entry_point` to
Expand All @@ -43,7 +43,7 @@ Options
| `destination_filesystem` | `string` | **X** | | Name of the Flysystem storage to write files to, as configured under `flysystem.storages` |
| `file_pattern` | `string\|null` | | `null` | Regular expression (see [preg_match](https://www.php.net/manual/en/function.preg-match.php)) tested on the path of each file at the root of `source_filesystem`. If `null` (or empty), the file path(s) are taken from the input |
| `remove_source` | `bool` | | `false` | Delete the file from `source_filesystem` after the copy (move instead of copy) |
| `ignore_missing` | `bool` | | `true` | If `false`, throw an `\UnexpectedValueException` when no file matches `file_pattern` (`File(s) not found in source filesystem`) or when a file given as input does not exist (`File <path> not found in source filesystem`). If `true`, missing files are skipped |
| `ignore_missing` | `bool` | | `true` | If `false`, throw an `UnexpectedValueException` when no file matches `file_pattern` (`File(s) not found in source filesystem`) or when a file given as input does not exist (`File <path> not found in source filesystem`). If `true`, missing files are skipped |

Examples
--------
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/tasks/remove_file_task.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Accepted inputs

* When `file_pattern` is set, the input is ignored (but the deletion is run again each time the task is executed).
* Otherwise, `string|array<string>`: path, or list of paths, of the file(s) to delete, relative to the root of the
`filesystem` storage. An empty input throws an `\UnexpectedValueException` (`No pattern neither input provided for
`filesystem` storage. An empty input throws an `UnexpectedValueException` (`No pattern neither input provided for
the Task`). A `StorageAttributes` output of [ListContentTask](list_content_task.md) must be converted to its `path`
first.

Expand Down
Loading