Skip to content

Commit

Permalink
Merge branch 'master' into feature/php-8-4
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik authored Dec 25, 2024
2 parents 09d40a4 + 50dcaa5 commit cbbe39c
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 50 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.scrutinizer.yml export-ignore
/phpunit.xml.dist export-ignore
/tests export-ignore
/docs export-ignore
Expand Down
23 changes: 21 additions & 2 deletions .github/workflows/bc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
on:
- pull_request
- push
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'phpunit.xml.dist'
- 'psalm.xml'
push:
branches: ['master']
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'phpunit.xml.dist'
- 'psalm.xml'

name: backwards compatibility

Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- 'psalm.xml'

push:
branches: ['master']
paths-ignore:
- 'docs/**'
- 'README.md'
Expand All @@ -24,20 +25,24 @@ name: build
jobs:
phpunit:
uses: yiisoft/actions/.github/workflows/phpunit.yml@master
secrets:
codecovToken: ${{ secrets.CODECOV_TOKEN }}
with:
extensions: :intl
coverage: xdebug
os: >-
['ubuntu-latest', 'windows-latest']
php: >-
['8.0', '8.1']
['8.0', '8.1', '8.2', '8.3']
phpunit-with-intl:
uses: yiisoft/actions/.github/workflows/phpunit.yml@master
secrets:
codecovToken: ${{ secrets.CODECOV_TOKEN }}
with:
phpunitConfig: phpunit-with-intl.xml
extensions: intl
coverage: xdebug
os: >-
['ubuntu-latest', 'windows-latest']
php: >-
['8.0', '8.1']
['8.0', '8.1', '8.2', '8.3']
4 changes: 2 additions & 2 deletions .github/workflows/composer-require-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- 'psalm.xml'

push:
branches: ['master']
paths-ignore:
- 'docs/**'
- 'README.md'
Expand All @@ -27,8 +28,7 @@ jobs:
composer-require-checker:
uses: yiisoft/actions/.github/workflows/composer-require-checker.yml@master
with:
config: ./composer-require-checker.json
os: >-
['ubuntu-latest']
php: >-
['8.1']
['8.1', '8.2', '8.3']
3 changes: 2 additions & 1 deletion .github/workflows/mutation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- 'psalm.xml'

push:
branches: ['master']
paths-ignore:
- 'docs/**'
- 'README.md'
Expand All @@ -28,6 +29,6 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.1']
['8.2']
secrets:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
7 changes: 5 additions & 2 deletions .github/workflows/rector.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
on:
pull_request:
pull_request_target:
paths-ignore:
- 'docs/**'
- 'README.md'
Expand All @@ -14,8 +14,11 @@ name: rector
jobs:
rector:
uses: yiisoft/actions/.github/workflows/rector.yml@master
secrets:
token: ${{ secrets.YIISOFT_GITHUB_TOKEN }}
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
os: >-
['ubuntu-latest']
php: >-
['8.0']
['8.3']
35 changes: 0 additions & 35 deletions .scrutinizer.yml

This file was deleted.

9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
<br>
</p>

[![Latest Stable Version](https://poser.pugx.org/yiisoft/translator/v/stable.png)](https://packagist.org/packages/yiisoft/translator)
[![Total Downloads](https://poser.pugx.org/yiisoft/translator/downloads.png)](https://packagist.org/packages/yiisoft/translator)
[![Build Status](https://github.com/yiisoft/translator/workflows/build/badge.svg)](https://github.com/yiisoft/translator/actions)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/yiisoft/translator/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/yiisoft/translator/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/yiisoft/translator/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/yiisoft/translator/?branch=master)
[![Latest Stable Version](https://poser.pugx.org/yiisoft/translator/v)](https://packagist.org/packages/yiisoft/translator)
[![Total Downloads](https://poser.pugx.org/yiisoft/translator/downloads)](https://packagist.org/packages/yiisoft/translator)
[![Build status](https://github.com/yiisoft/translator/actions/workflows/build.yml/badge.svg)](https://github.com/yiisoft/translator/actions/workflows/build.yml)
[![Code Coverage](https://codecov.io/gh/yiisoft/translator/branch/master/graph/badge.svg)](https://codecov.io/gh/yiisoft/translator)
[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fyiisoft%2Ftranslator%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/yiisoft/translator/master)
[![static analysis](https://github.com/yiisoft/translator/workflows/static%20analysis/badge.svg)](https://github.com/yiisoft/translator/actions?query=workflow%3A%22static+analysis%22)
[![type-coverage](https://shepherd.dev/github/yiisoft/translator/coverage.svg)](https://shepherd.dev/github/yiisoft/translator)
Expand Down
11 changes: 11 additions & 0 deletions src/SimpleMessageFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,19 @@

class SimpleMessageFormatter implements MessageFormatterInterface
{
/**
* @psalm-suppress MissingClassConstType
*/
private const PLURAL_ONE = 'one';

/**
* @psalm-suppress MissingClassConstType
*/
private const PLURAL_OTHER = 'other';

/**
* @psalm-suppress MissingClassConstType
*/
private const PLURAL_KEYS = [self::PLURAL_ONE, self::PLURAL_OTHER];

public function format(string $message, array $parameters, string $locale = 'en-US'): string
Expand Down

0 comments on commit cbbe39c

Please sign in to comment.