Skip to content

fix: simplify getContentByKey method by removing unused attribute parameter#38

Merged
konradmichalik merged 1 commit intomainfrom
xliff-target-language-fix
Jul 17, 2025
Merged

fix: simplify getContentByKey method by removing unused attribute parameter#38
konradmichalik merged 1 commit intomainfrom
xliff-target-language-fix

Conversation

@konradmichalik
Copy link
Copy Markdown
Contributor

@konradmichalik konradmichalik commented Jul 17, 2025

Summary by CodeRabbit

  • Refactor

    • Simplified the method signature for retrieving content by key across all parser classes and interfaces by removing an unused parameter.
    • Improved XLIFF content retrieval logic to better handle target and source language fallbacks.
    • Updated script commands for running PHP code style fixer to streamline environment handling.
  • Tests

    • Enhanced test coverage for XLIFF parsing, especially with target-language scenarios and fallback behaviors.
    • Updated test fixtures to explicitly declare target languages in XLIFF files.
    • Adjusted tests and mocks to align with the simplified method signatures.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jul 17, 2025

Walkthrough

This update removes the unused $attribute parameter from the getContentByKey method across all parser classes and their interfaces, simplifying method signatures and related test mocks. The XLIFF parser now determines the correct attribute internally. XLIFF fixture files are updated to explicitly declare target languages, and related tests are enhanced.

Changes

Files/Paths Change Summary
src/Parser/ParserInterface.php, src/Parser/JsonParser.php, src/Parser/PhpParser.php, src/Parser/YamlParser.php, src/Parser/XliffParser.php Removed the unused $attribute parameter from getContentByKey method signatures; XliffParser now handles attribute selection internally and adds a helper method.
tests/src/Parser/XliffParserTest.php, tests/src/Parser/PhpParserTest.php Updated tests to call getContentByKey with only one argument; added new tests for XLIFF fallback logic.
tests/src/Validator/EmptyValuesValidatorTest.php, tests/src/Validator/PlaceholderConsistencyValidatorTest.php, tests/src/Validator/DuplicateValuesValidatorTest.php Updated test mocks to match new method signatures, removing the 'source' argument from return values.
tests/src/Result/ValidationRunTest.php, tests/src/Validator/AbstractValidatorTest.php Updated mock parser classes and test parser to remove the unused parameter from method signatures.
tests/src/Fixtures/translations/xliff/... Added target-language attribute to XLIFF <file> elements in fixture files.
composer.json Removed PHP_CS_FIXER_IGNORE_ENV=1 from the fix:php script.
.php-cs-fixer.php Allowed unsupported PHP versions in PHP-CS-Fixer configuration.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant Parser (Json/Php/Yaml/Xliff)
    participant XliffParser (specialized)

    Client->>Parser: getContentByKey(key)
    alt XliffParser
        Parser->>XliffParser: getContentByKey(key)
        XliffParser->>XliffParser: hasTargetLanguage()
        alt hasTargetLanguage = true
            XliffParser->>XliffParser: Return 'target' if not empty, else fallback to 'source'
        else hasTargetLanguage = false
            XliffParser->>XliffParser: Return 'source' if not empty, else fallback to 'target'
        end
        XliffParser-->>Client: content or null
    else Other Parsers
        Parser-->>Client: content or null
    end
Loading

Possibly related PRs

  • #11: Modifies getContentByKey in XliffParser (adds fallback logic); both PRs change this method, though with different focuses.
  • #31: Introduces JsonParser and the original $attribute parameter; this PR updates that method signature.
  • #2: Adds the optional $attribute parameter to XliffParser::getContentByKey; this PR removes it and internalizes logic.

Poem

A bunny hops through code so bright,
Trims parameters left and right.
Now parsers speak with fewer words,
And XLIFF files sing like the birds.
With tests refreshed and logic clean,
The codebase shines—a tidy scene!
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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.

Actionable comments posted: 1

🧹 Nitpick comments (6)
tests/src/Parser/PhpParserTest.php (1)

118-120: Consider refactoring or removing this test method.

Since the $attribute parameter has been removed from getContentByKey, this test method no longer serves its original purpose. The three identical method calls don't add meaningful test coverage.

You could either:

  1. Remove this test method entirely since the attribute parameter no longer exists
  2. Rename and refactor it to test something else meaningful about the getContentByKey method
