Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge release 2.0.5 into 2.1.x #203

Merged
merged 8 commits into from
Sep 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
phpunit.xml.dist export-ignore
phpcs.xml.dist export-ignore
composer.lock export-ignore
phpstan.neon.dist export-ignore
psalm.xml export-ignore
4 changes: 3 additions & 1 deletion .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ on:
jobs:
coding-standards:
name: "Coding Standards"
uses: "doctrine/.github/.github/workflows/[email protected]"
uses: "doctrine/.github/.github/workflows/[email protected]"
with:
php-version: '8.1'
4 changes: 3 additions & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ jobs:

phpunit:
name: "PHPUnit"
uses: "doctrine/.github/.github/workflows/[email protected]"
uses: "doctrine/.github/.github/workflows/[email protected]"
with:
php-versions: '["7.2", "7.3", "7.4", "8.0", "8.1"]'
3 changes: 1 addition & 2 deletions .github/workflows/release-on-milestone-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ on:
jobs:
release:
name: "Git tag, release & create merge-up PR"
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@1.1.1"
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@1.5.1"
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
ORGANIZATION_ADMIN_TOKEN: ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ on:
jobs:
static-analysis-phpstan:
name: "Static Analysis"
uses: "doctrine/.github/.github/workflows/[email protected]"
uses: "doctrine/.github/.github/workflows/[email protected]"
with:
php-version: "8.1"
17 changes: 11 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
"php": "^7.2 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^8.2",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpstan/phpstan-strict-rules": "^0.12",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
"vimeo/psalm": "^4.10"
"doctrine/coding-standard": "^9",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-phpunit": "^1.1",
"phpstan/phpstan-strict-rules": "^1.3",
"phpunit/phpunit": "^8.5 || ^9.5",
"vimeo/psalm": "^4.25"
},
"autoload": {
"psr-4": {
Expand All @@ -32,5 +32,10 @@
"psr-4": {
"Doctrine\\Tests\\Inflector\\": "tests/Doctrine/Tests/Inflector"
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
3 changes: 3 additions & 0 deletions lib/Doctrine/Inflector/Rules/English/Inflectible.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public static function getSingular(): iterable
yield new Transformation(new Pattern('(f)eet$'), '\1oot');
yield new Transformation(new Pattern('(n)ews$'), '\1\2ews');
yield new Transformation(new Pattern('eaus$'), 'eau');
yield new Transformation(new Pattern('^tights$'), 'tights');
yield new Transformation(new Pattern('^shorts$'), 'shorts');
yield new Transformation(new Pattern('s$'), '');
}

Expand Down Expand Up @@ -99,6 +101,7 @@ public static function getIrregular(): iterable
yield new Substitution(new Word('atlas'), new Word('atlases'));
yield new Substitution(new Word('axe'), new Word('axes'));
yield new Substitution(new Word('beef'), new Word('beefs'));
yield new Substitution(new Word('blouse'), new Word('blouses'));
yield new Substitution(new Word('brother'), new Word('brothers'));
yield new Substitution(new Word('cafe'), new Word('cafes'));
yield new Substitution(new Word('chateau'), new Word('chateaux'));
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/Inflector/Rules/English/Uninflected.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ private static function getDefault(): iterable
yield new Pattern('butter');
yield new Pattern('cantus');
yield new Pattern('carp');
yield new Pattern('cattle');
yield new Pattern('chassis');
yield new Pattern('clippers');
yield new Pattern('clothing');
Expand Down Expand Up @@ -111,6 +112,7 @@ private static function getDefault(): iterable
yield new Pattern('jackanapes');
yield new Pattern('jeans');
yield new Pattern('jedi');
yield new Pattern('kin');
yield new Pattern('kiplingese');
yield new Pattern('knowledge');
yield new Pattern('kongoese');
Expand Down
2 changes: 2 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<!-- Ignore warnings, show progress of the run and show sniff names -->
<arg value="nps"/>

<config name="php_version" value="70200"/>

<file>lib</file>
<file>tests</file>

Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ parameters:
- lib
- tests

excludes_analyse:
excludePaths:
- %rootDir%/../../../tests/Doctrine/Tests/Common/*
1 change: 1 addition & 0 deletions tests/Doctrine/Tests/Inflector/InflectorFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function testCreateUsesEnglishByDefault(): void

/**
* @phpstan-param class-string<LanguageInflectorFactory> $expectedClass
*
* @dataProvider provideLanguages
*/
public function testCreateForLanguageWithCustomLanguage(string $expectedClass, string $language): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public function dataSampleWords(): array
['baggage', 'baggage'],
['basis', 'bases'],
['bison', 'bison'],
['blouse', 'blouses'],
['borghese', 'borghese'],
['box', 'boxes'],
['bream', 'bream'],
Expand All @@ -66,6 +67,7 @@ public function dataSampleWords(): array
['cantus', 'cantus'],
['canvas', 'canvases'],
['carp', 'carp'],
['cattle', 'cattle'],
['case', 'cases'],
['categoria', 'categorias'],
['category', 'categories'],
Expand Down Expand Up @@ -202,6 +204,7 @@ public function dataSampleWords(): array
['jeans', 'jeans'],
['jeans', 'jeans'],
['jedi', 'jedi'],
['kin', 'kin'],
['kiplingese', 'kiplingese'],
['kitchenware', 'kitchenware'],
['kiss', 'kisses'],
Expand Down Expand Up @@ -350,6 +353,7 @@ public function dataSampleWords(): array
['shelf', 'shelves'],
['shoe', 'shoes'],
['shoe', 'shoes'],
['shorts', 'shorts'],
['siemens', 'siemens'],
['silk', 'silk'],
['sku', 'skus'],
Expand Down Expand Up @@ -391,6 +395,7 @@ public function dataSampleWords(): array
['testis', 'testes'],
['thesis', 'theses'],
['Thief', 'Thieves'],
['tights', 'tights'],
['tomato', 'tomatoes'],
['tomato', 'tomatoes'],
['tooth', 'teeth'],
Expand Down