diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 9c4e63ed..6b945639 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -10,7 +10,7 @@ For details, take a look at the following workflow configuration files: - [`workflows/renew.yaml`](workflows/renew.yaml) - [`workflows/triage.yaml`](workflows/triage.yaml) -## Backward-compatibility Analysis +## Backward-Compatibility Analysis We use [`roave/backward-compatibility-check`](https://github.com/Roave/BackwardCompatibilityCheck) to prevent breaking backwards-compatibility. diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index da211c1e..fdebab6f 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -1,4 +1,4 @@ -# https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates +# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file version: 2 diff --git a/.github/settings.yml b/.github/settings.yml index 459fa353..2723bc6f 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -77,7 +77,7 @@ repository: archived: false default_branch: "main" delete_branch_on_merge: true - description: ":robot: Provides a fixture factory for doctrine/orm entities." + description: "🤖 Provides a composer package with a fixture factory for doctrine/orm entities." enable_automated_security_fixes: true enable_vulnerability_alerts: true has_discussions: false diff --git a/.github/workflows/integrate.yaml b/.github/workflows/integrate.yaml index f3ab4465..884161fe 100644 --- a/.github/workflows/integrate.yaml +++ b/.github/workflows/integrate.yaml @@ -40,9 +40,6 @@ jobs: - name: "Set up problem matchers for PHP" run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\"" - - name: "Set up problem matchers for phpunit/phpunit" - run: "echo \"::add-matcher::${{ runner.tool_cache }}/phpunit.json\"" - - name: "Validate composer.json and composer.lock" run: "composer validate --ansi --strict" @@ -182,9 +179,6 @@ jobs: - name: "Run ergebnis/composer-normalize" run: "composer normalize --ansi --dry-run" - - name: "Create cache directory for friendsofphp/php-cs-fixer" - run: "mkdir -p .build/php-cs-fixer/" - - name: "Cache cache directory for friendsofphp/php-cs-fixer" uses: "actions/cache@v4.0.0" with: @@ -195,10 +189,10 @@ jobs: php-${{ matrix.php-version }}-php-cs-fixer- - name: "Run friendsofphp/php-cs-fixer" - run: "vendor/bin/php-cs-fixer fix --ansi --config=.php-cs-fixer.php --diff --dry-run --verbose" + run: "vendor/bin/php-cs-fixer fix --ansi --config=.php-cs-fixer.php --diff --dry-run --show-progress=dots --verbose" - name: "Run friendsofphp/php-cs-fixer on fixtures" - run: "vendor/bin/php-cs-fixer fix --ansi --config=.php-cs-fixer.fixture.php --diff --dry-run --verbose" + run: "vendor/bin/php-cs-fixer fix --ansi --config=.php-cs-fixer.fixture.php --diff --dry-run --show-progress=dots --verbose" dependency-analysis: name: "Dependency Analysis" @@ -279,7 +273,7 @@ jobs: uses: "shivammathur/setup-php@2.29.0" with: coverage: "xdebug" - extensions: "none, bcmath, ctype, curl, dom, intl, json, mbstring, pdo, pdo_sqlite, phar, simplexml, tokenizer, xml, xmlwriter" + extensions: "none, bcmath, ctype, curl, dom, intl, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter" php-version: "${{ matrix.php-version }}" - name: "Set up problem matchers for PHP" @@ -331,7 +325,7 @@ jobs: uses: "shivammathur/setup-php@2.29.0" with: coverage: "none" - extensions: "none, bcmath, ctype, curl, dom, intl, json, mbstring, pdo, pdo_sqlite, phar, simplexml, tokenizer, xml, xmlwriter" + extensions: "none, bcmath, ctype, curl, dom, intl, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter" php-version: "${{ matrix.php-version }}" - name: "Set up problem matchers for PHP" @@ -355,9 +349,6 @@ jobs: with: dependencies: "${{ matrix.dependencies }}" - - name: "Create cache directory for rector/rector" - run: "mkdir -p .build/rector/" - - name: "Cache cache directory for rector/rector" uses: "actions/cache@v4.0.0" with: @@ -467,15 +458,9 @@ jobs: with: dependencies: "${{ matrix.dependencies }}" - - name: "Create cache directory for phpstan/phpstan" - run: "mkdir -p .build/phpstan/" - - name: "Run phpstan/phpstan" run: "vendor/bin/phpstan --ansi --configuration=phpstan.neon --memory-limit=-1" - - name: "Create cache directory for vimeo/psalm" - run: "mkdir -p .build/psalm/" - - name: "Run vimeo/psalm" run: "vendor/bin/psalm --config=psalm.xml --output-format=github --shepherd --show-info=false --stats --threads=4" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index dc949a58..1307d094 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,3 +20,16 @@ jobs: uses: "ergebnis/.github/actions/github/release/create@1.9.0" with: github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}" + + - name: "Post to twitter.com about release" + uses: "Eomm/why-don-t-you-tweet@v1.1.0" + env: + TWITTER_ACCESS_TOKEN: "${{ secrets.ERGEBNIS_TWITTER_ACCESS_TOKEN }}" + TWITTER_ACCESS_TOKEN_SECRET: "${{ secrets.ERGEBNIS_TWITTER_ACCESS_TOKEN_SECRET }}" + TWITTER_CONSUMER_API_KEY: "${{ secrets.ERGEBNIS_TWITTER_CONSUMER_API_KEY }}" + TWITTER_CONSUMER_API_SECRET: "${{ secrets.ERGEBNIS_TWITTER_CONSUMER_API_KEY_SECRET }}" + with: + tweet-message: | + 🤖 Just released: ${{ github.event.repository.owner.login }}/${{ github.event.repository.name }}:${{ env.RELEASE_TAG }}. + + ${{ env.RELEASE_HTML_URL }} diff --git a/.github/workflows/renew.yaml b/.github/workflows/renew.yaml index 9a6a816e..253526e7 100644 --- a/.github/workflows/renew.yaml +++ b/.github/workflows/renew.yaml @@ -56,9 +56,6 @@ jobs: with: dependencies: "${{ matrix.dependencies }}" - - name: "Create cache directory for friendsofphp/php-cs-fixer" - run: "mkdir -p .build/php-cs-fixer" - - name: "Cache cache directory for friendsofphp/php-cs-fixer" uses: "actions/cache@v4.0.0" with: @@ -69,7 +66,7 @@ jobs: php-${{ matrix.php-version }}-php-cs-fixer- - name: "Run friendsofphp/php-cs-fixer" - run: "vendor/bin/php-cs-fixer fix --ansi --config=.php-cs-fixer.php --diff --verbose" + run: "vendor/bin/php-cs-fixer fix --ansi --config=.php-cs-fixer.php --diff --show-progress=dots --verbose" - name: "Commit modified files" uses: "stefanzweifel/git-auto-commit-action@v5.0.0" diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 6d535267..403893a4 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -18,7 +18,7 @@ __DIR__ . '/LICENSE.md', License\Range::since( License\Year::fromString('2020'), - new \DateTimeZone('UTC'), + new DateTimeZone('UTC'), ), License\Holder::fromString('Andreas Möller'), License\Url::fromString('https://github.com/ergebnis/factory-bot'), diff --git a/Makefile b/Makefile index e486816f..8e2e3af5 100644 --- a/Makefile +++ b/Makefile @@ -7,16 +7,14 @@ backward-compatibility-analysis: vendor ## Runs a backward-compatibility analysi .PHONY: code-coverage code-coverage: vendor ## Collects coverage from running unit and integration tests with phpunit/phpunit - mkdir -p .build/phpunit/ vendor/bin/phpunit --configuration=test/phpunit.xml --coverage-text --testsuite=unit,integration .PHONY: coding-standards coding-standards: vendor ## Lints YAML files with yamllint, normalizes composer.json with ergebnis/composer-normalize, and fixes code style issues with friendsofphp/php-cs-fixer yamllint -c .yamllint.yaml --strict . composer normalize - mkdir -p .build/php-cs-fixer/ - vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --diff --verbose - vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.fixture.php --diff --verbose + vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --diff --show-progress=dots --verbose + vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.fixture.php --diff --show-progress=dots --verbose .PHONY: dependency-analysis dependency-analysis: phive vendor ## Runs a dependency analysis with maglnet/composer-require-checker @@ -33,17 +31,14 @@ help: ## Displays this list of targets with descriptions .PHONY: mutation-tests mutation-tests: vendor ## Runs mutation tests with infection/infection - mkdir -p .build/infection/ vendor/bin/infection --configuration=infection.json .PHONY: phive phive: .phive ## Installs dependencies with phive - mkdir -p .build/phive/ PHIVE_HOME=.build/phive phive install --trust-gpg-keys 0x033E5F8D801A2F8D .PHONY: refactoring refactoring: vendor ## Runs automated refactoring with rector/rector - mkdir -p .build/rector/ vendor/bin/rector process --config=rector.php .PHONY: security-analysis @@ -52,31 +47,25 @@ security-analysis: vendor ## Runs a security analysis with composer .PHONY: static-code-analysis static-code-analysis: vendor ## Runs a static code analysis with phpstan/phpstan and vimeo/psalm - mkdir -p .build/phpstan/ vendor/bin/phpstan clear-result-cache --configuration=phpstan.neon vendor/bin/phpstan --configuration=phpstan.neon --memory-limit=-1 - mkdir -p .build/psalm/ vendor/bin/psalm --config=psalm.xml --clear-cache vendor/bin/psalm --config=psalm.xml --show-info=false --stats --threads=4 .PHONY: static-code-analysis-baseline static-code-analysis-baseline: vendor ## Generates a baseline for static code analysis with phpstan/phpstan and vimeo/psalm - mkdir -p .build/phpstan/ vendor/bin/phpstan clear-result-cache --configuration=phpstan.neon vendor/bin/phpstan --allow-empty-baseline --configuration=phpstan.neon --generate-baseline=phpstan-baseline.neon --memory-limit=-1 - mkdir -p .build/psalm/ vendor/bin/psalm --config=psalm.xml --clear-cache vendor/bin/psalm --config=psalm.xml --set-baseline=psalm-baseline.xml .PHONY: tests tests: vendor ## Runs unit and integration tests with phpunit/phpunit - mkdir -p .build/phpunit/ vendor/bin/phpunit --configuration=test/phpunit.xml --testsuite=unit vendor/bin/phpunit --configuration=test/phpunit.xml --testsuite=integration .PHONY: tests-example tests-example: vendor ## Runs auto-review and unit tests for examples with phpunit/phpunit - mkdir -p .build/phpunit/ vendor/bin/phpunit --configuration=example/test/AutoReview/phpunit.xml vendor/bin/phpunit --configuration=example/test/Unit/phpunit.xml diff --git a/psalm-baseline.xml b/psalm-baseline.xml index a6e0466e..cd6198aa 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + height