MigrationIssue
extends AbstractBaseApi
in package
Canvas LMS Migration Issues API
Represents issues that occur during content migrations. Issues can be warnings, errors, or todos that need resolution. This is a nested resource under ContentMigration.
Tags
Table of Contents
Constants
- STATE_ACTIVE = 'active'
- Workflow state constants
- STATE_RESOLVED = 'resolved'
- TYPE_ERROR = 'error'
- TYPE_TODO = 'todo'
- Issue type constants
- TYPE_WARNING = 'warning'
Properties
- $contentMigrationUrl : string|null
- API url to the content migration
- $createdAt : DateTime|null
- When the issue was created
- $description : string|null
- Description of the issue for the end-user
- $errorMessage : string|null
- Site administrator error message (requires permissions)
- $errorReportHtmlUrl : string|null
- Link to a Canvas error report if present (requires permissions)
- $fixIssueHtmlUrl : string|null
- HTML URL to the Canvas page to investigate the issue
- $id : int|null
- The unique identifier for the issue
- $issueType : string|null
- Severity of the issue: todo, warning, error
- $updatedAt : DateTime|null
- When the issue was last updated
- $workflowState : string|null
- Current state of the issue: active, resolved
- $apiClient : HttpClientInterface
- $methodAliases : array<string|int, mixed>
- Define method aliases
Methods
- __callStatic() : mixed
- Magic method to handle function aliases
- __construct() : mixed
- BaseApi constructor.
- all() : array<string|int, MigrationIssue>
- Get all pages of records (interface method)
- allInMigration() : array<string|int, MigrationIssue>
- Get all pages of migration issues
- checkContentMigration() : bool
- Check if content migration is set
- fetchAllInMigration() : array<string|int, MigrationIssue>
- List migration issues in a specific migration
- find() : self
- Get a single migration issue by ID (not supported - use findInMigration instead)
- findInMigration() : self
- Get a single migration issue by ID in a specific migration
- get() : array<string|int, MigrationIssue>
- List migration issues (not supported - use fetchAllInMigration instead)
- getContentMigrationUrl() : string|null
- getCreatedAt() : DateTime|null
- getDescription() : string|null
- getErrorMessage() : string|null
- getErrorReportHtmlUrl() : string|null
- getFixIssueHtmlUrl() : string|null
- getId() : int|null
- getIssueType() : string|null
- getUpdatedAt() : DateTime|null
- getWorkflowState() : string|null
- isActive() : bool
- Check if the issue is active
- isError() : bool
- Check if this is an error
- isResolved() : bool
- Check if the issue is resolved
- isTodo() : bool
- Check if this is a todo
- isWarning() : bool
- Check if this is a warning
- paginate() : PaginationResult
- Get paginated results with metadata
- paginateInMigration() : PaginatedResponse
- Get paginated migration issues
- reactivate() : bool
- Reactivate this issue
- resolve() : bool
- Resolve this issue
- setApiClient() : void
- Set the API client
- setContentMigration() : void
- Set the parent content migration
- setContentMigrationUrl() : void
- setCreatedAt() : void
- setDescription() : void
- setErrorMessage() : void
- setErrorReportHtmlUrl() : void
- setFixIssueHtmlUrl() : void
- setId() : void
- setIssueType() : void
- setUpdatedAt() : void
- setWorkflowState() : void
- update() : self
- Update migration issue
- castValue() : DateTime|mixed
- Cast a value to the correct type
- checkApiClient() : void
- Check if the API client is set, if not, instantiate a new one
- convertPaginatedResponseToModels() : array<string|int, static>
- Helper method to convert paginated response data to model instances
- createConfiguredHttpClient() : HttpClient
- Create an HttpClient with configured middleware
- createPaginationResult() : PaginationResult
- Helper method to create PaginationResult from paginated response
- getEndpoint() : string
- Get the API endpoint for this resource Note: MigrationIssue is a nested resource under ContentMigration and requires context, so this returns a placeholder that should not be used directly
- getPaginatedResponse() : PaginatedResponse
- Helper method to get paginated response from API endpoint
- populate() : void
- Populate the object with new data
- toDtoArray() : array<string|int, mixed>
- Convert the object to an array
Constants
STATE_ACTIVE
Workflow state constants
public
mixed
STATE_ACTIVE
= 'active'
STATE_RESOLVED
public
mixed
STATE_RESOLVED
= 'resolved'
TYPE_ERROR
public
mixed
TYPE_ERROR
= 'error'
TYPE_TODO
Issue type constants
public
mixed
TYPE_TODO
= 'todo'
TYPE_WARNING
public
mixed
TYPE_WARNING
= 'warning'
Properties
$contentMigrationUrl
API url to the content migration
public
string|null
$contentMigrationUrl
= null
$createdAt
When the issue was created
public
DateTime|null
$createdAt
= null
$description
Description of the issue for the end-user
public
string|null
$description
= null
$errorMessage
Site administrator error message (requires permissions)
public
string|null
$errorMessage
= null
$errorReportHtmlUrl
Link to a Canvas error report if present (requires permissions)
public
string|null
$errorReportHtmlUrl
= null
$fixIssueHtmlUrl
HTML URL to the Canvas page to investigate the issue
public
string|null
$fixIssueHtmlUrl
= null
$id
The unique identifier for the issue
public
int|null
$id
= null
$issueType
Severity of the issue: todo, warning, error
public
string|null
$issueType
= null
$updatedAt
When the issue was last updated
public
DateTime|null
$updatedAt
= null
$workflowState
Current state of the issue: active, resolved
public
string|null
$workflowState
= null
$apiClient
protected
static HttpClientInterface
$apiClient
= null
$methodAliases
Define method aliases
protected
static array<string|int, mixed>
$methodAliases
= ['get' => ['fetch', 'list', 'fetchAll'], 'all' => ['fetchAllPages', 'getAll'], 'paginate' => ['getPaginated', 'withPagination', 'fetchPage'], 'find' => ['one', 'getOne']]
Methods
__callStatic()
Magic method to handle function aliases
public
static __callStatic(string $name, array<string|int, mixed> $arguments) : mixed
Parameters
- $name : string
- $arguments : array<string|int, mixed>
Tags
__construct()
BaseApi constructor.
public
__construct(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
all()
Get all pages of records (interface method)
public
static all([array<string, mixed> $params = [] ]) : array<string|int, MigrationIssue>
Parameters
- $params : array<string, mixed> = []
Tags
Return values
array<string|int, MigrationIssue>allInMigration()
Get all pages of migration issues
public
static allInMigration(string $contextType, int $contextId, int $migrationId[, array<string, mixed> $params = [] ]) : array<string|int, MigrationIssue>
Parameters
- $contextType : string
-
Context type (accounts, courses, groups, users)
- $contextId : int
-
Context ID
- $migrationId : int
-
Content migration ID
- $params : array<string, mixed> = []
-
Query parameters
Tags
Return values
array<string|int, MigrationIssue>checkContentMigration()
Check if content migration is set
public
static checkContentMigration() : bool
This method is no longer used and will be removed in a future version
Return values
boolfetchAllInMigration()
List migration issues in a specific migration
public
static fetchAllInMigration(string $contextType, int $contextId, int $migrationId[, array<string, mixed> $params = [] ]) : array<string|int, MigrationIssue>
Parameters
- $contextType : string
-
Context type (accounts, courses, groups, users)
- $contextId : int
-
Context ID
- $migrationId : int
-
Content migration ID
- $params : array<string, mixed> = []
-
Query parameters
Tags
Return values
array<string|int, MigrationIssue>find()
Get a single migration issue by ID (not supported - use findInMigration instead)
public
static find(int $id[, array<string|int, mixed> $params = [] ]) : self
Parameters
- $id : int
-
Migration issue ID
- $params : array<string|int, mixed> = []
-
Optional query parameters
Tags
Return values
selffindInMigration()
Get a single migration issue by ID in a specific migration
public
static findInMigration(string $contextType, int $contextId, int $migrationId, int $id) : self
Parameters
- $contextType : string
-
Context type (accounts, courses, groups, users)
- $contextId : int
-
Context ID
- $migrationId : int
-
Content migration ID
- $id : int
-
Migration issue ID
Tags
Return values
selfget()
List migration issues (not supported - use fetchAllInMigration instead)
public
static get([array<string, mixed> $params = [] ]) : array<string|int, MigrationIssue>
Parameters
- $params : array<string, mixed> = []
-
Query parameters
Tags
Return values
array<string|int, MigrationIssue>getContentMigrationUrl()
public
getContentMigrationUrl() : string|null
Return values
string|nullgetCreatedAt()
public
getCreatedAt() : DateTime|null
Return values
DateTime|nullgetDescription()
public
getDescription() : string|null
Return values
string|nullgetErrorMessage()
public
getErrorMessage() : string|null
Return values
string|nullgetErrorReportHtmlUrl()
public
getErrorReportHtmlUrl() : string|null
Return values
string|nullgetFixIssueHtmlUrl()
public
getFixIssueHtmlUrl() : string|null
Return values
string|nullgetId()
public
getId() : int|null
Return values
int|nullgetIssueType()
public
getIssueType() : string|null
Return values
string|nullgetUpdatedAt()
public
getUpdatedAt() : DateTime|null
Return values
DateTime|nullgetWorkflowState()
public
getWorkflowState() : string|null
Return values
string|nullisActive()
Check if the issue is active
public
isActive() : bool
Return values
boolisError()
Check if this is an error
public
isError() : bool
Return values
boolisResolved()
Check if the issue is resolved
public
isResolved() : bool
Return values
boolisTodo()
Check if this is a todo
public
isTodo() : bool
Return values
boolisWarning()
Check if this is a warning
public
isWarning() : bool
Return values
boolpaginate()
Get paginated results with metadata
public
static paginate([array<string, mixed> $params = [] ]) : PaginationResult
Parameters
- $params : array<string, mixed> = []
-
Query parameters
Return values
PaginationResultpaginateInMigration()
Get paginated migration issues
public
static paginateInMigration(string $contextType, int $contextId, int $migrationId[, array<string, mixed> $params = [] ]) : PaginatedResponse
Parameters
- $contextType : string
-
Context type (accounts, courses, groups, users)
- $contextId : int
-
Context ID
- $migrationId : int
-
Content migration ID
- $params : array<string, mixed> = []
-
Query parameters
Tags
Return values
PaginatedResponsereactivate()
Reactivate this issue
public
reactivate() : bool
Tags
Return values
boolresolve()
Resolve this issue
public
resolve() : bool
Tags
Return values
boolsetApiClient()
Set the API client
public
static setApiClient(HttpClientInterface $apiClient) : void
Parameters
- $apiClient : HttpClientInterface
setContentMigration()
Set the parent content migration
public
static setContentMigration(ContentMigration $_contentMigration) : void
This method is no longer used and will be removed in a future version
Parameters
- $_contentMigration : ContentMigration
setContentMigrationUrl()
public
setContentMigrationUrl(string|null $contentMigrationUrl) : void
Parameters
- $contentMigrationUrl : string|null
setCreatedAt()
public
setCreatedAt(DateTime|null $createdAt) : void
Parameters
- $createdAt : DateTime|null
setDescription()
public
setDescription(string|null $description) : void
Parameters
- $description : string|null
setErrorMessage()
public
setErrorMessage(string|null $errorMessage) : void
Parameters
- $errorMessage : string|null
setErrorReportHtmlUrl()
public
setErrorReportHtmlUrl(string|null $errorReportHtmlUrl) : void
Parameters
- $errorReportHtmlUrl : string|null
setFixIssueHtmlUrl()
public
setFixIssueHtmlUrl(string|null $fixIssueHtmlUrl) : void
Parameters
- $fixIssueHtmlUrl : string|null
setId()
public
setId(int|null $id) : void
Parameters
- $id : int|null
setIssueType()
public
setIssueType(string|null $issueType) : void
Parameters
- $issueType : string|null
setUpdatedAt()
public
setUpdatedAt(DateTime|null $updatedAt) : void
Parameters
- $updatedAt : DateTime|null
setWorkflowState()
public
setWorkflowState(string|null $workflowState) : void
Parameters
- $workflowState : string|null
update()
Update migration issue
public
static update(string $contextType, int $contextId, int $migrationId, int $id, array<string, mixed>|UpdateMigrationIssueDTO $data) : self
Parameters
- $contextType : string
-
Context type (accounts, courses, groups, users)
- $contextId : int
-
Context ID
- $migrationId : int
-
Content migration ID
- $id : int
-
Migration issue ID
- $data : array<string, mixed>|UpdateMigrationIssueDTO
-
Update data
Tags
Return values
selfcastValue()
Cast a value to the correct type
protected
castValue(string $key, mixed $value) : DateTime|mixed
Parameters
- $key : string
- $value : mixed
Tags
Return values
DateTime|mixedcheckApiClient()
Check if the API client is set, if not, instantiate a new one
protected
static checkApiClient() : void
convertPaginatedResponseToModels()
Helper method to convert paginated response data to model instances
protected
static convertPaginatedResponseToModels(PaginatedResponse $paginatedResponse) : array<string|int, static>
Parameters
- $paginatedResponse : PaginatedResponse
Return values
array<string|int, static>createConfiguredHttpClient()
Create an HttpClient with configured middleware
protected
static createConfiguredHttpClient() : HttpClient
Return values
HttpClientcreatePaginationResult()
Helper method to create PaginationResult from paginated response
protected
static createPaginationResult(PaginatedResponse $paginatedResponse) : PaginationResult
Parameters
- $paginatedResponse : PaginatedResponse
Return values
PaginationResultgetEndpoint()
Get the API endpoint for this resource Note: MigrationIssue is a nested resource under ContentMigration and requires context, so this returns a placeholder that should not be used directly
protected
static getEndpoint() : string
Tags
Return values
stringgetPaginatedResponse()
Helper method to get paginated response from API endpoint
protected
static getPaginatedResponse(string $endpoint[, array<string|int, mixed> $params = [] ]) : PaginatedResponse
Parameters
- $endpoint : string
-
The API endpoint path
- $params : array<string|int, mixed> = []
-
Query parameters for the request
Return values
PaginatedResponsepopulate()
Populate the object with new data
protected
populate(array<string|int, mixed> $data) : void
Parameters
- $data : array<string|int, mixed>
Tags
toDtoArray()
Convert the object to an array
protected
toDtoArray() : array<string|int, mixed>