Skip to content

Commit

Permalink
Merge pull request #1112 from ergebnis/feature/synchronize
Browse files Browse the repository at this point in the history
Enhancement: Synchronize with `ergebnis/php-package-template`
  • Loading branch information
localheinz authored Sep 18, 2023
2 parents 4782e1f + cb56ad3 commit 1d38cba
Show file tree
Hide file tree
Showing 15 changed files with 135 additions and 22 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
Expand Down
4 changes: 2 additions & 2 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

## Supported Versions

The following versions of `ergebnis/php-package-template` have active support:
The following versions of `ergebnis/factory-bot` have active support:

- `^1.4.0`

## Unsupported Versions

The following versions of `ergebnis/php-package-template` have reached their end of life:
The following versions of `ergebnis/factory-bot` have reached their end of life:

- `<1.4.0`

Expand Down
2 changes: 1 addition & 1 deletion .github/settings.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://github.com/probot/settings
# https://github.com/repository-settings/app

branches:
- name: "main"
Expand Down
22 changes: 19 additions & 3 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:

runs-on: "ubuntu-latest"

timeout-minutes: 5

strategy:
matrix:
php-version:
Expand Down Expand Up @@ -73,6 +75,8 @@ jobs:

runs-on: "ubuntu-latest"

timeout-minutes: 5

strategy:
matrix:
php-version:
Expand Down Expand Up @@ -146,6 +150,8 @@ jobs:

runs-on: "ubuntu-latest"

timeout-minutes: 5

strategy:
matrix:
php-version:
Expand Down Expand Up @@ -200,6 +206,8 @@ jobs:

runs-on: "ubuntu-latest"

timeout-minutes: 5

strategy:
matrix:
php-version:
Expand Down Expand Up @@ -250,6 +258,8 @@ jobs:

runs-on: "ubuntu-latest"

timeout-minutes: 5

strategy:
matrix:
php-version:
Expand Down Expand Up @@ -310,6 +320,8 @@ jobs:

runs-on: "ubuntu-latest"

timeout-minutes: 5

strategy:
matrix:
php-version:
Expand Down Expand Up @@ -358,6 +370,8 @@ jobs:

runs-on: "ubuntu-latest"

timeout-minutes: 5

strategy:
matrix:
php-version:
Expand Down Expand Up @@ -402,7 +416,7 @@ jobs:
run: "mkdir -p .build/phpstan/"

- name: "Run phpstan/phpstan"
run: "vendor/bin/phpstan --configuration=phpstan.neon --memory-limit=-1"
run: "vendor/bin/phpstan --ansi --configuration=phpstan.neon --memory-limit=-1"

- name: "Create cache directory for vimeo/psalm"
run: "mkdir -p .build/psalm/"
Expand All @@ -415,6 +429,8 @@ jobs:

runs-on: "ubuntu-latest"

timeout-minutes: 5

strategy:
matrix:
php-version:
Expand Down Expand Up @@ -462,10 +478,10 @@ jobs:
dependencies: "${{ matrix.dependencies }}"

- name: "Show Doctrine mapping information"
run: "vendor/bin/doctrine orm:info"
run: "vendor/bin/doctrine orm:info --ansi"

- name: "Validate Doctrine mapping"
run: "vendor/bin/doctrine orm:validate-schema --skip-sync"
run: "vendor/bin/doctrine orm:validate-schema --ansi --skip-sync"

- name: "Run unit tests with phpunit/phpunit"
run: "vendor/bin/phpunit --colors=always --configuration=test/phpunit.xml --testsuite=unit"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:

runs-on: "ubuntu-latest"

timeout-minutes: 5

if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' &&
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:

runs-on: "ubuntu-latest"

timeout-minutes: 5

steps:
- name: "Create release"
uses: "ergebnis/.github/actions/github/release/create@1.8.0"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/renew.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:

runs-on: "ubuntu-latest"

timeout-minutes: 5

strategy:
matrix:
php-version:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/triage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:

runs-on: "ubuntu-latest"

timeout-minutes: 5

steps:
- name: "Add labels based on branch name"
uses: "ergebnis/.github/actions/github/pull-request/add-label-based-on-branch-name@1.8.0"
Expand Down
2 changes: 1 addition & 1 deletion .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="composer-require-checker" version="^4.4.0" installed="4.4.0" location="./.phive/composer-require-checker" copy="false"/>
<phar name="composer-require-checker" version="^4.6.0" installed="4.6.0" location="./.phive/composer-require-checker" copy="false"/>
</phive>
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static-code-analysis-baseline: vendor ## Generates a baseline for static code an
vendor/bin/psalm --config=psalm.xml --set-baseline=psalm-baseline.xml

