Skip to content
Permalink
Browse files

Merge pull request #6 from ergebnis/feature/import

Enhancement: Import ergebnis/factory-girl-definition
  • Loading branch information
localheinz committed Mar 8, 2020
2 parents 25be1d0 + 3570a94 commit 117de873709544347559169dea3e9ee601b028cf
Showing with 1,032 additions and 110 deletions.
  1. +4 −1 .github/workflows/integrate.yaml
  2. +3 −0 .php_cs
  3. +2 −0 CHANGELOG.md
  4. +2 −1 Makefile
  5. +7 −5 composer.json
  6. +103 −103 composer.lock
  7. +5 −0 phpstan.neon
  8. +5 −0 psalm-baseline.xml
  9. +46 −0 src/Definition/src/AbstractDefinition.php
  10. +21 −0 src/Definition/src/Definition.php
  11. +114 −0 src/Definition/src/Definitions.php
  12. +29 −0 src/Definition/src/Exception/InvalidDefinition.php
  13. +25 −0 src/Definition/src/Exception/InvalidDirectory.php
  14. +21 −0 src/Definition/src/FakerAwareDefinition.php
  15. +4 −0 test/AutoReview/SrcCodeTest.php
  16. +60 −0 test/Definition/AbstractDefinitionTest.php
  17. +132 −0 test/Definition/DefinitionsTest.php
  18. +48 −0 test/Definition/Exception/InvalidDefinitionTest.php
  19. +42 −0 test/Definition/Exception/InvalidDirectoryTest.php
  20. +34 −0 test/Definition/FakerAwareDefinitionTest.php
  21. +35 −0 test/Definition/phpunit.xml
  22. +29 −0 test/Fixture/Definition/Acceptable/UserDefinition.php
  23. +28 −0 test/Fixture/Definition/DoesNotImplementInterface/UserDefinition.php
  24. +26 −0 test/Fixture/Definition/ExtendsAbstractDefinition/UserDefinition.php
  25. +49 −0 test/Fixture/Definition/FakerAware/GroupDefinition.php
  26. +26 −0 test/Fixture/Definition/FakerAware/UserDefinition.php
  27. +29 −0 test/Fixture/Definition/IsAbstract/UserDefinition.php
  28. +33 −0 test/Fixture/Definition/PrivateConstructor/UserDefinition.php
  29. +34 −0 test/Fixture/Definition/ThrowsExceptionDuringConstruction/UserDefinition.php
  30. +18 −0 test/Fixture/Entity/Group.php
  31. +18 −0 test/Fixture/Entity/User.php
@@ -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:
@@ -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"

@@ -35,8 +35,11 @@ $config->getFinder()
'.build/',
'.dependabot/',
'.github/',
'src/Definition/',
'src/Doctrine/',
'test/Definition/',
'test/Doctrine/',
'test/Fixture/',
])
->name('.php_cs');

@@ -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

@@ -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
@@ -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
@@ -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
@@ -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",
@@ -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"
@@ -54,6 +53,7 @@
"Ergebnis\\FactoryBot\\": "src/"
},
"classmap": [
"src/Definition/",
"src/Doctrine/"
]
},
@@ -62,7 +62,9 @@
"Ergebnis\\FactoryBot\\Test\\": "test/"
},
"classmap": [
"test/Doctrine/"
"test/Definition/",
"test/Doctrine/",
"test/Fixture/"
]
},
"support": {

Some generated files are not rendered by default. Learn more.

@@ -3,6 +3,11 @@ includes:

parameters:
checkMissingIterableValueType: false
ergebnis:
classesAllowedToBeExtended:
- Ergebnis\FactoryGirl\Definition\AbstractDefinition
- InvalidArgumentException
- RuntimeException
inferPrivatePropertyTypeFromConstructor: true
level: max
paths:
@@ -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>

0 comments on commit 117de87

Please sign in to comment.
You can’t perform that action at this time.