Skip to content
Permalink
Browse files

Merge pull request #8 from ergebnis/fix/move

Fix: Move classes imported from ergebnis/factory-girl-definition
  • Loading branch information
localheinz committed Mar 8, 2020
2 parents 4667ae2 + 5479d05 commit c5524278548f1436ab6f64b556141e286d57a087
Showing with 116 additions and 234 deletions.
  1. +1 −4 .github/workflows/integrate.yaml
  2. +0 −3 .php_cs
  3. +1 −2 Makefile
  4. +1 −4 composer.json
  5. +1 −1 phpstan.neon
  6. +5 −5 psalm-baseline.xml
  7. +3 −3 src/Definition/{src → }/AbstractDefinition.php
  8. +3 −3 src/Definition/{src → }/Definition.php
  9. +3 −3 src/Definition/{src → }/Definitions.php
  10. +3 −3 src/Definition/{src → }/Exception/InvalidDefinition.php
  11. +3 −3 src/Definition/{src → }/Exception/InvalidDirectory.php
  12. +3 −3 src/Definition/{src → }/FakerAwareDefinition.php
  13. +0 −34 src/Example.php
  14. +1 −1 test/AutoReview/SrcCodeTest.php
  15. +0 −35 test/Definition/phpunit.xml
  16. +5 −5 test/Fixture/Definition/Acceptable/UserDefinition.php
  17. +4 −4 test/Fixture/Definition/DoesNotImplementInterface/UserDefinition.php
  18. +5 −5 test/Fixture/Definition/ExtendsAbstractDefinition/UserDefinition.php
  19. +5 −5 test/Fixture/Definition/FakerAware/GroupDefinition.php
  20. +5 −5 test/Fixture/Definition/FakerAware/UserDefinition.php
  21. +5 −5 test/Fixture/Definition/IsAbstract/UserDefinition.php
  22. +5 −5 test/Fixture/Definition/PrivateConstructor/UserDefinition.php
  23. +5 −5 test/Fixture/Definition/ThrowsExceptionDuringConstruction/UserDefinition.php
  24. +3 −3 test/Fixture/Entity/Group.php
  25. +3 −3 test/Fixture/Entity/User.php
  26. +8 −9 test/{ → Unit}/Definition/AbstractDefinitionTest.php
  27. +20 −21 test/{ → Unit}/Definition/DefinitionsTest.php
  28. +5 −5 test/{ → Unit}/Definition/Exception/InvalidDefinitionTest.php
  29. +5 −5 test/{ → Unit}/Definition/Exception/InvalidDirectoryTest.php
  30. +5 −5 test/{ → Unit}/Definition/FakerAwareDefinitionTest.php
  31. +0 −37 test/Unit/ExampleTest.php
@@ -10,7 +10,7 @@ on: # yamllint disable-line rule:truthy

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

jobs:
@@ -252,9 +252,6 @@ 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,11 +35,8 @@ $config->getFinder()
'.build/',
'.dependabot/',
'.github/',
'src/Definition/',
'src/Doctrine/',
'test/Definition/',
'test/Doctrine/',
'test/Fixture/',
])
->name('.php_cs');

@@ -1,5 +1,5 @@
MIN_COVERED_MSI:=91
MIN_MSI:=53
MIN_MSI:=54

