Skip to content

Commit

Permalink
tools(deps-dev): Update friendsofphp/php-cs-fixer requirement from v3…
Browse files Browse the repository at this point in the history
….51.0 to v3.52.1 in /tools/php-cs-fixer (#469)

* tools(deps-dev): Update friendsofphp/php-cs-fixer requirement

Updates the requirements on [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) to permit the latest version.
- [Release notes](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases)
- [Changelog](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/CHANGELOG.md)
- [Commits](PHP-CS-Fixer/PHP-CS-Fixer@v3.51.0...v3.52.1)

---
updated-dependencies:
- dependency-name: friendsofphp/php-cs-fixer
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>

* apply CS

Signed-off-by: Jan Kowalleck <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Jan Kowalleck <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jan Kowalleck <[email protected]>
  • Loading branch information
dependabot[bot] and jkowalleck authored Mar 31, 2024
1 parent 9b5ce14 commit fdf6eba
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 25 deletions.
5 changes: 5 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.

## unreleased

* Style
* Applied latest PHP Coding Standards (via [#469])

[#469]: https://github.com/CycloneDX/cyclonedx-php-composer/pull/469

## 5.0.1 - 2024-02-05

* Style
Expand Down
44 changes: 22 additions & 22 deletions tests/Unit/MakeBom/BuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,20 +163,20 @@ private static function assertComponentSymfonyLock(Models\Bom $sbom): void
self::assertSame('pkg:composer/symfony/[email protected]', (string) $component->getPackageUrl());
$componentProperties = $component->getProperties()->getItems();
foreach ([
'cdx:composer:package:type' => ['library'],
'cdx:composer:package:distReference' => ['febdeed9473e568ff34bf4350c04760f5357dfe2'],
'cdx:composer:package:sourceReference' => ['febdeed9473e568ff34bf4350c04760f5357dfe2'],
] as $propertyName => $expectedValues) {
'cdx:composer:package:type' => ['library'],
'cdx:composer:package:distReference' => ['febdeed9473e568ff34bf4350c04760f5357dfe2'],
'cdx:composer:package:sourceReference' => ['febdeed9473e568ff34bf4350c04760f5357dfe2'],
] as $propertyName => $expectedValues) {
$fComponentPropertyValues = array_values(array_map(
static fn ($p) => $p->getValue(),
array_filter($componentProperties, static fn ($c) => $c->getName() === $propertyName)));
self::assertEquals($expectedValues, $fComponentPropertyValues);
}
$extRefs = $component->getExternalReferences()->getItems();
foreach ([
[Enums\ExternalReferenceType::Distribution, ['https://api.github.com/repos/symfony/lock/zipball/febdeed9473e568ff34bf4350c04760f5357dfe2']],
[Enums\ExternalReferenceType::VCS, ['https://github.com/symfony/lock.git', 'https://github.com/symfony/lock/tree/v6.2.7']],
] as [$extRefType, $expectedUrls]) {
[Enums\ExternalReferenceType::Distribution, ['https://api.github.com/repos/symfony/lock/zipball/febdeed9473e568ff34bf4350c04760f5357dfe2']],
[Enums\ExternalReferenceType::VCS, ['https://github.com/symfony/lock.git', 'https://github.com/symfony/lock/tree/v6.2.7']],
] as [$extRefType, $expectedUrls]) {
$fExtRefUrls = array_values(array_map(
static fn ($er) => $er->getUrl(),
array_filter($extRefs, static fn ($er) => $er->getType() === $extRefType)));
Expand All @@ -202,20 +202,20 @@ public static function assertComponentPsrLog(Models\Bom $sbom): void
self::assertSame('pkg:composer/psr/[email protected]', (string) $component->getPackageUrl());
$componentProperties = $component->getProperties()->getItems();
foreach ([
'cdx:composer:package:type' => ['library'],
'cdx:composer:package:distReference' => ['fe5ea303b0887d5caefd3d431c3e61ad47037001'],
'cdx:composer:package:sourceReference' => ['fe5ea303b0887d5caefd3d431c3e61ad47037001'],
] as $propertyName => $expectedValues) {
'cdx:composer:package:type' => ['library'],
'cdx:composer:package:distReference' => ['fe5ea303b0887d5caefd3d431c3e61ad47037001'],
'cdx:composer:package:sourceReference' => ['fe5ea303b0887d5caefd3d431c3e61ad47037001'],
] as $propertyName => $expectedValues) {
$fComponentPropertyValues = array_values(array_map(
static fn ($p) => $p->getValue(),
array_filter($componentProperties, static fn ($c) => $c->getName() === $propertyName)));
self::assertEquals($expectedValues, $fComponentPropertyValues);
}
$extRefs = $component->getExternalReferences()->getItems();
foreach ([
[Enums\ExternalReferenceType::Distribution, ['https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001']],
[Enums\ExternalReferenceType::VCS, ['https://github.com/php-fig/log.git', 'https://github.com/php-fig/log/tree/3.0.0']],
] as [$extRefType, $expectedUrls]) {
[Enums\ExternalReferenceType::Distribution, ['https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001']],
[Enums\ExternalReferenceType::VCS, ['https://github.com/php-fig/log.git', 'https://github.com/php-fig/log/tree/3.0.0']],
] as [$extRefType, $expectedUrls]) {
$fExtRefUrls = array_values(array_map(
static fn ($er) => $er->getUrl(),
array_filter($extRefs, static fn ($er) => $er->getType() === $extRefType)));
Expand All @@ -239,21 +239,21 @@ private static function assertComponentCdxPlugin(Models\Bom $sbom): void
self::assertSame('pkg:composer/cyclonedx/cyclonedx-php-composer@dev-master', (string) $component->getPackageUrl());
$componentProperties = $component->getProperties()->getItems();
foreach ([
'cdx:composer:package:isDevRequirement' => ['true'],
'cdx:composer:package:type' => ['composer-plugin'],
] as $propertyName => $expectedValues) {
'cdx:composer:package:isDevRequirement' => ['true'],
'cdx:composer:package:type' => ['composer-plugin'],
] as $propertyName => $expectedValues) {
$fComponentPropertyValues = array_values(array_map(
static fn ($p) => $p->getValue(),
array_filter($componentProperties, static fn ($c) => $c->getName() === $propertyName)));
self::assertEquals($expectedValues, $fComponentPropertyValues);
}
$extRefs = $component->getExternalReferences()->getItems();
foreach ([
[Enums\ExternalReferenceType::Distribution, ['../../../..']],
[Enums\ExternalReferenceType::VCS, ['https://github.com/CycloneDX/cyclonedx-php-composer/']],
[Enums\ExternalReferenceType::Website, ['https://github.com/CycloneDX/cyclonedx-php-composer/#readme']],
[Enums\ExternalReferenceType::IssueTracker, ['https://github.com/CycloneDX/cyclonedx-php-composer/issues']],
] as [$extRefType, $expectedUrls]) {
[Enums\ExternalReferenceType::Distribution, ['../../../..']],
[Enums\ExternalReferenceType::VCS, ['https://github.com/CycloneDX/cyclonedx-php-composer/']],
[Enums\ExternalReferenceType::Website, ['https://github.com/CycloneDX/cyclonedx-php-composer/#readme']],
[Enums\ExternalReferenceType::IssueTracker, ['https://github.com/CycloneDX/cyclonedx-php-composer/issues']],
] as [$extRefType, $expectedUrls]) {
$fExtRefUrls = array_values(array_map(
static fn ($er) => $er->getUrl(),
array_filter($extRefs, static fn ($er) => $er->getType() === $extRefType)));
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/MakeBom/OptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public static function dpProducesOption(): Generator
foreach ([
'XML' => Format::XML,
'JSON' => Format::JSON,
] as $outputFormatIn => $outputFormat) {
] as $outputFormatIn => $outputFormat) {
yield "outputFormat $outputFormatIn" => [
'--output-format '.escapeshellarg($outputFormatIn),
['outputFormat' => $outputFormat],
Expand All @@ -96,7 +96,7 @@ public static function dpProducesOption(): Generator
'1.3' => Version::v1dot3,
'1.2' => Version::v1dot2,
'1.1' => Version::v1dot1,
] as $specVersionIn => $specVersion) {
] as $specVersionIn => $specVersion) {
yield "specVersion '$specVersionIn'" => [
'--spec-version '.escapeshellarg($specVersionIn),
['specVersion' => $specVersion],
Expand Down
2 changes: 1 addition & 1 deletion tools/php-cs-fixer/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "metapackage",
"description": "php-cs-fixer",
"require-dev": {
"friendsofphp/php-cs-fixer": "v3.51.0",
"friendsofphp/php-cs-fixer": "v3.52.1",
"roave/security-advisories": "dev-latest"
},
"config": {
Expand Down

0 comments on commit fdf6eba

Please sign in to comment.