From 69892c5459d8149092434fea0335db9f149ebaf2 Mon Sep 17 00:00:00 2001 From: rchek-rl Date: Mon, 6 Jul 2026 08:54:29 +0100 Subject: [PATCH 1/2] set-github-files-and-avro-int-patch --- .github/CODEOWNERS | 1 + .github/pull_request_template.md | 25 +++++++++++++++++++ .github/workflows/pull-request-open-setup.yml | 23 +++++++++++++++++ lib/avro/datum.php | 2 +- lib/avro/schema.php | 2 +- 5 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 .github/CODEOWNERS create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/pull-request-open-setup.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..35e0223 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @cv-library/orion @cv-library/performance @cv-library/recruiter diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..c6e0abe --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,25 @@ +## Description + +Please provide a clear and concise description of the changes proposed in this pull request. + +## Issue + +Link to the issue or bug that this pull request addresses, if applicable. + +## Test Plan + +Please describe the steps you took to test these changes, and the expected outcome. + +## If adding a new event + +- [ ] Does the event class name follow the format`EventTypeEventMessage`? See more in [Readme](https://github.com/cv-library/event-message-bus-bundle?tab=readme-ov-file#event-naming-rules) +- [ ] If a new context was added, was the namespace added to [configuration](https://github.com/cv-library/event-message-bus-bundle/blob/main/src/Resources/config/parameters.yaml)? + +## Additional Context + +Please provide any additional context or information that may be useful in reviewing this pull request. + +## Checks + +- [ ] Did you test this locally? +- [ ] Did you add unit tests based on the feature implemented? diff --git a/.github/workflows/pull-request-open-setup.yml b/.github/workflows/pull-request-open-setup.yml new file mode 100644 index 0000000..e913abd --- /dev/null +++ b/.github/workflows/pull-request-open-setup.yml @@ -0,0 +1,23 @@ +name: Add Labels to PRs + +on: + pull_request: + types: + - opened + +jobs: + setup-pull-request: + runs-on: rl-terrarunner + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Add Label To PR + uses: cv-library/gitflow-pull-request-labels@main + with: + docker-user: ${{ secrets.DEPLOYERCVL_PAT }} + + - name: add pr assignment + uses: cv-library/action-pr-assignment@main + with: + deployer-cvl-pat: ${{ secrets.DEPLOYERCVL_PAT }} diff --git a/lib/avro/datum.php b/lib/avro/datum.php index 8e74252..c4499e0 100644 --- a/lib/avro/datum.php +++ b/lib/avro/datum.php @@ -242,7 +242,7 @@ private function write_map($writers_schema, $datum, $encoder) $encoder->write_long($datum_count); foreach ($datum as $k => $v) { - $encoder->write_string($k); + $encoder->write_string((string) $k); $this->write_data($writers_schema->values(), $v, $encoder); } } diff --git a/lib/avro/schema.php b/lib/avro/schema.php index 89b0de0..745a973 100644 --- a/lib/avro/schema.php +++ b/lib/avro/schema.php @@ -446,7 +446,7 @@ public static function is_valid_datum($expected_schema, $datum) if (is_array($datum)) { foreach ($datum as $k => $v) - if (!is_string($k) + if ((!is_string($k) && !is_int($k)) || !self::is_valid_datum($expected_schema->values(), $v)) return false; return true; From e565c33d4bf325ef17f3c8c1b1304b2b3c20785a Mon Sep 17 00:00:00 2001 From: rchek-rl Date: Mon, 6 Jul 2026 09:25:20 +0100 Subject: [PATCH 2/2] remove uneeded action file and template file --- .github/pull_request_template.md | 25 ------------------- .github/workflows/pull-request-open-setup.yml | 23 ----------------- 2 files changed, 48 deletions(-) delete mode 100644 .github/pull_request_template.md delete mode 100644 .github/workflows/pull-request-open-setup.yml diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index c6e0abe..0000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,25 +0,0 @@ -## Description - -Please provide a clear and concise description of the changes proposed in this pull request. - -## Issue - -Link to the issue or bug that this pull request addresses, if applicable. - -## Test Plan - -Please describe the steps you took to test these changes, and the expected outcome. - -## If adding a new event - -- [ ] Does the event class name follow the format`EventTypeEventMessage`? See more in [Readme](https://github.com/cv-library/event-message-bus-bundle?tab=readme-ov-file#event-naming-rules) -- [ ] If a new context was added, was the namespace added to [configuration](https://github.com/cv-library/event-message-bus-bundle/blob/main/src/Resources/config/parameters.yaml)? - -## Additional Context - -Please provide any additional context or information that may be useful in reviewing this pull request. - -## Checks - -- [ ] Did you test this locally? -- [ ] Did you add unit tests based on the feature implemented? diff --git a/.github/workflows/pull-request-open-setup.yml b/.github/workflows/pull-request-open-setup.yml deleted file mode 100644 index e913abd..0000000 --- a/.github/workflows/pull-request-open-setup.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Add Labels to PRs - -on: - pull_request: - types: - - opened - -jobs: - setup-pull-request: - runs-on: rl-terrarunner - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Add Label To PR - uses: cv-library/gitflow-pull-request-labels@main - with: - docker-user: ${{ secrets.DEPLOYERCVL_PAT }} - - - name: add pr assignment - uses: cv-library/action-pr-assignment@main - with: - deployer-cvl-pat: ${{ secrets.DEPLOYERCVL_PAT }}