stable

Clone or download

Read-only

chore: Implement request #37547 Make Fault, Ok, Err and Option readonly classes

No functional change. CI should be happy. Why ? Fault, Ok, Err and Option are meant to be immutable. In practice, we cannot enforce @psalm-immutable because it is stricter and also requires "side-effect-free" on all methods. Making them `readonly` will allow all `final` fault classes to also be `readonly` and prevents mutating their contents. Change-Id: I40c333d2f19e0cb1f20ed9d6b82479cecd803068

Modified Files

Name
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/DuckTypedField/FieldNotFoundInAnyTrackerFault.php +1 −1 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/DuckTypedField/FieldTypeIsNotSupportedFault.php +1 −1 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/DuckTypedField/FieldTypesAreIncompatibleFault.php +1 −1 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryValidation/InvalidComparisonToCurrentDateTimeFault.php +1 −1 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryValidation/InvalidComparisonToCurrentUserFault.php +1 −1 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryValidation/InvalidComparisonToStatusOpenFault.php +1 −1 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryValidation/MyselfNotAllowedForAnonymousFault.php +1 −1 Go to diff View file
M plugins/git/include/Git/Repository/Settings/ArtifactClosure/ArtifactClosureNotAllowedFault.php +1 −1 Go to diff View file
M plugins/git/include/Hook/Asynchronous/UnhandledTopicFault.php +1 −1 Go to diff View file
M plugins/gitlab/include/API/GitlabRequestFault.php +1 −1 Go to diff View file
M plugins/gitlab/include/API/GitlabResponseAPIFault.php +1 −1 Go to diff View file
M plugins/gitlab/include/Core/ProjectNotFoundFault.php +1 −1 Go to diff View file
M plugins/gitlab/include/Group/GroupLinkNotFoundFault.php +1 −1 Go to diff View file
M plugins/gitlab/include/Group/InvalidBranchPrefixFault.php +1 −1 Go to diff View file
M plugins/gitlab/include/Permission/UserIsNotGitAdministratorFault.php +1 −1 Go to diff View file
M plugins/gitlab/include/Repository/RepositoryIntegrationNotFoundFault.php +1 −1 Go to diff View file
M plugins/mediawiki/include/XML/XMLExportMediawikiCannotBeActivatedFault.php +1 −1 Go to diff View file
M plugins/mediawiki/include/XML/XMLExportMediawikiNotInstantiatedFault.php +1 −1 Go to diff View file
M plugins/mediawiki/include/XML/XMLExportMediawikiServiceNotUsedFault.php +1 −1 Go to diff View file
M plugins/mediawiki/include/XML/XMLPartialExportFault.php +1 −1 Go to diff View file
M plugins/pullrequest/include/PullRequest/Authorization/CannotAccessToPullRequestFault.php +1 −1 Go to diff View file
M plugins/pullrequest/include/PullRequest/Authorization/GitRepositoryNotFoundFault.php +1 −1 Go to diff View file
M plugins/pullrequest/include/PullRequest/Comment/CommentFormatNotAllowedFault.php +1 −1 Go to diff View file
M plugins/pullrequest/include/PullRequest/Comment/CommentIsNotFromCurrentUserFault.php +1 −1 Go to diff View file
M plugins/pullrequest/include/PullRequest/Comment/CommentNotFoundFault.php +1 −1 Go to diff View file
M plugins/pullrequest/include/PullRequest/Criterion/MalformedQueryFault.php +1 −1 Go to diff View file
M plugins/pullrequest/include/PullRequest/GitReference/GitPullRequestReferenceNotFoundFault.php +1 −1 Go to diff View file
M plugins/pullrequest/include/PullRequest/InlineComment/InlineCommentNotFoundFault.php +1 −1 Go to diff View file
M plugins/pullrequest/include/PullRequest/PullRequestNotFoundFault.php +1 −1 Go to diff View file
M plugins/pullrequest/include/PullRequest/REST/v1/PullRequestAuthorNotFoundFault.php +1 −1 Go to diff View file
M plugins/pullrequest/include/PullRequest/REST/v1/UserNotFoundFault.php +1 −1 Go to diff View file
M plugins/svn/include/SVN/Repository/Settings/EmptyNotificationsFault.php +1 −1 Go to diff View file
M plugins/svn/include/SVN/Repository/Settings/MissingAccessFileFault.php +1 −1 Go to diff View file
M plugins/svn/include/SVN/Repository/Settings/NonAuthorizedDynamicUgroupFault.php +1 −1 Go to diff View file
M plugins/svn/include/SVN/Repository/Settings/NonUniqueMailsFault.php +1 −1 Go to diff View file
M plugins/svn/include/SVN/Repository/Settings/NonUniqueNotificationPathFault.php +1 −1 Go to diff View file
M plugins/svn/include/SVN/Repository/Settings/UgroupNotInProjectFault.php +1 −1 Go to diff View file
M plugins/svn/include/SVN/Repository/Settings/UserInNotificationNotFoundFault.php +1 −1 Go to diff View file
M plugins/svn/include/SVN/Repository/Settings/UserNotAliveFault.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Admin/MoveArtifacts/MoveActionForbiddenFault.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/ArtifactDoesNotExistFault.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Closure/ArtifactIsAlreadyClosedFault.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/ArtifactLinkFieldDoesNotExistFault.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Semantic/SemanticNotSupportedFault.php +1 −1 Go to diff View file
M src/common/NeverThrow/Err.php +1 −2 Go to diff View file
M src/common/NeverThrow/Fault.php +1 −1 Go to diff View file
M src/common/NeverThrow/Ok.php +1 −2 Go to diff View file
M src/common/NeverThrow/README.md +1 −1 Go to diff View file
M src/common/Option/Option.php +3 −3 Go to diff View file
M src/common/Project/Registration/Template/NoTemplateProvidedFault.php +1 −1 Go to diff View file
M src/common/Project/Status/CannotDeletedDefaultAdminProjectFault.php +1 −1 Go to diff View file
M src/common/Project/Status/SwitchingBackToPendingFault.php +1 −1 Go to diff View file
M src/common/Project/Status/UpdateAlreadyDeletedProjectFault.php +1 −1 Go to diff View file
M src/common/Project/XML/InvalidXMLContentFault.php +1 −1 Go to diff View file
M src/common/SVNCore/SVNAccessFileWriteFault.php +1 −1 Go to diff View file
M tests/unit/common/NeverThrow/FaultTest.php +2 −11 Go to diff View file
A tests/unit/common/NeverThrow/Tests/FaultForTest.php +41 −0 Go to diff View file