Skip to content

ship 3.1.0#390

Merged
mesilov merged 106 commits into
v3from
v3-dev
Apr 14, 2026
Merged

ship 3.1.0#390
mesilov merged 106 commits into
v3from
v3-dev

Conversation

@mesilov
Copy link
Copy Markdown
Collaborator

@mesilov mesilov commented Mar 18, 2026

Q A
Bug fix? yes
New feature? yes
Deprecations? yes
Issues Fix #389
License MIT

mesilov added 6 commits March 5, 2026 01:59
- Updated method signature and associated tests to return `int` instead of `?int`.
- Modified data providers and test cases to align with the new non-nullable contract.
- Updated documentation and changelog to reflect the change.
- Ensured compatibility with existing implementations.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Make `ContactPersonInterface::getBitrix24UserId()` non-nullable
…erministic master account selection

- Resolved issue #387 by updating behavior to prioritize master accounts using explicit status order (`active > new > blocked`) and exclude deleted installations.
- Added regression tests to cover edge cases and verify non-deleted master account lifecycle scenarios.
- Updated `CHANGELOG.md` to reflect the repository behavior fix.
- Introduced `AGENTS.md` to document repository-level working rules and guidelines.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…counts in pending install flows

- Updated in-memory repository logic to prioritize accounts by explicit status order (`active > new > blocked`) and exclude deleted installations.
- Added extensive test coverage for master account lifecycle scenarios, ensuring fallback behavior in edge cases.
- Updated `.gitignore` to include `.DS_Store` and updated `CHANGELOG.md` to document the fix.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
@mesilov mesilov marked this pull request as draft March 18, 2026 05:41
@mesilov mesilov self-assigned this Mar 18, 2026
@mesilov mesilov added the enhancement in SDK New feature or request in SDK label Mar 18, 2026
@mesilov mesilov added this to the 3.1.0 milestone Mar 18, 2026
mesilov and others added 20 commits March 18, 2026 11:55
- Introduced `openapi.json` to document the Bitrix24 REST V3 API.
- Removed `openapi.json` from `.gitignore` to include it in version control.
- Defined API methods, request bodies, responses, and schema components for `main`, `rest`, and `tasks` modules.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…line and usage requirements

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…n generation

- Introduced `show-sdk-coverage-statistics` to display SDK API coverage in the console.
- Added `build-documentation` to generate Markdown documentation for SDK API coverage.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…SDK metadata extraction

- Resolved crashes caused by `AttributesParser` when handling union return types like `int|string`.
- Introduced a helper to normalize `ReflectionType` into metadata, supporting `ReflectionNamedType`, `ReflectionUnionType`, and `ReflectionIntersectionType`.
- Extended API-method metadata to include `sdk_return_type_declaration` for accurate representation of compound types.
- Added regression tests for union return types and expanded test coverage for various reflection shapes.
- Verified compatibility of coverage statistics and documentation generation tools.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…od metadata

- Replaced associative array-based metadata structure with strongly typed readonly VO (`SupportedInSdkApiMethod`) featuring public fields.
- Updated consumers to handle the VO contract, ensuring consistent field access and camelCase naming convention.
- Extended type reflection logic to preserve compound return types via `sdkReturnTypeDeclaration` while maintaining compatibility for single-class return types.
- Revised `getSupportedInSdkApiMethods()` to return `list<SupportedInSdkApiMethod>` with explicit collection behavior.
- Updated and

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
… with compound return types.

- Migrated metadata to strongly typed readonly VO (`SupportedInSdkApiMethod`) to replace associative arrays, improving consistency and type safety.
- Extended type reflection to support `ReflectionUnionType`, `ReflectionIntersectionType`, and nullable types, preserving compound return types in metadata.
- Updated documentation and consumers to accommodate the new metadata structure.
- Added regression tests for various reflection scenarios.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…t.* and crm.documentgenerator.template.* methods
- Introduced `b24-dev:show-oa-sdk-coverage` command to compare OpenAPI schema snapshot (`openapi.json`) against SDK v3 methods.
- Implemented coverage calculation to classify methods as covered, uncovered, or SDK-only.
- Added support for scope compatibility validation and alias handling for OA-to-SDK mismatches.
- Included optional flags (`--show-uncovered`, `--show-sdk-only`) for detailed diagnostics.
- Updated `Makefile` to add `oa-sdk-coverage` target for the new command.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…esign steps

