Skip to content

Fix installation failures for unknown portal license families - #733

Open
camaxtly wants to merge 1 commit into
bitrix24:v3-devfrom
camaxtly:bugfix/732-unknown-portal-license
Open

camaxtly wants to merge 1 commit into
bitrix24:v3-devfrom
camaxtly:bugfix/732-unknown-portal-license

Conversation

@camaxtly

Copy link
Copy Markdown
Q A
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix #732
License MIT

A future LICENSE_FAMILY string currently raises a native ValueError when reading application metadata. Return PortalLicenseFamily::unknown for unrecognized nonempty strings and expose the original code via getLicenseFamilyCode(): ?string, so consumers can continue installation and log the new value. Known families retain their exact enum values. Missing/null/empty metadata keeps its existing nullable behavior; malformed types still fail instead of being silently accepted.

$info = new ApplicationInfoItemResult(['LICENSE_FAMILY' => 'future_plan_2027']);
$info->LICENSE_FAMILY; // PortalLicenseFamily::unknown
$info->getLicenseFamilyCode(); // 'future_plan_2027'

Test plan

  • make lint-cs-fixer — passed
  • make lint-rector — passed (existing deprecated-rule warnings)
  • make lint-phpstan — passed
  • make lint-deptrac — passed, zero violations
  • make test-unit — 2464 tests / 13217 assertions, passed with 11 deprecations
  • Read-only live MainTest::testApplicationInfo — passed, 1 test / 1 assertion
  • Regression test covers known, future, missing, null, empty and malformed values
  • OpenAPI snapshot refreshed for research; unrelated generated snapshot changes excluded

Checks used PHP 8.4.27 and this branch's own Composer dev dependencies. Application compatibility was additionally verified against a fork backport, including persisted enum hydration and the real install handler.

Closes #732

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.

1 participant