.PHONY: it
it: coding-standards dependency-analysis static-code-analysis tests ## Runs the coding-standards, dependency-analysis, static-code-analysis, and tests targets
@@ -46,7 +46,6 @@ 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
@@ -53,7 +53,6 @@
"Ergebnis\\FactoryBot\\": "src/"
},
"classmap": [
"src/Definition/",
"src/Doctrine/"
]
},
@@ -62,9 +61,7 @@
"Ergebnis\\FactoryBot\\Test\\": "test/"
},
"classmap": [
"test/Definition/",
"test/Doctrine/",
"test/Fixture/"
"test/Doctrine/"
]
},
"support": {
@@ -5,7 +5,7 @@ parameters:
checkMissingIterableValueType: false
ergebnis:
classesAllowedToBeExtended:
- Ergebnis\FactoryGirl\Definition\AbstractDefinition
- Ergebnis\FactoryBot\Definition\AbstractDefinition
- InvalidArgumentException
- RuntimeException
inferPrivatePropertyTypeFromConstructor: true
@@ -326,11 +326,6 @@
<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>
@@ -681,4 +676,9 @@
<code>Type::getType('statusarray')</code>
</PropertyTypeCoercion>
</file>
<file src="test/Unit/Definition/DefinitionsTest.php">
<MixedAssignment occurrences="1">
<code>$definitions</code>
</MixedAssignment>
</file>
</files>
@@ -3,15 +3,15 @@
declare(strict_types=1);

/**
* Copyright (c) 2017-2020 Andreas Möller
* Copyright (c) 2020 Andreas Möller
*
* For the full copyright and license information, please view
* the LICENSE.md file that was distributed with this source code.
*
* @see https://github.com/ergebnis/factory-girl-definition
* @see https://github.com/ergebnis/factory-bot
*/

namespace Ergebnis\FactoryGirl\Definition;
namespace Ergebnis\FactoryBot\Definition;

use Faker\Generator;

@@ -3,15 +3,15 @@
declare(strict_types=1);

/**
* Copyright (c) 2017-2020 Andreas Möller
* Copyright (c) 2020 Andreas Möller
*
* For the full copyright and license information, please view
* the LICENSE.md file that was distributed with this source code.
*
* @see https://github.com/ergebnis/factory-girl-definition
* @see https://github.com/ergebnis/factory-bot
*/

namespace Ergebnis\FactoryGirl\Definition;
namespace Ergebnis\FactoryBot\Definition;

use FactoryGirl\Provider\Doctrine\FixtureFactory;

@@ -3,15 +3,15 @@
declare(strict_types=1);

/**
* Copyright (c) 2017-2020 Andreas Möller
* Copyright (c) 2020 Andreas Möller
*
* For the full copyright and license information, please view
* the LICENSE.md file that was distributed with this source code.
*
* @see https://github.com/ergebnis/factory-girl-definition
* @see https://github.com/ergebnis/factory-bot
*/

namespace Ergebnis\FactoryGirl\Definition;
namespace Ergebnis\FactoryBot\Definition;

use Ergebnis\Classy;
use FactoryGirl\Provider\Doctrine\FixtureFactory;
@@ -3,15 +3,15 @@
declare(strict_types=1);

/**
* Copyright (c) 2017-2020 Andreas Möller
* Copyright (c) 2020 Andreas Möller
*
* For the full copyright and license information, please view
* the LICENSE.md file that was distributed with this source code.
*
* @see https://github.com/ergebnis/factory-girl-definition
* @see https://github.com/ergebnis/factory-bot
*/

namespace Ergebnis\FactoryGirl\Definition\Exception;
namespace Ergebnis\FactoryBot\Definition\Exception;

final class InvalidDefinition extends \RuntimeException
{
@@ -3,15 +3,15 @@
declare(strict_types=1);

/**
* Copyright (c) 2017-2020 Andreas Möller
* Copyright (c) 2020 Andreas Möller
*
* For the full copyright and license information, please view
* the LICENSE.md file that was distributed with this source code.
*
* @see https://github.com/ergebnis/factory-girl-definition
* @see https://github.com/ergebnis/factory-bot
*/

namespace Ergebnis\FactoryGirl\Definition\Exception;
namespace Ergebnis\FactoryBot\Definition\Exception;

final class InvalidDirectory extends \InvalidArgumentException
{
@@ -3,15 +3,15 @@
declare(strict_types=1);

/**
* Copyright (c) 2017-2020 Andreas Möller
* Copyright (c) 2020 Andreas Möller
*
* For the full copyright and license information, please view
* the LICENSE.md file that was distributed with this source code.
*
* @see https://github.com/ergebnis/factory-girl-definition
* @see https://github.com/ergebnis/factory-bot
*/

namespace Ergebnis\FactoryGirl\Definition;
namespace Ergebnis\FactoryBot\Definition;

use Faker\Generator;

This file was deleted.

@@ -13,7 +13,7 @@

namespace Ergebnis\FactoryBot\Test\AutoReview;

use Ergebnis\FactoryGirl\Definition;
use Ergebnis\FactoryBot\Definition;
use Ergebnis\Test\Util\Helper;
use FactoryGirl\Provider\Doctrine;
use PHPUnit\Framework;

This file was deleted.

@@ -3,18 +3,18 @@
declare(strict_types=1);

/**
* Copyright (c) 2017-2020 Andreas Möller
* Copyright (c) 2020 Andreas Möller
*
* For the full copyright and license information, please view
* the LICENSE.md file that was distributed with this source code.
*
* @see https://github.com/ergebnis/factory-girl-definition
* @see https://github.com/ergebnis/factory-bot
*/

namespace Ergebnis\FactoryGirl\Definition\Test\Fixture\Definition\Acceptable;
namespace Ergebnis\FactoryBot\Test\Fixture\Definition\Acceptable;

use Ergebnis\FactoryGirl\Definition\Definition;
use Ergebnis\FactoryGirl\Definition\Test\Fixture\Entity;
use Ergebnis\FactoryBot\Definition\Definition;
use Ergebnis\FactoryBot\Test\Fixture\Entity;
use FactoryGirl\Provider\Doctrine\FixtureFactory;

/**
@@ -3,17 +3,17 @@
declare(strict_types=1);

/**
* Copyright (c) 2017-2020 Andreas Möller
* Copyright (c) 2020 Andreas Möller
*
* For the full copyright and license information, please view
* the LICENSE.md file that was distributed with this source code.
*
* @see https://github.com/ergebnis/factory-girl-definition
* @see https://github.com/ergebnis/factory-bot
*/

namespace Ergebnis\FactoryGirl\Definition\Test\Fixture\Definition\DoesNotImplementInterface;
namespace Ergebnis\FactoryBot\Test\Fixture\Definition\DoesNotImplementInterface;

use Ergebnis\FactoryGirl\Definition\Test\Fixture\Entity;
use Ergebnis\FactoryBot\Test\Fixture\Entity;
use FactoryGirl\Provider\Doctrine\FixtureFactory;

/**
@@ -3,18 +3,18 @@
declare(strict_types=1);

/**
* Copyright (c) 2017-2020 Andreas Möller
* Copyright (c) 2020 Andreas Möller
*
* For the full copyright and license information, please view
* the LICENSE.md file that was distributed with this source code.
*
* @see https://github.com/ergebnis/factory-girl-definition
* @see https://github.com/ergebnis/factory-bot
*/

namespace Ergebnis\FactoryGirl\Definition\Test\Fixture\Definition\ExtendsAbstractDefinition;
namespace Ergebnis\FactoryBot\Test\Fixture\Definition\ExtendsAbstractDefinition;

use Ergebnis\FactoryGirl\Definition\AbstractDefinition;
use Ergebnis\FactoryGirl\Definition\Test\Fixture\Entity;
use Ergebnis\FactoryBot\Definition\AbstractDefinition;
use Ergebnis\FactoryBot\Test\Fixture\Entity;
use FactoryGirl\Provider\Doctrine\FixtureFactory;

final class UserDefinition extends AbstractDefinition
@@ -3,18 +3,18 @@
declare(strict_types=1);

/**
* Copyright (c) 2017-2020 Andreas Möller
* Copyright (c) 2020 Andreas Möller
*
* For the full copyright and license information, please view
* the LICENSE.md file that was distributed with this source code.
*
* @see https://github.com/ergebnis/factory-girl-definition
* @see https://github.com/ergebnis/factory-bot
*/

namespace Ergebnis\FactoryGirl\Definition\Test\Fixture\Definition\FakerAware;
namespace Ergebnis\FactoryBot\Test\Fixture\Definition\FakerAware;

use Ergebnis\FactoryGirl\Definition\FakerAwareDefinition;
use Ergebnis\FactoryGirl\Definition\Test\Fixture\Entity;
use Ergebnis\FactoryBot\Definition\FakerAwareDefinition;
use Ergebnis\FactoryBot\Test\Fixture\Entity;
use FactoryGirl\Provider\Doctrine\FixtureFactory;
use Faker\Generator;

0 comments on commit c552427

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