Skip to content

Commit

Permalink
tools(deps-dev): Update friendsofphp/php-cs-fixer requirement from 3.…
Browse files Browse the repository at this point in the history
…59.3 to 3.64.0 in /tools/php-cs-fixer (#465)

Updates the requirements on
[friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer)
to permit the latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases">friendsofphp/php-cs-fixer's
releases</a>.</em></p>
<blockquote>
<h2>v3.64.0 Space Sets</h2>
<h2>What's Changed</h2>
<ul>
<li>feat: Update PSR2, PSR12 and PER-CS2 with
<code>single_space_after_...</code> config by <a
href="https://github.com/SpacePossum"><code>@​SpacePossum</code></a> in
<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/8171">PHP-CS-Fixer/PHP-CS-Fixer#8171</a></li>
<li>feat: Symfony.trailing_comma_in_multiline - adjust configuration by
<a href="https://github.com/keradus"><code>@​keradus</code></a> in <a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/8161">PHP-CS-Fixer/PHP-CS-Fixer#8161</a></li>
<li>feat: Symfony - adjust configuration for sets by <a
href="https://github.com/keradus"><code>@​keradus</code></a> in <a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/8188">PHP-CS-Fixer/PHP-CS-Fixer#8188</a></li>
<li>CI: Update PHPStan to 1.12.0 and fix the error that appeared by <a
href="https://github.com/kubawerlos"><code>@​kubawerlos</code></a> in <a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/8184">PHP-CS-Fixer/PHP-CS-Fixer#8184</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.63.2...v3.64.0">https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.63.2...v3.64.0</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/CHANGELOG.md">friendsofphp/php-cs-fixer's
changelog</a>.</em></p>
<blockquote>
<h2>Changelog for v3.64.0</h2>
<ul>
<li>feat: Symfony - adjust configuration for sets (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8188">#8188</a>)</li>
<li>feat: Symfony.trailing_comma_in_multiline - adjust configuration (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8161">#8161</a>)</li>
<li>feat: Update PSR2, PSR12 and PER-CS2 with
<code>single_space_around_construct</code> config (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8171">#8171</a>)</li>
<li>CI: Update PHPStan to 1.12.0 and fix the error that appeared (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8184">#8184</a>)</li>
</ul>
<h2>Changelog for v3.63.2</h2>
<ul>
<li>fix: <code>FullyQualifiedStrictTypesFixer</code> - reset cache even
if there is no <code>use</code> (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8183">#8183</a>)</li>
</ul>
<h2>Changelog for v3.63.1</h2>
<ul>
<li>dummy release</li>
</ul>
<h2>Changelog for v3.63.0</h2>
<ul>
<li>feat: Add <code>array_destructuring</code> as option for
<code>trailing_comma_in_multiline</code> (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8172">#8172</a>)</li>
<li>feat: remove braces even for single import (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8156">#8156</a>)</li>
<li>feat: TrailingCommaInMultilineFixer - dynamically evaluate config
against PHP version (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8167">#8167</a>)</li>
<li>fix: Do not shorten FQN for class resolution if imported symbol is
not a class (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/7705">#7705</a>)</li>
<li>fix: Ensure PHP binary path is used as a single CLI argument in
parallel worker process (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8180">#8180</a>)</li>
<li>fix: <code>PhpUnitAttributesFixer</code> - fix priorities with
<code>PhpUnitDataProvider(.+)Fixer</code> (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8169">#8169</a>)</li>
<li>chore: add tags for data providers that will change PHPStan's
baseline (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8178">#8178</a>)</li>
<li>chore: add <code>@return</code> tags for data providers already
having PHPDoc (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8176">#8176</a>)</li>
<li>chore: add <code>@return</code> tags for data providers that do not
have array in data (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8179">#8179</a>)</li>
<li>chore: remove duplicates from data providers (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8164">#8164</a>)</li>
<li>chore: remove duplicates from data providers that are copies in code
(<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8145">#8145</a>)</li>
<li>chore: remove <code>beStrictAboutTodoAnnotatedTests</code> from
PHPUnit's config (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8160">#8160</a>)</li>
<li>CI: Update PHPStan to 1.11.10 (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8163">#8163</a>)</li>
<li>CI: Update PHPStan to 1.11.11 and fix error that changed (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8174">#8174</a>)</li>
<li>docs: fix indent on rule
<code>date_time_create_from_format_call</code> (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8173">#8173</a>)</li>
</ul>
<h2>Changelog for v3.62.0</h2>
<ul>
<li>feat: set new_with_parentheses for anonymous_class to false in
PER-CS2.0 (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8140">#8140</a>)</li>
<li>chore: NewWithParenthesesFixer - create TODO to change the default
configuration to match PER-CS2 (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8148">#8148</a>)</li>
</ul>
<h2>Changelog for v3.61.1</h2>
<ul>
<li>fix: <code>NoSuperfluousPhpdocTagsFixer</code> - fix &quot;Undefined
array key 0&quot; error (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8150">#8150</a>)</li>
</ul>
<h2>Changelog for v3.61.0</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/commit/58dd9c931c785a79739310aef5178928305ffa67"><code>58dd9c9</code></a>
prepared the 3.64.0 release</li>
<li><a
href="https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/commit/209f77687bd200f334cc658616857801ccaced37"><code>209f776</code></a>
feat: Symfony - adjust configuration for sets (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8188">#8188</a>)</li>
<li><a
href="https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/commit/df2b6c2e3d2dc4c421a50364fe5419c4e6d67335"><code>df2b6c2</code></a>
feat: Symfony.trailing_comma_in_multiline - adjust configuration (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8161">#8161</a>)</li>
<li><a
href="https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/commit/1e4b0f237b8465b52197aae26814e188178e3bfb"><code>1e4b0f2</code></a>
feat: Update PSR2, PSR12 and PER-CS2 with
<code>single_space_around_construct</code> con...</li>
<li><a
href="https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/commit/00634e16143d2a51c70ccdcf24b10f30093ab6ec"><code>00634e1</code></a>
CI: Update PHPStan to 1.12.0 and fix the error that appeared (<a
href="https://redirect.github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/8184">#8184</a>)</li>
<li><a
href="https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/commit/970a9c55c95bb76024ee11ce098245cbb9c599d5"><code>970a9c5</code></a>
bumped version</li>
<li><a
href="https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/commit/9d427f3f14984403a6ae9fc726b61765ca0c005e"><code>9d427f3</code></a>
prepared the 3.63.2 release</li>
<li><a
href="https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/commit/5094b03d261b1b24475b2b41f25516d3653a879e"><code>5094b03</code></a>
fix: <code>FullyQualifiedStrictTypesFixer</code> - reset cache even if
there is no <code>use</code>...</li>
<li><a
href="https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/commit/2189cb5b0ee3944758d796b691db1bb1298f83a5"><code>2189cb5</code></a>
bumped version</li>
<li><a
href="https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/commit/ee3cc2e1fbfbddf98c17d4615db574a2a311c1ea"><code>ee3cc2e</code></a>
prepared the 3.63.1 release</li>
<li>Additional commits viewable in <a
href="https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.59.3...v3.64.0">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

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 Aug 31, 2024
1 parent 93dae90 commit 676ead3
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 15 deletions.
5 changes: 5 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ All notable changes to this project will be documented in this file.

<!-- add unreleased items here -->

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

[#465]: https://github.com/CycloneDX/cyclonedx-php-library/pull/465

## 3.4.0 - 2024-05-06

* Changed
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Factories/LicenseFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class LicenseFactory
{
public function __construct(
private readonly LicenseIdentifiers $licenseIdentifiers = new LicenseIdentifiers(),
private readonly SpdxLicenses $spdxLicenses = new SpdxLicenses()
private readonly SpdxLicenses $spdxLicenses = new SpdxLicenses(),
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/Core/Serialization/DOM/Normalizers/BomNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function normalize(Bom $bom): DOMElement
$document = $factory->getDocument();

$element = $document->createElementNS(
sprintf(self::XML_NAMESPACE_PATTERN, $factory->getSpec()->getVersion()->value),
\sprintf(self::XML_NAMESPACE_PATTERN, $factory->getSpec()->getVersion()->value),
'bom' // no namespace = defaultNS - so children w/o NS fall under this NS
);
SimpleDOM::setAttributes(
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Serialization/DOM/_BaseNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
abstract class _BaseNormalizer
{
public function __construct(
private readonly NormalizerFactory $normalizerFactory
private readonly NormalizerFactory $normalizerFactory,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/Core/Serialization/JSON/_BaseNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
abstract class _BaseNormalizer
{
public function __construct(
private readonly NormalizerFactory $normalizerFactory
private readonly NormalizerFactory $normalizerFactory,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/Core/Serialization/JsonSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class JsonSerializer extends BaseSerializer
*/
public function __construct(
protected readonly JSON\NormalizerFactory $normalizerFactory,
int $jsonEncodeFlags = self::JsonEncodeFlagsDefaultOptions
int $jsonEncodeFlags = self::JsonEncodeFlagsDefaultOptions,
) {
$this->jsonEncodeFlags = self::JsonEncodeFlagsDefaults
| ($jsonEncodeFlags & self::JsonEncodeFlagsAllowedOptions);
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Serialization/XmlSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class XmlSerializer extends BaseSerializer
public function __construct(
protected readonly DOM\NormalizerFactory $normalizerFactory,
protected readonly string $xmlVersion = '1.0',
protected readonly string $xmlEncoding = 'UTF-8'
protected readonly string $xmlEncoding = 'UTF-8',
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/Core/Utils/BomUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ abstract class BomUtility
*/
public static function randomSerialNumber(): string
{
return sprintf(
return \sprintf(
'urn:uuid:%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
random_int(0, 0xFFFF),
random_int(0, 0xFFFF),
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Validation/BaseValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ abstract class BaseValidator implements Validator
{
public function __construct(
/* @TODO in next major version: use `\CycloneDX\Core\Enums\Version` instead of `Spec` */
private readonly Spec $spec
private readonly Spec $spec,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/Core/Validation/ValidationError.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ValidationError
protected ?object $error = null;

final protected function __construct(
private readonly string $message
private readonly string $message,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Core/Collections/ComponentRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function testFindItem(
ComponentRepository $repo,
string $findName,
?string $findGroup,
array $expectedFindings
array $expectedFindings,
): void {
$actual = $repo->findItem($findName, $findGroup);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function testNormalize(Bom $bom, array $expecteds): void
self::assertCount(
0,
$missing,
sprintf("missing:\n%s\nin:\n%s",
\sprintf("missing:\n%s\nin:\n%s",
print_r($missing, true),
print_r($actuals, true),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function testNormalize(Bom $bom, array $expecteds): void
self::assertCount(
0,
$missing,
sprintf("missing:\n%s\nin:\n%s",
\sprintf("missing:\n%s\nin:\n%s",
print_r($missing, true),
print_r($actuals, true),
)
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 @@ -6,7 +6,7 @@
"php": "^8.1"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "3.59.3",
"friendsofphp/php-cs-fixer": "3.64.0",
"roave/security-advisories": "dev-latest"
},
"prefer-stable": true,
Expand Down
4 changes: 2 additions & 2 deletions tools/schema-downloader/download.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ abstract class BomJsonStrict extends BaseDownloadable
BomJsonStrict::class,
] as $class) {
foreach ($class::Versions as $version) {
$source = sprintf($class::SourcePattern, $version);
$target = sprintf($class::TargetPattern, $version);
$source = \sprintf($class::SourcePattern, $version);
$target = \sprintf($class::TargetPattern, $version);

$content = file_get_contents($source);
$content = strtr($content, $class::ReplaceStr);
Expand Down

0 comments on commit 676ead3

Please sign in to comment.