Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: wayofdev/php-cs-fixer-config
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.4.5
Choose a base ref
...
head repository: wayofdev/php-cs-fixer-config
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.5.0
Choose a head ref
  • 6 commits
  • 6 files changed
  • 3 contributors

Commits on May 28, 2024

  1. fix(deps): update dependency friendsofphp/php-cs-fixer to v3.57.2

    renovate[bot] committed May 28, 2024
    Copy the full SHA
    6aa22f6 View commit details

Commits on May 29, 2024

  1. feat: add parallel config

    lotyp committed May 29, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    lotyp the dev
    Copy the full SHA
    5fc57b5 View commit details
  2. deps: update composer

    lotyp committed May 29, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    lotyp the dev
    Copy the full SHA
    5ac2aa7 View commit details
  3. Merge pull request #287 from wayofdev/docs/updates

    lotyp authored May 29, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ae9ce1a View commit details
  4. chore(master): release 1.5.0

    lotyp committed May 29, 2024
    Copy the full SHA
    f6857bf View commit details
  5. Merge pull request #285 from wayofdev/release-please--branches--maste…

    …r--components--php-cs-fixer-config
    lotyp authored May 29, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    1300d46 View commit details
Showing with 67 additions and 31 deletions.
  1. +1 −1 .github/.release-please-manifest.json
  2. +1 −0 .php-cs-fixer.dist.php
  3. +17 −0 CHANGELOG.md
  4. +28 −28 composer.lock
  5. +0 −2 docker-compose.yaml
  6. +20 −0 src/ConfigBuilder.php
2 changes: 1 addition & 1 deletion .github/.release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.4.5"
".": "1.5.0"
}
1 change: 1 addition & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@
->inDir(__DIR__ . '/src')
->inDir(__DIR__ . '/tests')
->addFiles([__FILE__])
->useParallelConfig()
->getConfig()
;

17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## [1.5.0](https://github.com/wayofdev/php-cs-fixer-config/compare/v1.4.5...v1.5.0) (2024-05-29)


### Features

* add parallel config ([5fc57b5](https://github.com/wayofdev/php-cs-fixer-config/commit/5fc57b54bdddd7fd1987e3427190fb3ab1ce655f))


### Bug Fixes

* **deps:** update dependency friendsofphp/php-cs-fixer to v3.57.2 ([6aa22f6](https://github.com/wayofdev/php-cs-fixer-config/commit/6aa22f6831808b15a41ffe497c0ed2476ced1072))


### Dependencies

* update composer ([5ac2aa7](https://github.com/wayofdev/php-cs-fixer-config/commit/5ac2aa736d494d2803a1bf854b64b46d6fcf2549))

## [1.4.5](https://github.com/wayofdev/php-cs-fixer-config/compare/v1.4.4...v1.4.5) (2024-05-28)


56 changes: 28 additions & 28 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---

version: '3.9'

services:
app:
image: wayofdev/php-dev:8.3-cli-alpine-latest
20 changes: 20 additions & 0 deletions src/ConfigBuilder.php
Original file line number Diff line number Diff line change
@@ -8,6 +8,8 @@
use PhpCsFixer\Config;
use PhpCsFixer\ConfigInterface;
use PhpCsFixer\Finder;
use PhpCsFixer\Runner\Parallel\ParallelConfig;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;

use function call_user_func_array;
use function get_class;
@@ -86,6 +88,24 @@ public function getConfig(): ConfigInterface
return $this->config->setRules($this->ruleSet->rules());
}

/**
* Wrapper method to set parallel config.
*
* @param positive-int|null $maxProcesses
* @param positive-int|null $filesPerProcess
* @param positive-int|null $processTimeout
*/
public function useParallelConfig(?int $maxProcesses = null, ?int $filesPerProcess = null, ?int $processTimeout = null): self
{
if ($maxProcesses !== null && $filesPerProcess !== null && $processTimeout !== null) {
$this->config->setParallelConfig(new ParallelConfig($maxProcesses, $filesPerProcess, $processTimeout));
} else {
$this->config->setParallelConfig(ParallelConfigFactory::detect());
}

return $this;
}

private function getFinder(): Finder
{
return $this->config->getFinder();