Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
f3d2007
Install phpcq-2
discordier Feb 28, 2022
6266061
Improve coding style and fix issues
discordier Mar 2, 2022
5a3fadc
use phpcq-2 branch from xliff
discordier Mar 2, 2022
b4eac30
Add github diagnostics
discordier Mar 2, 2022
e238465
Update diagnostics configuration
discordier Mar 2, 2022
330b8b5
Remove obsolete travis stuff
discordier Mar 2, 2022
b81451f
Drop Symfony 3.4 and cleanup issues for minimum requirements
discordier Mar 2, 2022
ae412d8
Do not pass null for exception code
discordier Mar 2, 2022
21b13de
Fix test
discordier Mar 2, 2022
4f1119f
Fix composer.json for PHP 8
zonky2 Mar 23, 2024
8906ff2
Fix diagnostics for minimum dependencies
zonky2 Mar 25, 2024
62877da
Fix trusted keys
zonky2 Mar 25, 2024
6d781e2
Fix composer dependecies
zonky2 Mar 25, 2024
1b834cf
Fix kernel.root_dir to kernel.project_dir
zonky2 Mar 25, 2024
aa7a9db
Fix path kernel.project_dir
zonky2 Mar 27, 2024
d57243c
Merge pull request #2 from zonky2/fix/phpcq-2
discordier Mar 27, 2024
c3ba71e
Bump dependencies and fix psalm issues
discordier Apr 24, 2024
9c83889
Ignore psalm message that Generator is not iterable
discordier Apr 24, 2024
090634b
Suppress UnnecessaryVarAnnotation for needed @var
discordier Apr 24, 2024
8b2bfce
Allow symfony 7
discordier Apr 24, 2024
7a0d400
Bump gh actions and update artifacts/cache keys
discordier Apr 24, 2024
434d327
Add dependabot workflow
discordier Sep 24, 2025
3e6f4f5
Reformat .gitignore
discordier Sep 24, 2025
4584aa7
Add gpg key for phpcs and update tools in php 8.1
discordier Sep 24, 2025
ebe4ba5
Move several non base classes from i18n
discordier Sep 24, 2025
b1a2528
Allow mocking of finals in tests
discordier Sep 24, 2025
c89953c
Add Override attributes
discordier Sep 24, 2025
9db5dce
Mark api interface with @api
discordier Sep 25, 2025
458ecbc
Mark IdProvidingServiceLocator as internal
discordier Sep 25, 2025
45eaf7f
Add proper string casting
discordier Sep 25, 2025
7ee20aa
Also allow composer-require-checker in versioin 4.x
discordier Sep 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .composer-require-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"symbol-whitelist" : [
"null", "true", "false",
"self", "parent",
"array", "string", "int", "float", "bool", "iterable", "callable", "void", "object",
"CyberSpectrum\\I18N\\Xliff\\XliffDictionaryDefinitionBuilder",
"CyberSpectrum\\I18N\\Xliff\\XliffDictionaryProvider"
]
}
8 changes: 4 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.check-author.yml export-ignore
.gitattributes export-ignore
.github export-ignore
.gitignore export-ignore
.travis.yml export-ignore
build.default.properties export-ignore
build.xml export-ignore
.phpcq.* export-ignore
.phpmd.xml
.phpunit.result.cache
phpunit.xml.dist export-ignore
psalm.xml export-ignore
/tests export-ignore
21 changes: 21 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2

updates:
- commit-message:
include: "scope"
prefix: "composer"
directory: "/"
open-pull-requests-limit: 10
package-ecosystem: "composer"
schedule:
interval: "weekly"
versioning-strategy: "increase"

- commit-message:
include: "scope"
prefix: "github-actions"
directory: "/"
open-pull-requests-limit: 10
package-ecosystem: "github-actions"
schedule:
interval: "weekly"
81 changes: 81 additions & 0 deletions .github/workflows/diagnostics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: cyberspectrum/i18n-bundle

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest

name: PHP ${{ matrix.php }}

strategy:
fail-fast: false
matrix:
include:
- php: '8.1'
phpcq_install: 'install'
phpcq_flags: ''
composer_install: 'update --prefer-lowest'
- php: '8.1'
phpcq_install: 'update'
phpcq_flags: ''
composer_install: 'update'
- php: '8.2'
phpcq_install: 'update'
phpcq_flags: ''
composer_install: 'update'
- php: '8.3'
phpcq_install: 'update'
phpcq_flags: ''
composer_install: 'update'

steps:
- name: PHP ${{ matrix.php }} Pull source
uses: actions/checkout@v4
with:
fetch-depth: 0

# see https://github.com/shivammathur/setup-php
- name: PHP ${{ matrix.php }} Setup PHP.
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}

