Skip to content

Fix Packagist self-replace error blocking package updates#105

Merged
Vitexus merged 3 commits into
mainfrom
fix/packagist-self-replace
May 13, 2026
Merged

Fix Packagist self-replace error blocking package updates#105
Vitexus merged 3 commits into
mainfrom
fix/packagist-self-replace

Conversation

@Vitexus
Copy link
Copy Markdown
Collaborator

@Vitexus Vitexus commented May 12, 2026

Summary

  • Remove replace.spojenet/flexibee: self.version from composer.json — a package cannot replace itself, and Packagist was skipping the main branch with the error "a package cannot set a replace on itself", preventing all new releases from appearing.
  • Regenerated Actions, EvidenceList, Formats, Relations, and RO from AbraFlexi server v2026.3.11 with CS-fixer formatting applied.

Test plan

  • Run composer validate — should report no errors in composer.json
  • After merge, verify Packagist picks up the main branch and new tags without skipping them

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Version updated to 2026.3.14
    • Removed obsolete package-level configuration directive
    • Refined property metadata and evidence variant configurations across document types
    • Adjusted field visibility settings to optimize data presentation
    • Updated code documentation headers and improved type annotations for better maintainability

Review Change Stack

Vitexus and others added 2 commits May 11, 2026 13:14
…orts icon

addon type requires an <extends> tag; without it validateMetainfo rejects
the component and skips icon export. generic is the correct type for a
PHP library, and allows appstream-generator to publish the stock icon to
the DEP-11 media dir so Mastodon announcements can attach it.

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

Remove invalid replace.spojenet/flexibee self-reference from composer.json that
was causing Packagist to skip the main branch entirely; also apply CS-fixer
reformatting and regenerated Actions/EvidenceList/Formats/Relations/RO from
AbraFlexi server v2026.3.11.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

📝 Walkthrough

Walkthrough

This PR updates the AbraFlexi library to version 2026.3.14, coordinating source version constants, code documentation refinements, package metadata adjustments, and evidence variant property configuration reordering across static schema definitions.

Changes

Version 2026.3.14 Release with Evidence Variant Configuration

Layer / File(s) Summary
Version constant updates
src/AbraFlexi/Actions.php, src/AbraFlexi/EvidenceList.php, src/AbraFlexi/Formats.php, src/AbraFlexi/Relations.php
Static $version constants bumped from 2026.3.10 to 2026.3.14 across four core source classes to reflect the target FlexiBee server version.
Documentation and type refinement
src/AbraFlexi/RO.php, src/AbraFlexi/EvidenceList.php, tests/src/AbraFlexi/ParseErrorEmptyResultsTest.php
PHPDoc parameter types for RO::getColumnsFromAbraFlexi() refined to array<int|string, mixed>; file-level copyright/license header added to test file; generated timestamp updated in EvidenceList.
Package and system configuration
composer.json, debian/io.github.spoje_net.php_spojenet_abraflexi.metainfo.xml
"replace" directive removed from composer.json; AppStream component type changed from addon to generic in Debian metadata.
Evidence variant property configuration
static/Properties.*.json (atribut, castky-k-odpoctu, cislo-baliku, doporuceni, prikaz-k-inkasu-polozka, prikaz-k-uhrade-polozka, priloha, prodejka-platba, rezervace, splatkovy-kalendar, udalost, vyrobni-cislo, zaloha-k-odpoctu)
Evidence variant orderings reordered within thirteen property definition files to align schema mappings; behavioral adjustment in splatkovy-kalendar.json where datVyst.inSummary changed from true to false; vyrobni-cislo.json variant identifiers updated to *-polozka suffixed types and vzajemny-zapocet removed from internal document variants.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A version hops from ten to fourteen,
Constants dance across our library scene,
Evidence variants waltz and rearrange,
Our metadata embraces FlexiBee's change!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix Packagist self-replace error blocking package updates' accurately summarizes the main change: removing the problematic self-replace directive from composer.json that was blocking package updates on Packagist.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/packagist-self-replace

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 PHPStan (2.1.54)

Composer install failed: this project depends on private packages that require authentication (e.g. GitLab/GitHub, Laravel Nova, etc.).
CodeRabbit tooling environment cannot access private registries.
If your project requires private packages, disable the PHPStan tool in your coderabbit settings.