-    public function testGetContentByKeyIgnoresAttributeParameter(): void
-    {
-        $filePath = __DIR__.'/../Fixtures/translations/php/success/messages.en.php';
-        $parser = new PhpParser($filePath);
-
-        // The attribute parameter should be ignored for PHP files
-        $this->assertSame('Welcome to our application!', $parser->getContentByKey('welcome'));
-        $this->assertSame('Welcome to our application!', $parser->getContentByKey('welcome'));
-        $this->assertSame('Welcome to our application!', $parser->getContentByKey('welcome'));
-    }
src/Parser/YamlParser.php (1)

55-58: LGTM! Method signature updated correctly, but comment needs updating.

The method signature has been properly updated to match the simplified interface. However, the comment on lines 57-58 is now outdated since the $attribute parameter no longer exists in the ParserInterface.

Consider updating or removing the outdated comment:

-    // Note: the $attribute parameter is required by ParserInterface
-    // but is not used for YAML, since YAML has no source/target concept.
+    // YAML files have no source/target concept, so we directly return the value.
src/Parser/JsonParser.php (1)

63-66: Update the outdated comment after parameter removal.

The method signature change correctly aligns with the ParserInterface, but the comment still references the removed $attribute parameter.

-        // Note: the $attribute parameter is required by ParserInterface
-        // but is not used for JSON, since JSON has no source/target concept.
+        // Note: JSON has no source/target concept, so content is retrieved directly by key.
src/Parser/PhpParser.php (1)

57-60: Update the outdated comment after parameter removal.

The method signature change correctly aligns with the ParserInterface, but the comment still references the removed $attribute parameter.

-        // Note: the $attribute parameter is required by ParserInterface
-        // but is not used for PHP files, since PHP has no source/target concept.
+        // Note: PHP files have no source/target concept, so content is retrieved directly by key.
tests/src/Result/ValidationRunTest.php (1)

472-475: Address unused parameter warnings in test mocks.

The static analysis tool correctly identifies that the $key parameter is unused in these mock implementations. Consider using unset($key) to explicitly indicate the parameter is intentionally unused.

 public function getContentByKey(string $key): ?string
 {
+    unset($key);
     return null;
 }

This pattern is already used elsewhere in the file (e.g., line 270) and makes the intention explicit.

Also applies to: 510-513

src/Parser/XliffParser.php (1)

58-70: Review the fallback logic for correctness

The fallback logic appears to have a potential logical issue:

  • When hasTargetLanguage() is true, we use 'target' as primary but fall back to 'source' (lines 58-63)
  • When hasTargetLanguage() is false, we use 'source' as primary but fall back to 'target' (lines 65-70)

This seems counterintuitive. If a file has a target language, why would we fall back to source content? The logic should be:

  • If target language exists and target content is empty, fall back to source
  • If target language doesn't exist and source content is empty, fall back to target

The current implementation seems correct upon closer inspection, but the condition checks are redundant.

Consider simplifying the fallback logic:

-                if ('target' === $attribute && $this->hasTargetLanguage()) {
+                if ('target' === $attribute) {
                     $fallbackContent = (string) $unit->source;
                     if ('' !== $fallbackContent) {
                         return $fallbackContent;
                     }
                 }

-                if ('source' === $attribute && !$this->hasTargetLanguage()) {
+                if ('source' === $attribute) {
                     $fallbackContent = (string) $unit->target;
                     if ('' !== $fallbackContent) {
                         return $fallbackContent;
                     }
                 }

The additional conditions are redundant since $attribute is already determined by hasTargetLanguage().

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eb58f1d and b44cd94.

📒 Files selected for processing (19)
  • .php-cs-fixer.php (1 hunks)
  • composer.json (1 hunks)
  • src/Parser/JsonParser.php (1 hunks)
  • src/Parser/ParserInterface.php (1 hunks)
  • src/Parser/PhpParser.php (1 hunks)
  • src/Parser/XliffParser.php (2 hunks)
  • src/Parser/YamlParser.php (1 hunks)
  • tests/src/Fixtures/translations/xliff/fail/de.locallang.xlf (1 hunks)
  • tests/src/Fixtures/translations/xliff/fail/de.locallang_be.xlf (1 hunks)
  • tests/src/Fixtures/translations/xliff/success/de.locallang.xlf (1 hunks)
  • tests/src/Fixtures/translations/xliff/success/de.locallang_be.xlf (1 hunks)
  • tests/src/Fixtures/translations/xliff/success/fr.locallang.xlf (1 hunks)
  • tests/src/Parser/PhpParserTest.php (1 hunks)
  • tests/src/Parser/XliffParserTest.php (4 hunks)
  • tests/src/Result/ValidationRunTest.php (3 hunks)
  • tests/src/Validator/AbstractValidatorTest.php (1 hunks)
  • tests/src/Validator/DuplicateValuesValidatorTest.php (3 hunks)
  • tests/src/Validator/EmptyValuesValidatorTest.php (5 hunks)
  • tests/src/Validator/PlaceholderConsistencyValidatorTest.php (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (7)
tests/src/Validator/AbstractValidatorTest.php (6)
src/Parser/ParserInterface.php (1)
  • getContentByKey (21-21)
src/Parser/JsonParser.php (1)
  • getContentByKey (63-79)
src/Parser/XliffParser.php (1)
  • getContentByKey (48-75)
src/Parser/PhpParser.php (1)
  • getContentByKey (57-73)
src/Parser/YamlParser.php (1)
  • getContentByKey (55-71)
tests/src/Result/ValidationRunTest.php (3)
  • getContentByKey (278-281)
  • getContentByKey (472-475)
  • getContentByKey (510-513)
src/Parser/YamlParser.php (4)
src/Parser/ParserInterface.php (1)
  • getContentByKey (21-21)
src/Parser/JsonParser.php (1)
  • getContentByKey (63-79)
src/Parser/XliffParser.php (1)
  • getContentByKey (48-75)
src/Parser/PhpParser.php (1)
  • getContentByKey (57-73)
src/Parser/ParserInterface.php (6)
src/Parser/JsonParser.php (1)
  • getContentByKey (63-79)
src/Parser/XliffParser.php (1)
  • getContentByKey (48-75)
src/Parser/PhpParser.php (1)
  • getContentByKey (57-73)
src/Parser/YamlParser.php (1)
  • getContentByKey (55-71)
tests/src/Validator/AbstractValidatorTest.php (1)
  • getContentByKey (81-84)
tests/src/Result/ValidationRunTest.php (3)
  • getContentByKey (278-281)
  • getContentByKey (472-475)
  • getContentByKey (510-513)
src/Parser/JsonParser.php (4)
src/Parser/ParserInterface.php (1)
  • getContentByKey (21-21)
src/Parser/XliffParser.php (1)
  • getContentByKey (48-75)
src/Parser/PhpParser.php (1)
  • getContentByKey (57-73)
src/Parser/YamlParser.php (1)
  • getContentByKey (55-71)
tests/src/Result/ValidationRunTest.php (5)
src/Parser/ParserInterface.php (1)
  • getContentByKey (21-21)
src/Parser/JsonParser.php (1)
  • getContentByKey (63-79)
src/Parser/XliffParser.php (1)
  • getContentByKey (48-75)
src/Parser/PhpParser.php (1)
  • getContentByKey (57-73)
src/Parser/YamlParser.php (1)
  • getContentByKey (55-71)
src/Parser/XliffParser.php (4)
src/Parser/ParserInterface.php (1)
  • getContentByKey (21-21)
src/Parser/JsonParser.php (1)
  • getContentByKey (63-79)
src/Parser/PhpParser.php (1)
  • getContentByKey (57-73)
src/Parser/YamlParser.php (1)
  • getContentByKey (55-71)
tests/src/Parser/XliffParserTest.php (2)
src/Parser/ParserInterface.php (1)
  • getContentByKey (21-21)
src/Parser/XliffParser.php (2)
  • getContentByKey (48-75)
  • XliffParser (7-104)
🪛 PHPMD (2.15.0)
tests/src/Validator/AbstractValidatorTest.php

81-81: Avoid unused parameters such as '$key'. (Unused Code Rules)

(UnusedFormalParameter)

tests/src/Result/ValidationRunTest.php

472-472: Avoid unused parameters such as '$key'. (Unused Code Rules)

(UnusedFormalParameter)


510-510: Avoid unused parameters such as '$key'. (Unused Code Rules)

(UnusedFormalParameter)

🔇 Additional comments (20)
tests/src/Fixtures/translations/xliff/fail/de.locallang_be.xlf (1)

3-3: LGTM: Fixture update supports parser refactoring.

The addition of target-language="de" attribute correctly specifies German as the target language, supporting the simplified getContentByKey method that now determines the correct attribute internally.

tests/src/Fixtures/translations/xliff/success/de.locallang.xlf (1)

3-3: LGTM: Consistent fixture update for German target language.

The addition of target-language="de" attribute is consistent with the parser refactoring goals and properly specifies German as the target language for this success test fixture.

tests/src/Fixtures/translations/xliff/success/fr.locallang.xlf (1)

3-3: LGTM: French target language fixture properly configured.

The addition of target-language="fr" attribute correctly specifies French as the target language, demonstrating the parser's support for multiple target languages in the refactored implementation.

tests/src/Fixtures/translations/xliff/fail/de.locallang.xlf (1)

3-3: LGTM: Failure test fixture properly updated.

The addition of target-language="de" attribute is consistent with the parser refactoring and properly configures this failure test fixture to specify German as the target language.

tests/src/Fixtures/translations/xliff/success/de.locallang_be.xlf (1)

3-3: LGTM: Backend-specific German fixture properly configured.

The addition of target-language="de" attribute is consistent with the parser refactoring and properly configures this backend-specific German translation fixture.

src/Parser/ParserInterface.php (1)

21-21: LGTM! Interface simplification improves API clarity.

Removing the unused $attribute parameter from the getContentByKey method signature is a good simplification. Based on the relevant code snippets, the XLIFF parser now handles attribute selection internally, while other parsers (JSON, PHP, YAML) never used this parameter.

tests/src/Validator/PlaceholderConsistencyValidatorTest.php (2)

26-29: LGTM! Mock return map correctly updated for new method signature.

The mock return map has been properly updated to reflect the simplified getContentByKey method signature, removing the unused 'source' attribute parameter from the return value mappings.


419-422: LGTM! Mock return maps consistently updated.

The mock return maps in the complex scenario test have been correctly updated to match the simplified getContentByKey method signature, maintaining consistency with the interface changes.

Also applies to: 427-430

tests/src/Validator/AbstractValidatorTest.php (1)

81-84: LGTM! Test stub correctly updated to match interface.

The method signature has been properly updated to match the simplified ParserInterface. The static analysis hint about the unused $key parameter is expected behavior for a test stub implementation that simply returns null.

tests/src/Validator/DuplicateValuesValidatorTest.php (1)

32-34: LGTM! Test mocks correctly updated for simplified method signature.

The willReturnMap arrays have been properly updated to remove the unused 'source' parameter, correctly aligning with the simplified getContentByKey(string $key) method signature.

Also applies to: 58-60, 257-259

tests/src/Validator/EmptyValuesValidatorTest.php (1)

25-27: LGTM! Comprehensive test mock updates correctly align with simplified interface.

All willReturnMap arrays have been consistently updated across multiple test methods to remove the unused 'source' parameter, properly reflecting the simplified getContentByKey(string $key) method signature.

Also applies to: 45-47, 65-66, 84-87, 245-249

tests/src/Result/ValidationRunTest.php (1)

278-281: LGTM! Mock parser signature correctly updated.

The method signature has been properly updated to align with the simplified ParserInterface::getContentByKey(string $key) method.

src/Parser/XliffParser.php (3)

48-48: LGTM: Method signature properly simplified

The method signature now correctly matches the ParserInterface definition, removing the unused $attribute parameter and aligning with other parser implementations.


50-50: Good approach: Automatic attribute determination

Using hasTargetLanguage() to automatically determine whether to prioritize 'target' or 'source' is a logical approach that simplifies the API while maintaining functionality.


100-103: LGTM: Clean helper method implementation

The hasTargetLanguage() method is well-implemented, focused, and provides a clear abstraction for determining the presence of a target language attribute.

tests/src/Parser/XliffParserTest.php (4)

51-72: LGTM: Comprehensive target language fixture

The new fixture file properly includes the target-language="de" attribute and provides good test data for verifying the enhanced fallback logic, including scenarios with empty target content.


153-156: LGTM: Method calls correctly updated

The test method calls have been properly updated to use the simplified getContentByKey(string $key) signature, removing the unused $attribute parameter.


159-167: LGTM: Excellent test coverage for target language behavior

This test properly verifies the new automatic behavior:

  • Returns target content when available
  • Falls back to source content when target is empty (key3)
  • Returns null for non-existent keys

The test effectively validates the core functionality of the simplified method.


255-319: LGTM: Comprehensive edge case coverage

The additional test methods provide excellent coverage of edge cases:

  • testGetContentByKeyFallsBackToTargetWhenSourceIsEmpty: Tests fallback in source-primary files
  • testGetContentByKeyFallsBackToSourceWhenTargetIsEmptyInTargetLanguageFile: Tests fallback in target-primary files
  • testGetContentByKeyReturnsNullWhenBothSourceAndTargetAreEmpty: Tests behavior when both are empty

These tests ensure the fallback logic works correctly in all scenarios and provide confidence in the implementation.

.php-cs-fixer.php (1)

16-16: Confirm setUnsupportedPhpVersionAllowed() exists in the locked php-cs-fixer version

The helper was introduced in php-cs-fixer v3.39. Because composer.json only constrains the dependency to ^3.52, that should be safe – as long as everybody already ran composer update.
If a contributor still has an older lock file, the call will trigger a fatal error at runtime.

-    ->setUnsupportedPhpVersionAllowed(true)
+    ->setUnsupportedPhpVersionAllowed(true) // requires php-cs-fixer ≥ 3.39

Please verify the project’s composer.lock (and CI) really resolves to ≥ 3.39, otherwise bump the constraint or add an explicit minimum.

"fix:composer": "@composer normalize",
"fix:editorconfig": "@lint:editorconfig --fix",
"fix:php": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix",
"fix:php": "php-cs-fixer fix",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Dropping the PHP_CS_FIXER_IGNORE_ENV safeguard might break on unsupported runtimes

The new config flag should supersede the env-var, but php-cs-fixer aborts before reading the config when the running PHP version is too new/old (< 7.4 or > current supported). In such a scenario the script will exit before setUnsupportedPhpVersionAllowed(true) can take effect.

Consider keeping the environment override for full backward-compatibility, or document the minimum php-cs-fixer version required for this workflow.

-        "fix:php": "php-cs-fixer fix",
+        "fix:php": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix",

(or leave as-is but make sure CI never runs with an unsupported PHP version).


🏁 Script executed:

#!/bin/bash
echo "php-cs-fixer constraint in composer.json:"
rg -n '"friendsofphp/php-cs-fixer"' composer.json

echo ""
echo "Nearby lines around require-dev block:"
rg -n '"require-dev"' -n -A10 composer.json

echo ""
echo "Listing php-cs-fixer config files in repo:"
fd -I ".php-cs-fixer" -t f || echo "No php-cs-fixer config found"

Length of output: 909


🏁 Script executed:

#!/bin/bash
echo "Searching for setUnsupportedPhpVersionAllowed occurrences:"
rg -n "setUnsupportedPhpVersionAllowed" || echo "None found"

echo ""
echo "Listing potential php-cs-fixer config files:"
fd --hidden -t f -e php \
    -g ".php-cs-fixer.php" \
    -g "php-cs-fixer.php" \
    -g ".php-cs-fixer.dist.php" \
    -g ".php_cs.dist" \
    -g ".php_cs" || echo "None found"

Length of output: 744


Re-introduce the PHP_CS_FIXER_IGNORE_ENV safeguard for unsupported PHP versions

Without a project‐level php-cs-fixer config, php-cs-fixer will abort before reading any setUnsupportedPhpVersionAllowed(true) call on a too-new/old PHP runtime. Re-adding the env override ensures backward-compatibility:

File: composer.json (line 69)

-        "fix:php": "php-cs-fixer fix",
+        "fix:php": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix",

Alternatively, you can:

  • Add a .php-cs-fixer.php config file at the repo root that calls setUnsupportedPhpVersionAllowed(true).
  • Or document and enforce the minimum/maximum PHP version in CI to match php-cs-fixer ^3.52.
📝 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
"fix:php": "php-cs-fixer fix",
"fix:php": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix",
🤖 Prompt for AI Agents
In composer.json at line 69, re-add the PHP_CS_FIXER_IGNORE_ENV environment
variable safeguard to the "fix:php" script to prevent php-cs-fixer from aborting
on unsupported PHP versions. Modify the script to include this environment
variable before the php-cs-fixer command, ensuring backward compatibility
without requiring a project-level config or strict PHP version enforcement in
CI.

@konradmichalik konradmichalik merged commit 86af034 into main Jul 17, 2025
28 checks passed
@konradmichalik konradmichalik deleted the xliff-target-language-fix branch July 28, 2025 17:13
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