- Added detailed guidance on using OpenAPI Specification Extensions (`x-*`) for vendor-specific metadata, including reserved prefixes and project-local namespace recommendations (`x-b24-*`).
- Appended documentation and research notes to task #391.
- Outlined the implementation plan for SDK support of `tasks.task.field.get` and `tasks.task.field.list` in task #

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
- Implemented support for `tasks.task.field.get` and `tasks.task.field.list` methods.
- Introduced `TaskFieldItemResult`, `TaskFieldResult`, and `TaskFieldsResult` to provide strongly typed wrappers for API responses.
- Updated `TaskServiceBuilder` to include the new `TaskField` service.
- Added integration test coverage for task field metadata methods.
- Documented result-item annotation testing and conventions in `AGENTS.md` and `docs/testing.md`.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
- Introduced `b24-dev:show-v3-field-metadata` command to fetch and display field metadata for specific v3 entities.
- Implemented `Bitrix24V3FieldMetadataFetcher` for field metadata retrieval via OpenAPI methods.
- Added support for JSON and table output formats.
- Developed `DevWebhookResolver` to handle webhook resolution logic, prioritizing CLI input followed by environment variables.
- Included unit and integration tests for the new CLI command and supporting classes.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…support

- Implemented support for Bitrix24 REST API methods `tasks.task.chat.message.field.get` and `tasks.task.chat.message.field.list` in API v3.
- Introduced `ChatMessageField` service with `get()` and `list()` methods in `TaskServiceBuilder`.
- Added result classes `ChatMessageFieldResult`, `ChatMessageFieldsResult`, and `ChatMessageFieldItemResult` for handling API responses.
- Updated `CHANGELOG.md`, Makefile targets, PHPUnit configuration, and added unit and integration tests for the new service.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…te field annotations

- Introduced `ChatMessageFieldItemResultTest` to ensure all fields are properly annotated and match raw API response.
- Utilized `CustomBitrix24Assertions` for field verification in integration scenarios.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…annotations

- Introduced `CustomBitrix24AssertionsTest` to ensure fields of `AbstractItem` match their annotated types.
- Implemented `assertBitrix24ResultItemFieldsTypeCastMatchAnnotations()` to enforce type consistency.
- Added test cases for matching types, nullable types, and invalid types with detailed assertions.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
… type annotations and magic getter type casting

- Extended `phpunit.xml.dist` to include `ChatMessageFieldItemResultTest` in the integration suite.
- Updated `CHANGELOG.md` with details about the new test coverage.
- Added tests to ensure all fields are properly annotated and magic getters return values with correct type casting.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…hpsdk` repository

- Introduced `.claude/skills/b24phpsdk-maintainer/SKILL.md` to guide maintainers on handling GitHub issues.
- Updated `CHANGELOG.md` with details of the new skill addition.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
mesilov and others added 28 commits April 12, 2026 00:38
…arity, add `#[Override]` annotations in lifecycle methods, and streamline assertions.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…mespace

On Linux (case-sensitive FS) the PSR-4 autoloader resolves
`Domain\Fixtures\*` to `Domain/Fixtures/`, so the old lowercase
`fixtures/` directory caused all fixture classes to be unloadable,
breaking the entire V3BuilderCoverageAuditorTest suite in CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Four test files still referenced the old lowercase fixtures/ path
via __DIR__ constants. Updated to Fixtures/ so they resolve correctly
on case-sensitive Linux filesystems (CI).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rator

Add SelectBuilder generator with OpenApi naming and static assertions (#340)
…ture (#344)

- Task::add() and Task::update() now check instanceof ItemBuilderInterface
  instead of instanceof TaskItemBuilder (semantically correct; array|TaskItemBuilder
  type hints preserved for IDE discoverability)
- AbstractItemBuilder::getSupportedFieldNames() discovers 1-param public instance
  methods in concrete subclasses via reflection (mirrors allSystemFields() pattern)
- OpenApiSchemaEntityReader::getWritableFields() reads writable fields and their
  OpenAPI types from paths/{op}/post/requestBody in the schema snapshot
- ItemBuilderCodeGenerator + ItemBuilder.tpl.php generate typed setter methods
  from OpenAPI writable-field maps (skips object types; mirrors SelectBuilderCodeGenerator)
- GenerateItemBuilderCommand (b24-dev:generate-item-builder) registered in bin/console
- TaskItemBuilder expanded from 10 to 78 typed setter methods (deadline/startPlan/
  endPlan keep CarbonInterface input; needsControl keeps Y/N serialization)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- CLAUDE.md: added «Pull Request rules» section requiring `cat .github/PULL_REQUEST_TEMPLATE.md`
  before every PR creation; warns against memorised or custom body formats
- SKILL.md: updated GitHub CLI fallback `gh pr create` example with explicit comment
  to read the template first

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…terface

Add ItemBuilderInterface support and ItemBuilder generator infrastructure (#344)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…pi-to-require-dev

Remove unused cebe/php-openapi dependency
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nt (#341)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ner-repository-test

Add createRepositoryFlusherImplementation to Bitrix24PartnerRepositoryInterfaceTest
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
#341)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…l-response

Add unified unsuccessful response support for REST API v3
….1.0 (#418)

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
@mesilov mesilov marked this pull request as ready for review April 14, 2026 20:06
@mesilov mesilov merged commit 4e6e76c into v3 Apr 14, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement in SDK New feature or request in SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Shipping new SDK release]: 3.1.0

3 participants