Skip to content

Commit

Permalink
chore(deps): allow symfony/console and symfony/process ^6.0 (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramsey authored Aug 23, 2023
1 parent 72e6e3b commit ee14c6a
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 61 deletions.
34 changes: 16 additions & 18 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout repository"
uses: "actions/checkout@v3.0.2"
uses: "actions/checkout@v3.5.3"

- name: "Install PHP"
uses: "shivammathur/setup-php@2.21.2"
uses: "shivammathur/setup-php@2.25.5"
with:
php-version: "latest"
extensions: "intl-70.1"
extensions: "intl-73.2"
coverage: "none"

- name: "Install dependencies (Composer)"
Expand All @@ -50,13 +50,13 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout repository"
uses: "actions/checkout@v3.0.2"
uses: "actions/checkout@v3.5.3"

- name: "Install PHP"
uses: "shivammathur/setup-php@2.21.2"
uses: "shivammathur/setup-php@2.25.5"
with:
php-version: "latest"
extensions: "intl-70.1"
extensions: "intl-73.2"
coverage: "none"

- name: "Install dependencies (Composer)"
Expand All @@ -74,13 +74,13 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout repository"
uses: "actions/checkout@v3.0.2"
uses: "actions/checkout@v3.5.3"

- name: "Install PHP"
uses: "shivammathur/setup-php@2.21.2"
uses: "shivammathur/setup-php@2.25.5"
with:
php-version: "latest"
extensions: "intl-70.1"
extensions: "intl-73.2"
coverage: "none"

- name: "Install dependencies (Composer)"
Expand All @@ -100,13 +100,13 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout repository"
uses: "actions/checkout@v3.0.2"
uses: "actions/checkout@v3.5.3"

- name: "Install PHP"
uses: "shivammathur/setup-php@2.21.2"
uses: "shivammathur/setup-php@2.25.5"
with:
php-version: "latest"
extensions: "intl-70.1"
extensions: "intl-73.2"
coverage: "pcov"
ini-values: "memory_limit=-1"

Expand All @@ -131,22 +131,20 @@ jobs:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
dependencies:
- "lowest"
- "highest"
exclude:
- php-version: "8.1"
dependencies: "lowest"

steps:
- name: "Checkout repository"
uses: "actions/checkout@v3.0.2"
uses: "actions/checkout@v3.5.3"

- name: "Install PHP"
uses: "shivammathur/setup-php@2.21.2"
uses: "shivammathur/setup-php@2.25.5"
with:
php-version: "${{ matrix.php-version }}"
extensions: "intl-70.1"
extensions: "intl-73.2"
coverage: "none"

- name: "Install dependencies (Composer)"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<a href="https://packagist.org/packages/skillshare/formatphp"><img src="https://img.shields.io/packagist/v/skillshare/formatphp.svg?style=flat-square&label=release" alt="Download Package"></a>
<a href="https://php.net"><img src="https://img.shields.io/packagist/php-v/skillshare/formatphp.svg?style=flat-square&colorB=%238892BF" alt="PHP Programming Language"></a>
<a href="https://github.com/skillshare/formatphp/blob/main/LICENSE"><img src="https://img.shields.io/packagist/l/skillshare/formatphp.svg?style=flat-square&colorB=darkcyan" alt="Read License"></a>
<a href="https://github.com/skillshare/formatphp/actions/workflows/continuous-integration.yml"><img src="https://img.shields.io/github/workflow/status/skillshare/formatphp/build/main?style=flat-square&logo=github" alt="Build Status"></a>
<a href="https://github.com/skillshare/formatphp/actions/workflows/continuous-integration.yml"><img src="https://img.shields.io/github/actions/workflow/status/skillshare/formatphp/continuous-integration.yml?branch=main&style=flat-square&logo=github" alt="Build Status"></a>
<a href="https://codecov.io/gh/skillshare/formatphp"><img src="https://img.shields.io/codecov/c/gh/skillshare/formatphp?label=codecov&logo=codecov&style=flat-square" alt="Codecov Code Coverage"></a>
<a href="https://shepherd.dev/github/skillshare/formatphp"><img src="https://img.shields.io/endpoint?style=flat-square&url=https%3A%2F%2Fshepherd.dev%2Fgithub%2Fskillshare%2Fformatphp%2Fcoverage" alt="Psalm Type Coverage"></a>
</p>
Expand Down
10 changes: 6 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
"ext-intl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"myclabs/php-enum": "^1.8",
"myclabs/php-enum": "^1.8.4",
"nikic/php-parser": "^4.13",
"psr/log": "^1 || ^2",
"ramsey/collection": "^1.2",
"symfony/console": "^5.3",
"symfony/console": "^5.3 || ^6.0",
"symfony/polyfill-php80": "^1.23",
"symfony/process": "^5 || ~6.0.0",
"symfony/process": "^5 || ^6.0",
"webmozart/glob": "^4.4"
},
"require-dev": {
Expand All @@ -35,13 +35,15 @@
"ergebnis/composer-normalize": "^2.25",
"hamcrest/hamcrest-php": "^2.0",
"mdwheele/zalgo": "^0.3.1",
"mockery/mockery": "^1.5",
"mockery/mockery": "^1.6.6",
"myclabs/deep-copy": "^1.11",
"php-parallel-lint/php-console-highlighter": "^1.0",
"php-parallel-lint/php-parallel-lint": "^1.3",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "~1.8.0",
"phpstan/phpstan-mockery": "^1.0",
"phpstan/phpstan-phpunit": "^1.1",
"phpunit/phpunit": "^9.0",
"psalm/plugin-mockery": "^0.9.1",
"psalm/plugin-phpunit": "^0.17.0",
"ramsey/coding-standard": "^2.0.3",
Expand Down
1 change: 1 addition & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<exclude name="SlevomatCodingStandard.Classes.SuperfluousTraitNaming"/>

<!-- Ignore this for PHP 7.4 -->
<exclude name="SlevomatCodingStandard.Functions.RequireTrailingCommaInDeclaration"/>
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint"/>
</rule>

Expand Down
4 changes: 0 additions & 4 deletions src/Icu/MessageFormat/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,6 @@ private function parseLiteral(int $nestingLevel, string $parentArgType): Result
* level of the pattern. The new behavior is otherwise compatible.
*
* @param ArgType $parentArgType
*
* @throws Exception\InvalidOffsetException
* @throws Exception\InvalidUtf8CodeBoundaryException
* @throws Exception\InvalidUtf8CodePointException
*/
private function tryParseQuote(string $parentArgType): ?string
{
Expand Down
1 change: 0 additions & 1 deletion src/Icu/MessageFormat/Parser/Type/ElementType.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
* @method static ElementType Plural()
* @method static ElementType Pound()
* @method static ElementType Tag()
*
* @psalm-immutable
* @extends Enum<int>
*/
Expand Down
1 change: 0 additions & 1 deletion src/Icu/MessageFormat/Parser/Type/SkeletonType.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
*
* @method static SkeletonType Number()
* @method static SkeletonType DateTime()
*
* @psalm-immutable
* @extends Enum<int>
*/
Expand Down
12 changes: 6 additions & 6 deletions tests/FormatPHPTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public function testFormatDateWithOptions(): void

// Mon, 25 Oct 2021 23:34:12 +0000
$this->assertSame(
'Monday, October 25, 2021 at 11:34:12 PM UTC',
"Monday, October 25, 2021 at 11:34:12\xE2\x80\xAFPM UTC",
$formatphp->formatDate(1635204852, new DateTimeFormatOptions([
'dateStyle' => 'full',
'timeStyle' => 'long',
Expand Down Expand Up @@ -217,7 +217,7 @@ public function testFormatTime(): void
$formatphp = new FormatPHP($config, $messageCollection);

$this->assertSame(
'11:34 PM',
"11:34\xE2\x80\xAFPM",
$formatphp->formatTime('Mon, 25 Oct 2021 23:34:12 +0000'),
);
}
Expand All @@ -231,7 +231,7 @@ public function testFormatTimeWithOptions(): void

// Mon, 25 Oct 2021 23:34:12 +0000
$this->assertSame(
'11:34:12 PM',
"11:34:12\xE2\x80\xAFPM",
$formatphp->formatTime(1635204852, new DateTimeFormatOptions([
'second' => 'numeric',
])),
Expand All @@ -247,7 +247,7 @@ public function testFormatTimeWithTimeStyle(): void

// Mon, 25 Oct 2021 23:34:12 +0000
$this->assertSame(
'11:34:12 PM Coordinated Universal Time',
"11:34:12\xE2\x80\xAFPM Coordinated Universal Time",
$formatphp->formatTime(1635204852, new DateTimeFormatOptions([
'timeStyle' => 'full',
])),
Expand Down Expand Up @@ -284,7 +284,7 @@ public function testFormatTimeDoesNotModifyPassedDateTimeFormatOptionsInstance()
$this->assertNull($options->hour);
$this->assertNull($options->minute);

$this->assertSame('8:03 PM', $formatphp->formatTime($time, $options));
$this->assertSame("8:03\xE2\x80\xAFPM", $formatphp->formatTime($time, $options));

// These should still be null after passing them to formatTime().
$this->assertNull($options->hour);
Expand All @@ -304,7 +304,7 @@ public function testFormatTimeUsesProvidedHourMinuteOptions(): void
'minute' => '2-digit',
]);

$this->assertSame('8:03 PM', $formatphp->formatTime($time, $options));
$this->assertSame("8:03\xE2\x80\xAFPM", $formatphp->formatTime($time, $options));

// These should not change after being passed to formatTime().
$this->assertSame('2-digit', $options->hour);
Expand Down
Loading

0 comments on commit ee14c6a

Please sign in to comment.