- name: PHP ${{ matrix.php }} Cache composer cache directory
uses: actions/cache@v4
env:
cache-name: composer-cache-dir-${{ matrix.php }}
with:
path: ~/.cache/composer
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.phpcq_install }}-${{ matrix.phpcq_flags }}-${{ matrix.composer_install }}

- name: PHP ${{ matrix.php }} Cache vendor directory
uses: actions/cache@v4
env:
cache-name: composer-vendor-${{ matrix.php }}
with:
path: vendor
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-

- name: PHP ${{ matrix.php }} Install composer dependencies
run: composer ${{ matrix.composer_install }} --prefer-stable --no-interaction --no-progress

- name: PHP ${{ matrix.php }} Update phpcq
run: ./vendor/bin/phpcq self-update --unsigned

- name: PHP ${{ matrix.php }} Install phpcq toolchain
run: ./vendor/bin/phpcq ${{ matrix.phpcq_install }} -v

- name: PHP ${{ matrix.php }} Run tests
run: ./vendor/bin/phpcq run -v -o github-action -o default ${{ matrix.phpcq_flags }}

- name: PHP ${{ matrix.php }} Upload build directory to artifact
uses: actions/upload-artifact@v4
if: ${{ success() }} || ${{ failure() }}
with:
name: phpcq-builds-php-${{ matrix.php }}-${{ matrix.phpcq_install }}-${{ matrix.phpcq_flags }}-${{ matrix.composer_install }}
path: .phpcq/build/
13 changes: 7 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
vendor/
composer.lock
/vendor/
/composer.lock

