Skip to content

HQD-142: Add deprecated() marker and isDeprecated() to PriceTypeDefinition#120

Merged
SilverFire merged 1 commit into
hiqdev:masterfrom
VadymHrechukha:HQD-142_add_deprecated_marker_to_price_type_definition
Jun 12, 2026
Merged

HQD-142: Add deprecated() marker and isDeprecated() to PriceTypeDefinition#120
SilverFire merged 1 commit into
hiqdev:masterfrom
VadymHrechukha:HQD-142_add_deprecated_marker_to_price_type_definition

Conversation

@VadymHrechukha

@VadymHrechukha VadymHrechukha commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

New Features

  • Added deprecation status tracking for price types. The system can now identify which price types are marked as deprecated, improving compatibility handling during invoice regeneration and supporting backward-compatible operations.

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 102c32ef-a759-484c-84a2-9591cfad388e

📥 Commits

Reviewing files that changed from the base of the PR and between 3ebe910 and 4665c6a.

📒 Files selected for processing (2)
  • src/product/price/PriceTypeDefinition.php
  • src/product/price/PriceTypeDefinitionInterface.php

📝 Walkthrough

Walkthrough

The PR adds internal deprecation state tracking to PriceTypeDefinition. A private boolean field stores the deprecated state, the existing deprecated() builder method now sets this flag, and a new public isDeprecated() accessor exposes the state. The interface contract is updated to declare the new accessor method.

Changes

Deprecation state tracking

Layer / File(s) Summary
Deprecation state accessor API
src/product/price/PriceTypeDefinitionInterface.php
Interface declares the new isDeprecated(): bool method to expose the deprecation flag value.
Deprecation state field and accessor
src/product/price/PriceTypeDefinition.php
Implementation adds a private boolean field to store deprecation state, updates the deprecated() builder method to set this flag, and introduces the isDeprecated() accessor to return the flag value.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

  • hiqdev/php-billing#119: Extends the same PriceTypeDefinitionInterface/PriceTypeDefinition by implementing the internal deprecated flag and adding isDeprecated(): bool method, building on the deprecation API additions.

Poem

🐰 A flag, a field, a truth to hold,

When prices age and grow too old,

Mark deprecated with care so neat,

Making invoice tracks complete! ✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov-commenter

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@SilverFire SilverFire merged commit 7983091 into hiqdev:master Jun 12, 2026
4 of 5 checks passed
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.

3 participants