Skip to content

Feature/573 add catalog.rounding rule v3 - #581

Merged
mesilov merged 3 commits into
bitrix24:v3-devfrom
Algonexys:feature/573-add-catalog.roundingRule-v3
Sep 28, 2026
Merged

mesilov merged 3 commits into
bitrix24:v3-devfrom
Algonexys:feature/573-add-catalog.roundingRule-v3

Conversation

@Algonexys

Copy link
Copy Markdown
Contributor
Q A
Bug fix? yes
New feature? yes
Deprecations? yes
Issues Feature #573
License MIT

Add support for catalog.roundingRule.*
https://apidocs.bitrix24.com/api-reference/catalog/rounding-rule/index.html

catalog.roundingRule.add
catalog.roundingRule.update
catalog.roundingRule.get
catalog.roundingRule.list
catalog.roundingRule.delete
catalog.roundingRule.getFields

Fixed make lint-rector failing with Undefined constant Rector\PHPUnit\Set\PHPUnitSetList::PHPUNIT_110:
the versioned PHPUnit set constants (PHPUNIT_60, PHPUNIT_90, PHPUNIT_110, etc.) were removed
from rector/rector-phpunit in the installed Rector version and replaced with consolidated sets
(PHPUNIT_CODE_QUALITY, PHPUNIT_MOCK_TO_STUB, PHPUNIT_NARROW_ASSERTS, ANNOTATIONS_TO_ATTRIBUTES).
Compared the dry-run impact of each candidate: PHPUNIT_CODE_QUALITY would touch 477 files,
PHPUNIT_NARROW_ASSERTS 91 files — both unrelated repository-wide style changes out of scope here.
ANNOTATIONS_TO_ATTRIBUTES (migrates legacy @annotation docblocks to PHP 8 attributes, the closest
match to what PHPUNIT_110 used to cover) touches 0 files, since the codebase already uses PHP 8
attributes everywhere; replaced the obsolete PHPUnitSetList::PHPUNIT_110 reference in rector.php
with PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES

Removed the obsolete Rector\Php84\Rector\Class_\DeprecatedAnnotationToDeprecatedAttributeRector
entry from rector.php → withSkip(): the rule is deprecated and no longer registered in the
installed Rector version, so make lint-rector reported it as a dead skip entry

@mesilov mesilov added this to the 3.6.0 milestone Sep 28, 2026
@mesilov
mesilov merged commit b82da02 into bitrix24:v3-dev Sep 28, 2026
2 of 5 checks passed
mesilov added a commit that referenced this pull request Sep 28, 2026
`make lint-rector` and `make test-unit` were both red on v3-dev after #581.

* phpunit.xml.dist: close missing `</testsuite>` for
  `integration_tests_catalog_rounding_rule` — malformed XML aborted the
  whole PHPUnit run (same defect shape as the ratio suite in #574)
* CatalogServiceBuilder: fix indentation of `roundingRule()` and trailing
  blank lines (braces_position, statement_indentation,
  no_whitespace_in_blank_line)
* rector.php: revert the set/skip change from 7a80e3d. Both premises do
  not hold for the installed Rector 2.5.2:
  `PHPUnitSetList::PHPUNIT_110` is still declared, and
  `DeprecatedAnnotationToDeprecatedAttributeRector` is still registered —
  un-skipping it made `lint-rector` demand rewriting `@deprecated`
  docblocks into `#[\Deprecated]` attributes in 6 files, which is a
  runtime-behaviour change (the attribute emits E_USER_DEPRECATED),
  not a no-op cleanup
* CHANGELOG: drop the two `3.5.0 / Fixed` entries describing that
  reverted change, and move the `RoundingRule` entry (#573) out of the
  already-tagged 3.5.0 section into 3.6.0

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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