docs: sync Task publish/unpublish docs with apify-docs #2840 - #9
Merged
Conversation
apify-docs PR #2840 formalized the PUT /actor-tasks/{actorTaskId} description: publishing
and unpublishing a task (via isPublic) require write permission to the task's Actor, not
(as this client's docs stated, copied from the reference JS client) "both the task and its
Actor." unpublish()'s docblock had gone further and claimed the opposite - that it needed
only task-level permission - which directly contradicts the spec.
- Corrected TaskClient::publish()/unpublish() docblocks and docs/tasks.md to match the
spec's actual permission wording.
- Added publish()'s concrete preconditions from the spec (Actor public,
publicConfig.inputSchemaFields/datasetView set, Actor has fewer than 50 published tasks).
- Bumped CLIENT_VERSION 0.5.0 -> 0.5.1 (patch: docs/comments only, no interface change).
API_SPEC_VERSION is unchanged (v2-2026-08-05T133145Z already matches the live spec's
info.version and already contains PR #2840's schema/description text).
…est bodies
TaskIntegrationTest::testPublishUnpublish is token-gated and, by design, asserts publish()
fails against the shared test account's task (no publicConfig, foreign Actor) rather than
exercising a successful call. That leaves the one behavior fully under the client's control -
that publish() sends {"isPublic":true} and unpublish() sends {"isPublic":false} to the task
PUT endpoint - without offline coverage, unlike the RequestQueue typed-result refactor's
MockTransport suite.
Adds tests/Unit/TaskPublishUnpublishTest.php, asserting the HTTP method, path, and exact
request body for both methods via MockTransport.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
apify-docs PR #2840 formalized the
PUT /actor-tasks/{actorTaskId}description: publishing/unpublishing a task (viaisPublic) requires write permission to the task's Actor only, not (as this client's docs stated, copied from the reference JS client) "both the task and its Actor."unpublish()'s docblock had gone further and claimed the opposite - that it needed only task-level permission - which directly contradicts the spec.What changed
TaskClient::publish()/unpublish()docblocks anddocs/tasks.mdto match the spec's actual permission wording.publish()'s concrete preconditions from the spec (Actor public,publicConfig.inputSchemaFields/datasetViewset, Actor has fewer than 50 published tasks).CLIENT_VERSION0.5.0 → 0.5.1 (patch - docs/comments only, no interface change).API_SPEC_VERSIONis unchanged (v2-2026-08-05T133145Zalready matches the live spec'sinfo.versionand already contains PR #2840's schema/description text).Compatibility
No breaking changes; docs/comments/version-constant only.
Verified locally:
composer lint(php-cs-fixer, clean), unit tests (98/98), integration tests (59/59, includingTaskIntegrationTest::testPublishUnpublish), and examples tests (44/44) against the live API.