build/
build.properties
phpunix.xml
.phpunit.result.cache
/.phpcq/*
/phpunit.xml
/.phpunit.result.cache
/.cache/*
/.pdepend/*
1 change: 1 addition & 0 deletions .phpcq.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"plugins":{"phpunit":{"api-version":"1.0.0","version":"1.0.0.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/phpunit/phpunit-1.0.0.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0"},"tool":{"phpunit":"^6.0 || ^7.0 || ^8.0 || ^9.0"}},"checksum":{"type":"sha-512","value":"c73f15658e3ba62665f09492ec91c3a6a715760bfaa88473a987538439fff442540148e086e46a6aa18ce55a3ea2fbf76caaa581384cb84a38859fcc609ae7e4"},"tools":{"phpunit":{"version":"9.6.29","url":"https://phar.phpunit.de/phpunit-9.6.29.phar","requirements":{"php":{"php":">=7.3","ext-dom":"*","ext-json":"*","ext-libxml":"*","ext-mbstring":"*","ext-xml":"*","ext-xmlwriter":"*"}},"checksum":{"type":"sha-256","value":"04aeb9aa94da2912a9d1ddfaa047bfb7a87ac74735d3f7d61585b47900ede2d7"},"signature":"https://phar.phpunit.de/phpunit-9.6.29.phar.asc"}},"composerLock":null},"psalm":{"api-version":"1.0.0","version":"1.3.0.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/psalm/psalm-1.3.0.0.php","signature":null,"requirements":{"php":{"php":"^7.4 || ^8.0","ext-dom":"*"},"tool":{"psalm":"^3.0 || ^4.0 || ^5.0 || ^6.0"}},"checksum":{"type":"sha-512","value":"4a550c9226d7bca582d7c10bd87cce01190c96398936b1613421640c83df62ed1c6e0d44c1b39635414ea8cf4a892a6458d27590793238add24e7cb5547e6ffd"},"tools":{"psalm":{"version":"6.7.1","url":"https://github.com/vimeo/psalm/releases/download/6.7.1/psalm.phar","requirements":{"php":{"php":"~8.1.31 || ~8.2.27 || ~8.3.16 || ~8.4.3","ext-SimpleXML":"*","ext-ctype":"*","ext-dom":"*","ext-json":"*","ext-libxml":"*","ext-mbstring":"*","ext-tokenizer":"*"}},"checksum":null,"signature":"https://github.com/vimeo/psalm/releases/download/6.7.1/psalm.phar.asc"}},"composerLock":null},"composer-require-checker":{"api-version":"1.0.0","version":"1.1.1.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/composer-require-checker/composer-require-checker-1.1.1.0.php","signature":null,"requirements":{"php":{"php":"^7.4 || ^8.0"},"tool":{"composer-require-checker":"^3.8 || ^4.0"}},"checksum":{"type":"sha-512","value":"d5415bddfe024c5749d894034583882aee4e5c3e1087815d9fdd81cb5e71630f631a0e35de0ff84b97fbbf738c16ece5f83bd8c00695913eb846aa6f04577dc2"},"tools":{"composer-require-checker":{"version":"3.8.0","url":"https://github.com/maglnet/ComposerRequireChecker/releases/download/3.8.0/composer-require-checker.phar","requirements":{"php":{"php":"^7.4 || ^8.0","ext-json":"*","ext-phar":"*"}},"checksum":null,"signature":"https://github.com/maglnet/ComposerRequireChecker/releases/download/3.8.0/composer-require-checker.phar.asc"}},"composerLock":null},"phpmd":{"api-version":"1.0.0","version":"1.0.2.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/phpmd/phpmd-1.0.2.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*"},"tool":{"phpmd":"^2.6.1"}},"checksum":{"type":"sha-512","value":"f22280a6dec8dbdd2ec1d83b294f23237fe32c34f4a298e52038e0a7a0074d541635b2b488b1a6098a42d8418a6cd8eb804406ea82b91e362be2b5d11a0915b0"},"tools":{"phpmd":{"version":"2.15.0","url":"https://github.com/phpmd/phpmd/releases/download/2.15.0/phpmd.phar","requirements":{"php":{"php":">=5.3.9","ext-xml":"*"}},"checksum":null,"signature":"https://github.com/phpmd/phpmd/releases/download/2.15.0/phpmd.phar.asc"}},"composerLock":null},"phpcpd":{"api-version":"1.0.0","version":"1.1.1.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/phpcpd/phpcpd-1.1.1.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*"},"tool":{"phpcpd":"^6.0"}},"checksum":{"type":"sha-512","value":"1189ce0bf3fade4cb4241f1d96f915ef8fc7651f4450dc79fdf464ee3d6be3009316f0d423ce2d4af9d76ad50807b7fdf4d77bfa6d9ee2c91d6eda32ea214433"},"tools":{"phpcpd":{"version":"6.0.3","url":"https://phar.phpunit.de/phpcpd-6.0.3.phar","requirements":{"php":{"php":">=7.3","ext-dom":"*"}},"checksum":{"type":"sha-256","value":"2cbaea7cfda1bb4299d863eb075e977c3f49055dd16d88529fae5150d48a84cb"},"signature":"https://phar.phpunit.de/phpcpd-6.0.3.phar.asc"}},"composerLock":null},"phploc":{"api-version":"1.0.0","version":"1.0.0.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/phploc/phploc-1.0.0.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*","ext-json":"*"},"tool":{"phploc":"^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0"}},"checksum":{"type":"sha-512","value":"f67b02d494796adf553cb3dd13ec06c1cb8e53c799954061749424251379541637538199afb3afa3c7a01cabd1cb6f1c53eb621f015dff9644c6c7cbf10c56d1"},"tools":{"phploc":{"version":"7.0.2","url":"https://phar.phpunit.de/phploc-7.0.2.phar","requirements":{"php":{"php":">=7.3","ext-dom":"*","ext-json":"*"}},"checksum":{"type":"sha-256","value":"3d59778ec86faf25fd00e3a329b2f9ad4a3c751ca91601ea7dab70f887b0bf46"},"signature":"https://phar.phpunit.de/phploc-7.0.2.phar.asc"}},"composerLock":null},"phpcs":{"api-version":"1.0.0","version":"1.2.0.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/phpcs/phpcs-1.2.0.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*"},"tool":{"phpcs":"^3.0 || ^2.0","phpcbf":"^3.0 || ^2.0"}},"checksum":{"type":"sha-512","value":"b6ed00306e76068a6af5e3b1dec837724f9e1900ef1049ce88e7ce195b0583524ca33a73613fba13244307a7ca853b6ddaa14ded69f651c3f184ac130bd1aaad"},"tools":{"phpcs":{"version":"3.13.4","url":"https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/download/3.13.4/phpcs.phar","requirements":{"php":{"php":">=5.4.0","ext-simplexml":"*","ext-tokenizer":"*","ext-xmlwriter":"*"}},"checksum":null,"signature":"https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/download/3.13.4/phpcs.phar.asc"},"phpcbf":{"version":"3.13.4","url":"https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/download/3.13.4/phpcbf.phar","requirements":{"php":{"php":">=5.4.0","ext-simplexml":"*","ext-tokenizer":"*","ext-xmlwriter":"*"}},"checksum":null,"signature":"https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/download/3.13.4/phpcbf.phar.asc"}},"composerLock":null},"composer-normalize":{"api-version":"1.0.0","version":"1.1.1.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/composer-normalize/composer-normalize-1.1.1.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-json":"*"},"tool":{"composer-normalize":"^2.1"}},"checksum":{"type":"sha-512","value":"d9abda440b85d501c58abf9c81bf76f417594b397129215ffa8b777e9bb5e5eda37d7661d661db3c8d11c24f20345bc6fbe56f013b3b9435d459d2b94f086e0f"},"tools":{"composer-normalize":{"version":"2.48.2","url":"https://github.com/ergebnis/composer-normalize/releases/download/2.48.2/composer-normalize.phar","requirements":{"php":{"php":"~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0","ext-json":"*"}},"checksum":null,"signature":"https://github.com/ergebnis/composer-normalize/releases/download/2.48.2/composer-normalize.phar.asc"}},"composerLock":null}},"tools":[]}
117 changes: 117 additions & 0 deletions .phpcq.yaml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
phpcq:
repositories:
- https://phpcq.github.io/repository/repository.json
directories:
- src
- tests
artifact: .phpcq/build

plugins:
phpunit:
version: ^1.0
signed: false
psalm:
version: ^1.0
signed: false
composer-require-checker:
version: ^1.0
signed: false
requirements:
composer-require-checker:
signed: false
version: ^3.3 || ^4.16
phpmd:
version: ^1.0
signed: false
requirements:
phpmd:
signed: false
phpcpd:
version: ^1.0
signed: false
requirements:
phpcpd:
version: ^6.0
phploc:
version: ^1.0
signed: false
phpcs:
version: ^1.0
signed: false
composer-normalize:
version: ^1.0
signed: false
trusted-keys:
# [email protected]
- 4AA394086372C20A
# psalm
- 8A03EA3B385DBAA1
- 12CE0F1D262429A5
# [email protected]
- D2CCAC42F6295E7D
# PHP_CodeSniffer
- 31C7E470E2138192
- 5E6DDE998AB73B8E
- 97B02DD8E5071466
# Composer normalize
- C00543248C87FB13
# phpmd
- 0F9684B8B16B7AB0
- 9093F8B32E4815AA
# composer-require-checker
- 033E5F8D801A2F8D

tasks:
fix:
- composer-normalize-fix
- phpcbf
verify:
- composer-require-checker
- composer-normalize
analyze:
- phploc
- phpcpd
- phpmd
- phpcs
- psalm
- phpunit
default:
- composer-require-checker
- composer-normalize
- phploc
# currently breaks due to incompatible plugin. :/
#- phpcpd
- phpmd
- phpcs
- psalm
- phpunit
phpcpd:
plugin: phpcpd

phpmd:
plugin: phpmd
config:
ruleset:
- ./.phpmd.xml

composer-normalize-fix:
plugin: composer-normalize
config:
dry_run: false

composer-require-checker:
plugin: composer-require-checker
config:
config_file: '.composer-require-checker.json'

phpcs:
plugin: phpcs
config: &phpcs-config
standard: PSR12
custom_flags:
- '--extensions=php'

phpcbf:
plugin: phpcs
config:
<<: *phpcs-config
37 changes: 37 additions & 0 deletions .phpmd.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0"?>
<ruleset name="PHPMD rule set"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation=" http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>
PHPMD rule set
</description>

<rule ref="rulesets/codesize.xml"/>
<rule ref="rulesets/controversial.xml">
<exclude name="CamelCaseVariableName"/>
</rule>
<rule ref="rulesets/controversial.xml/CamelCaseVariableName">
<properties>
<property name="allow-underscore" value="true"/>
</properties>
</rule>
<rule ref="rulesets/design.xml"/>
<rule ref="rulesets/naming.xml">
<exclude name="ShortVariable" />
</rule>
<rule ref="rulesets/naming.xml/ShortVariable">
<properties>
<property name="exceptions" value="id" />
</properties>
</rule>
<rule ref="rulesets/unusedcode.xml">
<exclude name="UnusedLocalVariable"/>
</rule>
<rule ref="rulesets/unusedcode.xml/UnusedLocalVariable">
<properties>
<property name="allow-unused-foreach-variables" value="true"/>
</properties>
</rule>
</ruleset>
46 changes: 0 additions & 46 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# i18n-bundle

[![Build Status](https://travis-ci.org/cyberspectrum/i18n-bundle.png)](https://travis-ci.org/cyberspectrum/i18n-bundle)
[![Code Quality Diagnostics](https://github.com/cyberspectrum/i18n-bundle/actions/workflows/diagnostics.yml/badge.svg)](https://github.com/cyberspectrum/i18n-bundle/actions/workflows/diagnostics.yml)
[![Latest Version tagged](http://img.shields.io/github/tag/cyberspectrum/i18n-bundle.svg)](https://github.com/cyberspectrum/i18n-bundle/tags)
[![Latest Version on Packagist](http://img.shields.io/packagist/v/cyberspectrum/i18n-bundle.svg)](https://packagist.org/packages/cyberspectrum/i18n-bundle)

Expand Down
34 changes: 0 additions & 34 deletions build.default.properties

This file was deleted.

Loading