.PHONY: tests
tests: vendor ## Runs unit tests with phpunit/phpunit
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
Expand Down
30 changes: 20 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[![Total Downloads](https://poser.pugx.org/ergebnis/factory-bot/downloads)](https://packagist.org/packages/ergebnis/factory-bot)
[![Monthly Downloads](http://poser.pugx.org/ergebnis/factory-bot/d/monthly)](https://packagist.org/packages/ergebnis/factory-bot)

Provides a fixture factory for [`doctrine/orm`](https://github.com/doctrine/orm) entities.
This package provides a fixture factory for [`doctrine/orm`](https://github.com/doctrine/orm) entities.

## Installation

Expand Down Expand Up @@ -1221,30 +1221,40 @@ The fixture factory will not flush the entity manager - you need to flush it you

## Changelog

Please have a look at [`CHANGELOG.md`](CHANGELOG.md).
The maintainers of this package record notable changes to this project in a [changelog](CHANGELOG.md).

## Contributing

Please have a look at [`CONTRIBUTING.md`](.github/CONTRIBUTING.md).
The maintainers of this package suggest following the [contribution guide](.github/CONTRIBUTING.md).

## Code of Conduct

Please have a look at [`CODE_OF_CONDUCT.md`](https://github.com/ergebnis/.github/blob/main/CODE_OF_CONDUCT.md).
The maintainers of this package ask contributors to follow the [code of conduct](.github/CODE_OF_CONDUCT.md).

## General Support Policy

The maintainers of this package provide limited support.

You can support the maintenance of this package by [sponsoring @localheinz](https://github.com/sponsors/localheinz) or [requesting an invoice for services related to this package](mailto:am@localheinz.com?subject=ergebnis/factory-bot:%20Requesting%20invoice%20for%20services).

## PHP Version Support Policy

This package supports PHP versions with [active support](https://www.php.net/supported-versions.php).

The maintainers of this package add support for a PHP version following its initial release and drop support for a PHP version when it has reached its end of active support.

## Security Policy

Please have a look at [`SECURITY.md`](.github/SECURITY.md).
This package has a [security policy](.github/SECURITY.md).

## License

This package is licensed using the MIT License.

Please have a look at [`LICENSE.md`](LICENSE.md).
This package uses the [MIT license](LICENSE.md).

## Credits

This project is based on [`breerly/factory-girl-php@0e6f1b6`](https://github.com/GoodPete/factory-girl-php/tree/0e6f1b6724d39108a2e7cef68a74668b7a77b856) (originally licensed under MIT by [Grayson Koonce](https://github.com/unhashable)), which is based on [`xi/doctrine`](https://github.com/xi-project/xi-doctrine) (originally licensed under MIT by [Xi](https://github.com/xi-project)), which in turn provided a port of [`factory_bot`](https://github.com/thoughtbot/factory_girl) (originally licensed under MIT by [Joe Ferris](https://github.com/jferris) and [thoughtbot, Inc.](https://github.com/thoughtbot)).

## Curious what I am up to?
## Social

Follow me on [Twitter](https://twitter.com/intent/follow?screen_name=localheinz)!
Follow [@localheinz](https://twitter.com/intent/follow?screen_name=localheinz) and [@ergebnis](https://twitter.com/intent/follow?screen_name=ergebnis) on Twitter.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"ergebnis/license": "^2.2.0",
"ergebnis/php-cs-fixer-config": "^6.0.0",
"ergebnis/phpstan-rules": "^2.1.0",
"ergebnis/phpunit-slow-test-detector": "^2.3.0",
"infection/infection": "~0.27.2",
"phpstan/extension-installer": "^1.3.1",
"phpstan/phpstan": "^1.10.34",
Expand Down
72 changes: 70 additions & 2 deletions composer.lock

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

2 changes: 1 addition & 1 deletion test/Util/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ trait Helper
final protected static function faker(string $locale = 'en_US'): Generator
{
/**
* @var array<string, Generator>
* @var array<string, Generator> $fakers
*/
static $fakers = [];

Expand Down
11 changes: 10 additions & 1 deletion test/phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,25 @@
bootstrap="../vendor/autoload.php"
cacheDirectory="../.build/phpunit/cache"
cacheResult="true"
cacheResultFile="../.build/phpunit/cache"
colors="true"
columns="max"
displayDetailsOnIncompleteTests="true"
displayDetailsOnSkippedTests="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
displayDetailsOnTestsThatTriggerErrors="true"
displayDetailsOnTestsThatTriggerNotices="true"
displayDetailsOnTestsThatTriggerWarnings="true"
executionOrder="random"
requireCoverageMetadata="true"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
>
<coverage includeUncoveredFiles="true"/>
<extensions>
<bootstrap class="Ergebnis\PHPUnit\SlowTestDetector\Extension"/>
</extensions>
<source>
<include>
<directory suffix=".php">../src/</directory>
Expand Down

0 comments on commit 1d38cba

Please sign in to comment.