Skip to content

[5.x] Use enums for constant values#1300

Merged
royduin merged 3 commits into
masterfrom
feature/enums
Jun 5, 2026
Merged

[5.x] Use enums for constant values#1300
royduin merged 3 commits into
masterfrom
feature/enums

Conversation

@Jade-GG

@Jade-GG Jade-GG commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

ref: RAP-1900

This PR replaces a bunch of consts and a few hardcoded values with backed enums. This is a breaking change, as it removes a bunch of consts that may be used in projects using Rapidez. These are:

  • Category::STATUS_* -> CategoryStatus::*
  • EavAttribute::ENTITY_TYPE_* -> EntityType::*
  • Product::STATUS_* -> ProductStatus::*
  • Product::VISIBILITY_* -> Visibility::*
  • Review::REVIEW_ENTITY_* -> ReviewEntity::*

It's very possible that I've missed some use cases. We can always update those when we come across them.

@royduin

royduin commented Jun 3, 2026

Copy link
Copy Markdown
Member

Was this ready to merge or was there a backwards compatibility issue?

@Jade-GG

Jade-GG commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

Was this ready to merge or was there a backwards compatibility issue?

As far as I know we considered this ready to merge after fixing the failing tests. The only issue is that we have to be careful with updating projects to this version if we use any of these constants there. I wasn't able to find any compatibility issues with packages under the Rapidez namespace.

@royduin royduin merged commit 38d0b96 into master Jun 5, 2026
24 of 27 checks passed
@royduin royduin deleted the feature/enums branch June 5, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants