Skip to content

Deprecate Constraint::CHECK_MODE_NONE#896

Open
Copilot wants to merge 3 commits intomainfrom
copilot/mark-check-mode-none-deprecated
Open

Deprecate Constraint::CHECK_MODE_NONE#896
Copilot wants to merge 3 commits intomainfrom
copilot/mark-check-mode-none-deprecated

Conversation

Copy link
Contributor

Copilot AI commented Mar 10, 2026

Constraint::CHECK_MODE_NONE (0x00000000) has been defined since early versions but is never referenced anywhere in the codebase and has no meaningful semantic—a bitmask of zero applied to any flag check is a no-op.

Changes

  • Constraint.php — Added @deprecated PHPDoc to CHECK_MODE_NONE; constant is retained to avoid a breaking change and will be removed in the next major release (7.0.0)
/** @deprecated CHECK_MODE_NONE is unused and will be removed in the next major release (7.0.0) */
public const CHECK_MODE_NONE = 0x00000000;

IDEs and static analysis tools (PHPStan, Psalm) will surface the deprecation warning at call sites.

Original prompt

This section details on the original issue you should resolve

<issue_title>Constraint::CHECK_MODE_NONE is defined but never used</issue_title>
<issue_description>As it says on the tin: "Constraint::CHECK_MODE_NONE is defined but never used". Also what would a validator do in a check mode none?

This might require some checking and should only be removed in the next mayor release. However it could be marked as deprecated</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: DannyvdSluijs <618940+DannyvdSluijs@users.noreply.github.com>
Copilot AI changed the title [WIP] Mark Constraint::CHECK_MODE_NONE as deprecated Deprecate Constraint::CHECK_MODE_NONE Mar 10, 2026
Co-authored-by: DannyvdSluijs <618940+DannyvdSluijs@users.noreply.github.com>
@DannyvdSluijs DannyvdSluijs marked this pull request as ready for review March 10, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Constraint::CHECK_MODE_NONE is defined but never used

2 participants