Skip to content

Fix workflow configurations, PHP compatibility issues, and language key conventions#1393

Merged
nielsdrost7 merged 4 commits into1017-feature-request-add-option-to-add-pdf417-barcode-to-invoicefrom
copilot/sub-pr-1238
Jan 19, 2026
Merged

Fix workflow configurations, PHP compatibility issues, and language key conventions#1393
nielsdrost7 merged 4 commits into1017-feature-request-add-option-to-add-pdf417-barcode-to-invoicefrom
copilot/sub-pr-1238

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 19, 2026

Addresses code review feedback on PR #1238 covering workflow misconfigurations, PHP 8.4+ compatibility issues, security vulnerabilities, and language key naming violations.

Workflow Fixes

  • composer-update.yml: Check both composer.lock and composer.json for changes; parse advisories array instead of checking file size
  • docker.yml: Replace docker-compose (v1) with docker compose (v2)
  • phpstan.yml: Add pull_request trigger to enable PR comments
  • pint.yml: Add forked PR guard; replace --dirty with git diff-based file detection (actions/checkout produces clean tree)
  • quickstart.yml: Remove Laravel commands (artisan migrate); use CodeIgniter config
  • release.yml: Check application/language/english instead of resources/lang/en
  • yarn-update.yml: Check both yarn.lock and package.json for changes

PHP Compatibility & Security

file_security_helper.php: Replace mb_rtrim() with rtrim() (PHP 8.4+ function):

// Before (breaks on PHP <8.4)
$realBaseWithSep = mb_rtrim($realBase, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;

// After (compatible)
$realBaseWithSep = rtrim($realBase, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;

mailer_helper.php: Fix referer validation host spoofing vulnerability:

// Before (vulnerable to prefix attacks)
if (!empty($referer) && str_starts_with($referer, $base_url)) {

// After (validates scheme, host, port)
$referer_parts = parse_url($referer);
$base_url_parts = parse_url($base_url);
// Compare normalized scheme, host, port

ClientTitleEnum.php: Fix tryFrom() false-positive on index 0:

// Before (treats index 0 as "not found", returns index instead of value)
if ($searchResult) {
    $returnObject->value = $searchResult;

// After (strict comparison, returns matched value)
if ($searchResult !== false) {
    $returnObject->value = $values[$searchResult];

Language Key Refactoring

Rename '417_barcode_*''pdf_417_barcode_*' (12 keys) to follow text-prefix convention. Update labels to be country-agnostic:

  • '417_barcode_settings_enable': "Enable PDF 417 Barcode for croatian clients" → "Enable PDF 417 Barcode"
  • '417_barcode_settings_enable_hint': Remove country reference while keeping technical requirements

Updated 44 references in partial_settings_invoices.php (settings form fields, labels, trans() calls).


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits January 19, 2026 14:17
Co-authored-by: nielsdrost7 <47660417+nielsdrost7@users.noreply.github.com>
Co-authored-by: nielsdrost7 <47660417+nielsdrost7@users.noreply.github.com>
Co-authored-by: nielsdrost7 <47660417+nielsdrost7@users.noreply.github.com>
Copilot AI changed the title [WIP] Update PDF417Barcode implementation based on review feedback Fix workflow configurations, PHP compatibility issues, and language key conventions Jan 19, 2026
Copilot AI requested a review from nielsdrost7 January 19, 2026 14:23
@InvoicePlane InvoicePlane deleted a comment from coderabbitai bot Jan 19, 2026
@nielsdrost7 nielsdrost7 marked this pull request as ready for review January 19, 2026 14:29
@nielsdrost7 nielsdrost7 merged commit ce3f649 into 1017-feature-request-add-option-to-add-pdf417-barcode-to-invoice Jan 19, 2026
1 check passed
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 19, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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

@nielsdrost7 nielsdrost7 deleted the copilot/sub-pr-1238 branch January 19, 2026 14:30
nielsdrost7 added a commit that referenced this pull request Jan 19, 2026
…ey conventions (#1393)

* Initial plan

* Fix workflow issues: update triggers, commands, and validation logic

Co-authored-by: nielsdrost7 <47660417+nielsdrost7@users.noreply.github.com>

* Fix PHP compatibility and security issues in helpers and enum

Co-authored-by: nielsdrost7 <47660417+nielsdrost7@users.noreply.github.com>

* Rename PDF 417 barcode language keys and make labels generic

Co-authored-by: nielsdrost7 <47660417+nielsdrost7@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: nielsdrost7 <47660417+nielsdrost7@users.noreply.github.com>
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