Skip to content

Commit

Permalink
Merge pull request #6 from ergebnis/feature/import
Browse files Browse the repository at this point in the history
Enhancement: Import ergebnis/factory-girl-definition
  • Loading branch information
localheinz committed Mar 8, 2020
2 parents 25be1d0 + 3570a94 commit 117de87
Show file tree
Hide file tree
Showing 31 changed files with 1,032 additions and 110 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on: # yamllint disable-line rule:truthy

env:
MIN_COVERED_MSI: 91
MIN_MSI: 59
MIN_MSI: 53
REQUIRED_PHP_EXTENSIONS: "mbstring"

jobs:
Expand Down Expand Up @@ -252,6 +252,9 @@ jobs:
- name: "Run auto-review tests with phpunit/phpunit"
run: "vendor/bin/phpunit --configuration=test/AutoReview/phpunit.xml"

- name: "Run definition tests with phpunit/phpunit"
run: "vendor/bin/phpunit --configuration=test/Definition/phpunit.xml"

- name: "Run doctrine tests with phpunit/phpunit"
run: "vendor/bin/phpunit --configuration=test/Doctrine/phpunit.xml"

Expand Down
3 changes: 3 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ $config->getFinder()
'.build/',
'.dependabot/',
'.github/',
'src/Definition/',
'src/Doctrine/',
'test/Definition/',
'test/Doctrine/',
'test/Fixture/',
])
->name('.php_cs');

Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ For a full diff see [`fa9c564...master`][fa9c564...master].
### Added

* Imported [`breerly/factory-girl-php@0e6f1b6`](https://github.com/unhashable/factory-girl-php/tree/0e6f1b6724d39108a2e7cef68a74668b7a77b856), ([#1]), by [@localheinz]
* Imported [`ergebnis/factory-girl-definition@23e57bc`](https://github.com/ergebnis/factory-girl-definition/tree/23e57bc2105ac7a32e3ec7103c866899fe6ad20c), ([#6]), by [@localheinz]

### Changed

Expand All @@ -20,5 +21,6 @@ For a full diff see [`fa9c564...master`][fa9c564...master].

[#1]: https://github.com/ergebnis/factory-bot/pull/1
[#3]: https://github.com/ergebnis/factory-bot/pull/3
[#6]: https://github.com/ergebnis/factory-bot/pull/6

[@localheinz]: https://github.com/localheinz
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MIN_COVERED_MSI:=91
MIN_MSI:=59
MIN_MSI:=53

.PHONY: it
it: coding-standards dependency-analysis static-code-analysis tests ## Runs the coding-standards, dependency-analysis, static-code-analysis, and tests targets
Expand Down Expand Up @@ -46,6 +46,7 @@ static-code-analysis-baseline: vendor ## Generates a baseline for static code an
tests: vendor ## Runs auto-review, unit, and integration tests with phpunit/phpunit
mkdir -p .build/phpunit
vendor/bin/phpunit --configuration=test/AutoReview/phpunit.xml
vendor/bin/phpunit --configuration=test/Definition/phpunit.xml
vendor/bin/phpunit --configuration=test/Doctrine/phpunit.xml
vendor/bin/phpunit --configuration=test/Unit/phpunit.xml
vendor/bin/phpunit --configuration=test/Integration/phpunit.xml
Expand Down
12 changes: 7 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
"doctrine/annotations": "^1.7.0",
"doctrine/collections": "^1.0.0",
"doctrine/dbal": "^2.2.1",
"doctrine/orm": "^2.6.3"
"doctrine/orm": "^2.6.3",
"ergebnis/classy": "~0.5.2",
"fzaninotto/faker": "^1.9.1"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.2.4",
Expand All @@ -39,9 +41,6 @@
"psalm/plugin-phpunit": "~0.9.0",
"vimeo/psalm": "^3.9.4"
},
"suggest": {
"fzaninotto/faker": "For generating fake data in entity definitions"
},
"config": {
"platform": {
"php": "7.2.25"
Expand All @@ -54,6 +53,7 @@
"Ergebnis\\FactoryBot\\": "src/"
},
"classmap": [
"src/Definition/",
"src/Doctrine/"
]
},
Expand All @@ -62,7 +62,9 @@
"Ergebnis\\FactoryBot\\Test\\": "test/"
},
"classmap": [
"test/Doctrine/"
"test/Definition/",
"test/Doctrine/",
"test/Fixture/"
]
},
"support": {
Expand Down
206 changes: 103 additions & 103 deletions composer.lock

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

5 changes: 5 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ includes:

parameters:
checkMissingIterableValueType: false
ergebnis:
classesAllowedToBeExtended:
- Ergebnis\FactoryGirl\Definition\AbstractDefinition
- InvalidArgumentException
- RuntimeException
inferPrivatePropertyTypeFromConstructor: true
level: max
paths:
Expand Down
5 changes: 5 additions & 0 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,11 @@
<code>OptimisticLockException::lockFailedVersionMissmatch($entity, $lockVersion, $entity-&gt;getVersion())</code>
</UndefinedMethod>
</file>
<file src="test/Definition/DefinitionsTest.php">
<MixedAssignment occurrences="1">
<code>$definitions</code>
</MixedAssignment>
</file>
<file src="test/Doctrine/Fixtures/BasicUsageTest.php">
<MissingReturnType occurrences="12">
<code>acceptsConstantValuesInEntityDefinitions</code>
Expand Down
Loading

0 comments on commit 117de87

Please sign in to comment.