Instead, run PHPStan in a CI/CD pipeline where you can use custom packages — our pipeline remediation tool can use the PHPStan output from your CI/CD pipeline.


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.

@Vitexus Vitexus merged commit 504cc27 into main May 13, 2026
1 of 2 checks passed
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/AbraFlexi/RO.php`:
- Around line 1869-1871: Update the PHPDoc for the method that declares
parameters $columnsList, $conditions and $indexBy so it matches actual runtime
handling: change $columnsList from "array<string>|string" to
"array<int|string>|int|string" (to allow integer column IDs or a single int),
change $conditions from "array<int|string, mixed>" to "array<int|string,
mixed>|int|string" (to allow string filters and integer record IDs), and keep
$indexBy as "null|string"; then save and re-run static analysis to ensure no
type mismatches remain.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4f9df872-4712-4375-a8cb-b6290d55d3c3

📥 Commits

Reviewing files that changed from the base of the PR and between d5b2611 and 504cc27.

📒 Files selected for processing (23)
  • composer.json
  • debian/io.github.spoje_net.php_spojenet_abraflexi.metainfo.xml
  • src/AbraFlexi/Actions.php
  • src/AbraFlexi/EvidenceList.php
  • src/AbraFlexi/Formats.php
  • src/AbraFlexi/RO.php
  • src/AbraFlexi/Relations.php
  • static/Properties.atribut.json
  • static/Properties.castky-k-odpoctu.json
  • static/Properties.cislo-baliku.json
  • static/Properties.doporuceni.json
  • static/Properties.neuhrazene-po-splatnosti-2.json
  • static/Properties.neuhrazene-po-splatnosti.json
  • static/Properties.prikaz-k-inkasu-polozka.json
  • static/Properties.prikaz-k-uhrade-polozka.json
  • static/Properties.priloha.json
  • static/Properties.prodejka-platba.json
  • static/Properties.rezervace.json
  • static/Properties.splatkovy-kalendar.json
  • static/Properties.udalost.json
  • static/Properties.vyrobni-cislo.json
  • static/Properties.zaloha-k-odpoctu.json
  • tests/src/AbraFlexi/ParseErrorEmptyResultsTest.php
💤 Files with no reviewable changes (1)
  • composer.json

Comment thread src/AbraFlexi/RO.php
Comment on lines +1869 to +1871
* @param array<string>|string $columnsList List of items or detail level: id|summary|full
* @param array<int|string, mixed> $conditions Array of conditions or record ID
* @param null|string $indexBy Column by which to index records
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

PHPDoc types no longer match the implemented input contract.

Line 1869 excludes int for $columnsList, but Line 1883 explicitly handles integer input.
Line 1870 excludes string for $conditions, but Line 1919 accepts string filters.

Please align the docblock with actual accepted inputs to avoid misleading static analysis and callers.

Suggested docblock fix
- * `@param` array<string>|string     $columnsList List of items or detail level: id|summary|full
- * `@param` array<int|string, mixed> $conditions  Array of conditions or record ID
+ * `@param` array<string>|int|string             $columnsList List of items, record ID, or detail level: id|summary|full
+ * `@param` array<int|string, mixed>|int|string  $conditions  Array of conditions, filter string, or record ID
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* @param array<string>|string $columnsList List of items or detail level: id|summary|full
* @param array<int|string, mixed> $conditions Array of conditions or record ID
* @param null|string $indexBy Column by which to index records
* `@param` array<string>|int|string $columnsList List of items, record ID, or detail level: id|summary|full
* `@param` array<int|string, mixed>|int|string $conditions Array of conditions, filter string, or record ID
* `@param` null|string $indexBy Column by which to index records
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/AbraFlexi/RO.php` around lines 1869 - 1871, Update the PHPDoc for the
method that declares parameters $columnsList, $conditions and $indexBy so it
matches actual runtime handling: change $columnsList from "array<string>|string"
to "array<int|string>|int|string" (to allow integer column IDs or a single int),
change $conditions from "array<int|string, mixed>" to "array<int|string,
mixed>|int|string" (to allow string filters and integer record IDs), and keep
$indexBy as "null|string"; then save and re-run static analysis to ensure no
type mismatches remain.

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