Skip to content

Commit

Permalink
Enhancement: Synchronize with ergebnis/php-package-template
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Feb 9, 2023
1 parent 1bcb2c1 commit c12dd5d
Show file tree
Hide file tree
Showing 11 changed files with 231 additions and 115 deletions.
25 changes: 12 additions & 13 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ For details, take a look at the following workflow configuration files:

- [`workflows/integrate.yaml`](workflows/integrate.yaml)
- [`workflows/merge.yaml`](workflows/merge.yaml)
- [`workflows/prune.yaml`](workflows/prune.yaml)
- [`workflows/release.yaml`](workflows/release.yaml)
- [`workflows/renew.yaml`](workflows/renew.yaml)
- [`workflows/triage.yaml`](workflows/triage.yaml)
Expand Down Expand Up @@ -47,6 +46,18 @@ make dependency-analysis

to run a dependency analysis.

## Mutation Tests

We are using [`infection/infection`](https://github.com/infection/infection) to ensure a minimum quality of the tests.

Enable `Xdebug` and run

```sh
make mutation-tests
```

to run mutation tests.

## Refactoring

We are using [`rector/rector`](https://github.com/rectorphp/rector) to automatically refactor code.
Expand Down Expand Up @@ -107,18 +118,6 @@ make tests

to run all the tests.

## Mutation Tests

We are using [`infection/infection`](https://github.com/infection/infection) to ensure a minimum quality of the tests.

Enable `Xdebug` and run

```sh
make mutation-tests
```

to run mutation tests.

## Extra lazy?

Run
Expand Down
4 changes: 0 additions & 4 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ labels:
color: "ee0701"
description: ""

- name: "stale"
color: "eeeeee"
description: ""

# https://docs.github.com/en/rest/reference/repos#update-a-repository

repository:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ jobs:
coverage: "none"
extensions: "none, ctype, dom, json, mbstring, pdo, pdo_sqlite, phar, simplexml, tokenizer, xml, xmlwriter"
php-version: "${{ matrix.php-version }}"
tools: "phive"

- name: "Set up problem matchers for PHP"
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\""
Expand All @@ -180,6 +181,11 @@ jobs:
with:
dependencies: "${{ matrix.dependencies }}"

- name: "Install dependencies with phive"
uses: "ergebnis/.github/actions/phive/[email protected]"
with:
trust-gpg-keys: "0x033E5F8D801A2F8D"

- name: "Run maglnet/composer-require-checker"
run: ".phive/composer-require-checker check --config-file=$(pwd)/composer-require-checker.json"

Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/prune.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/.build/
/.notes/
/.phive/
/vendor/
!/.phive/phars.xml
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="true"/>
<phar name="composer-require-checker" version="^4.4.0" installed="4.4.0" location="./.phive/composer-require-checker" copy="false"/>
</phive>
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ coding-standards: vendor ## Lints YAML files with yamllint, normalizes composer.
vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.fixture.php --diff --verbose

.PHONY: dependency-analysis
dependency-analysis: vendor ## Runs a dependency analysis with maglnet/composer-require-checker
dependency-analysis: phive vendor ## Runs a dependency analysis with maglnet/composer-require-checker
.phive/composer-require-checker check --config-file=$(shell pwd)/composer-require-checker.json

.PHONY: doctrine
Expand All @@ -32,6 +32,11 @@ 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
vendor/bin/rector process --config=rector.php
Expand Down
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
# factory-bot
# php-package-template

[![Integrate](https://github.com/ergebnis/factory-bot/workflows/Integrate/badge.svg)](https://github.com/ergebnis/factory-bot/actions)
[![Prune](https://github.com/ergebnis/factory-bot/workflows/Prune/badge.svg)](https://github.com/ergebnis/factory-bot/actions)
[![Release](https://github.com/ergebnis/factory-bot/workflows/Release/badge.svg)](https://github.com/ergebnis/factory-bot/actions)
[![Renew](https://github.com/ergebnis/factory-bot/workflows/Renew/badge.svg)](https://github.com/ergebnis/factory-bot/actions)
[![Integrate](https://github.com/ergebnis/php-package-template/workflows/Integrate/badge.svg)](https://github.com/ergebnis/php-package-template/actions)
[![Merge](https://github.com/ergebnis/php-package-template/workflows/Merge/badge.svg)](https://github.com/ergebnis/php-package-template/actions)
[![Release](https://github.com/ergebnis/php-package-template/workflows/Release/badge.svg)](https://github.com/ergebnis/php-package-template/actions)
[![Renew](https://github.com/ergebnis/php-package-template/workflows/Renew/badge.svg)](https://github.com/ergebnis/php-package-template/actions)

[![Code Coverage](https://codecov.io/gh/ergebnis/factory-bot/branch/main/graph/badge.svg)](https://codecov.io/gh/ergebnis/factory-bot)
[![Type Coverage](https://shepherd.dev/github/ergebnis/factory-bot/coverage.svg)](https://shepherd.dev/github/ergebnis/factory-bot)
[![Code Coverage](https://codecov.io/gh/ergebnis/php-package-template/branch/main/graph/badge.svg)](https://codecov.io/gh/ergebnis/php-package-template)
[![Type Coverage](https://shepherd.dev/github/ergebnis/php-package-template/coverage.svg)](https://shepherd.dev/github/ergebnis/php-package-template)

[![Latest Stable Version](https://poser.pugx.org/ergebnis/factory-bot/v/stable)](https://packagist.org/packages/ergebnis/factory-bot)
[![Total Downloads](https://poser.pugx.org/ergebnis/factory-bot/downloads)](https://packagist.org/packages/ergebnis/factory-bot)

Provides a fixture factory for [`doctrine/orm`](https://github.com/doctrine/orm) entities.
[![Latest Stable Version](https://poser.pugx.org/ergebnis/php-package-template/v/stable)](https://packagist.org/packages/ergebnis/php-package-template)
[![Total Downloads](https://poser.pugx.org/ergebnis/php-package-template/downloads)](https://packagist.org/packages/ergebnis/php-package-template)
[![Monthly Downloads](http://poser.pugx.org/ergebnis/php-package-template/d/monthly)](https://packagist.org/packages/ergebnis/php-package-template)

## Installation

Run

```shell
```sh
composer require --dev ergebnis/factory-bot
```

Expand Down Expand Up @@ -1158,6 +1157,6 @@ Please have a look at [`LICENSE.md`](LICENSE.md).

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 building?
## Curious what I am up to?

:mailbox_with_mail: [Subscribe to my list](https://localheinz.com/projects/), and I will occasionally send you an email to let you know what I am working on.
Follow me on [Twitter](https://twitter.com/intent/follow?screen_name=localheinz)!
Loading

0 comments on commit c12dd5d

Please sign in to comment.