Skip to content

Updated deps and fixed coding standards.#269

Merged
AlexSkrypnyk merged 1 commit intomainfrom
feature/deps-update-mar26
Mar 11, 2026
Merged

Updated deps and fixed coding standards.#269
AlexSkrypnyk merged 1 commit intomainfrom
feature/deps-update-mar26

Conversation

@AlexSkrypnyk
Copy link
Copy Markdown
Member

@AlexSkrypnyk AlexSkrypnyk commented Mar 11, 2026

Summary by CodeRabbit

  • New Features

    • Added automatic changelog generation configuration.
  • Chores

    • Enhanced CI security auditing in continuous integration pipeline.
    • Updated multiple development dependencies to latest stable versions.
    • Updated Symfony framework components for improved stability and security.
    • Added new security audit configuration with insecure package blocking enabled.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 11, 2026

📝 Walkthrough

Walkthrough

CI workflow enhanced with composer dependency security audit. composer.json updated with newer dependency versions (Symfony, phpstan, phpunit, rector) and new audit/plugin configuration entries. Exception handling improved in repository and test classes to propagate previous exception context for better error diagnostics.

Changes

Cohort / File(s) Summary
CI and Dependency Management
.github/workflows/test-php.yml, composer.json
Added "Audit composer.json" CI step to run composer security audits. Updated Symfony packages (console, filesystem, finder, monolog-bridge) and dev tools (phpstan, phpunit, rector, ergebnis/composer-normalize). Added pyrech/composer-changelogs plugin and new audit configuration (abandoned report, block-insecure flag) plus bump-after-update setting.
Exception Handling
src/Git/ArtifactGitRepository.php, tests/Traits/ConsoleTrait.php
Improved exception context propagation by passing previous exception information. BranchNotFoundException now accepts optional Throwable parameter. Test trait AssertionFailedError now includes exception code and object from caught exceptions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • Updated phpstan and rector. #252: Modifies composer.json dependency versions including phpstan, phpunit, rector, and Symfony packages overlap with this PR's dependency bumps.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Updated deps and fixed coding standards' accurately summarizes the main changes: dependency updates in composer.json and a new CI step for security auditing, plus exception handling improvements across multiple files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/deps-update-mar26

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.91%. Comparing base (8241831) to head (6297ec2).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #269      +/-   ##
==========================================
- Coverage   96.93%   96.91%   -0.03%     
==========================================
  Files           6        6              
  Lines         424      421       -3     
==========================================
- Hits          411      408       -3     
  Misses         13       13              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/Git/ArtifactGitRepository.php (1)

284-294: ⚠️ Potential issue | 🟡 Minor

Consider passing $e2 instead of $e1 for better error context.

The code catches $e1 from the branch verification (line 284) and $e2 from the tag verification (line 288). When throwing BranchNotFoundException at line 293, you pass $e1, but $e2 is the most recent exception that definitively confirms the value is neither a branch nor a tag.

Passing $e2 would provide more relevant context about why the detachment source couldn't be resolved.

Proposed fix
-          throw new BranchNotFoundException('Unable to determine a detachment source', $commit_hash, $e1);
+          throw new BranchNotFoundException('Unable to determine a detachment source', $commit_hash, $e2);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Git/ArtifactGitRepository.php` around lines 284 - 294, The catch block
currently throws BranchNotFoundException using the outer exception variable $e1,
but the inner GitException $e2 is the one that proves the ref is neither a tag
nor a branch; update the throw to pass $e2 instead of $e1 so the exception
carries the most relevant error context. Locate the try/catch around
execute(['show-ref', '--verify', 'refs/tags/' . $branch]) and the inner catch
(GitException $e2), and change the thrown BranchNotFoundException(...) to use
$e2 while keeping the same message and $commit_hash retrieval via
execute(['rev-parse', 'HEAD'])[0] ?? ''.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@src/Git/ArtifactGitRepository.php`:
- Around line 284-294: The catch block currently throws BranchNotFoundException
using the outer exception variable $e1, but the inner GitException $e2 is the
one that proves the ref is neither a tag nor a branch; update the throw to pass
$e2 instead of $e1 so the exception carries the most relevant error context.
Locate the try/catch around execute(['show-ref', '--verify', 'refs/tags/' .
$branch]) and the inner catch (GitException $e2), and change the thrown
BranchNotFoundException(...) to use $e2 while keeping the same message and
$commit_hash retrieval via execute(['rev-parse', 'HEAD'])[0] ?? ''.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a4d85c0f-1ddf-4311-85b8-a673b1ca7926

📥 Commits

Reviewing files that changed from the base of the PR and between 8241831 and 6297ec2.

⛔ Files ignored due to path filters (1)
  • composer.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • .github/workflows/test-php.yml
  • composer.json
  • src/Git/ArtifactGitRepository.php
  • tests/Traits/ConsoleTrait.php

@AlexSkrypnyk AlexSkrypnyk merged commit cdf5e9a into main Mar 11, 2026
11 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/deps-update-mar26 branch March 11, 2026 23:19
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