Skip to content
This repository has been archived by the owner on Aug 29, 2020. It is now read-only.

Commit

Permalink
Fix: Rename namespace after move to @ergebnis
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Dec 10, 2019
1 parent 0dd1756 commit 22d39cb
Show file tree
Hide file tree
Showing 28 changed files with 164 additions and 122 deletions.
4 changes: 2 additions & 2 deletions .php_cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ declare(strict_types=1);
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* @link https://github.com/localheinz/factory-girl-definition
* @link https://github.com/ergebnis/factory-girl-definition
*/

use Ergebnis\PhpCsFixer\Config;
Expand All @@ -19,7 +19,7 @@ Copyright (c) 2017 Andreas Möller
For the full copyright and license information, please view
the LICENSE file that was distributed with this source code.
@link https://github.com/localheinz/factory-girl-definition
@link https://github.com/ergebnis/factory-girl-definition
EOF;

$config = Config\Factory::fromRuleSet(new Config\RuleSet\Php71($header));
Expand Down
87 changes: 63 additions & 24 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,46 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## Unreleased

For a full diff see [`1.3.0...master`][1.3.0...master]
For a full diff see [`2.0.0...master`][2.0.0...master]

## [`2.0.0`][2.0.0]

For a full diff see [`1.3.0...2.0.0`][1.3.0...2.0.0].

### Changed

* Added return type declarations ([#71]), by [@localheinz]
* Renamed vendor namespace `Localheinz` to `Ergebnis` after move to [@ergebnis] ([#73]), by [@localheinz]

Run

```
$ composer remove localheinz/factory-girl-definition
```

and

```
$ composer require ergebnis/factory-girl-definition
```

to update.

Run

```
$ find . -type f -exec sed -i '.bak' 's/Localheinz\\FactoryGirl\\Definition/Ergebnis\\FactoryGirl\\Definition/g' {} \;
```

to replace occurrences of `Localheinz\FactoryGirl\Definition` with `Ergebnis\FactoryGirl\Definition`.

Run

```
$ find -type f -name '*.bak' -delete
```

to delete backup files created in the previous step.

### Fixed

Expand Down Expand Up @@ -56,27 +91,31 @@ For a full diff see [`740095e...0.1.0`][740095e...0.1.0].

* Added interface and finder ([#1]), by [@localheinz]

[0.1.0]: https://github.com/localheinz/factory-girl-definition/tag/0.1.0
[0.1.1]: https://github.com/localheinz/factory-girl-definition/tag/0.1.1
[0.2.0]: https://github.com/localheinz/factory-girl-definition/tag/0.2.0
[1.0.0]: https://github.com/localheinz/factory-girl-definition/tag/1.0.0
[1.1.0]: https://github.com/localheinz/factory-girl-definition/tag/1.1.0
[1.2.0]: https://github.com/localheinz/factory-girl-definition/tag/1.2.0
[1.3.0]: https://github.com/localheinz/factory-girl-definition/tag/1.3.0

[740095e...0.1.0]: https://github.com/localheinz/factory-girl-definition/compare/740095e...0.1.0
[0.1.0...0.1.1]: https://github.com/localheinz/factory-girl-definition/compare/0.1.0...0.1.1
[0.1.1...0.2.0]: https://github.com/localheinz/factory-girl-definition/compare/0.1.1...0.2.0
[0.2.0...1.0.0]: https://github.com/localheinz/factory-girl-definition/compare/0.2.0...1.0.0
[1.0.0...1.1.0]: https://github.com/localheinz/factory-girl-definition/compare/1.0.0...1.1.0
[1.1.0...1.2.0]: https://github.com/localheinz/factory-girl-definition/compare/1.1.0...1.2.0
[1.2.0...1.3.0]: https://github.com/localheinz/factory-girl-definition/compare/1.1.0...1.3.0
[1.3.0...master]: https://github.com/localheinz/factory-girl-definition/compare/1.3.0...master

[#1]: https://github.com/localheinz/factory-girl-definition/pull/1
[#3]: https://github.com/localheinz/factory-girl-definition/pull/3
[#4]: https://github.com/localheinz/factory-girl-definition/pull/4
[#69]: https://github.com/localheinz/factory-girl-definition/pull/69
[#71]: https://github.com/localheinz/factory-girl-definition/pull/71

[0.1.0]: https://github.com/ergebnis/factory-girl-definition/tag/0.1.0
[0.1.1]: https://github.com/ergebnis/factory-girl-definition/tag/0.1.1
[0.2.0]: https://github.com/ergebnis/factory-girl-definition/tag/0.2.0
[1.0.0]: https://github.com/ergebnis/factory-girl-definition/tag/1.0.0
[1.1.0]: https://github.com/ergebnis/factory-girl-definition/tag/1.1.0
[1.2.0]: https://github.com/ergebnis/factory-girl-definition/tag/1.2.0
[1.3.0]: https://github.com/ergebnis/factory-girl-definition/tag/1.3.0
[2.0.0]: https://github.com/ergebnis/factory-girl-definition/tag/2.0.0

[740095e...0.1.0]: https://github.com/ergebnis/factory-girl-definition/compare/740095e...0.1.0
[0.1.0...0.1.1]: https://github.com/ergebnis/factory-girl-definition/compare/0.1.0...0.1.1
[0.1.1...0.2.0]: https://github.com/ergebnis/factory-girl-definition/compare/0.1.1...0.2.0
[0.2.0...1.0.0]: https://github.com/ergebnis/factory-girl-definition/compare/0.2.0...1.0.0
[1.0.0...1.1.0]: https://github.com/ergebnis/factory-girl-definition/compare/1.0.0...1.1.0
[1.1.0...1.2.0]: https://github.com/ergebnis/factory-girl-definition/compare/1.1.0...1.2.0
[1.2.0...1.3.0]: https://github.com/ergebnis/factory-girl-definition/compare/1.1.0...1.3.0
[1.3.0...2.0.0]: https://github.com/ergebnis/factory-girl-definition/compare/1.3.0...2.0.0
[2.0.0...master]: https://github.com/ergebnis/factory-girl-definition/compare/2.0.0...master

[#1]: https://github.com/ergebnis/factory-girl-definition/pull/1
[#3]: https://github.com/ergebnis/factory-girl-definition/pull/3
[#4]: https://github.com/ergebnis/factory-girl-definition/pull/4
[#69]: https://github.com/ergebnis/factory-girl-definition/pull/69
[#71]: https://github.com/ergebnis/factory-girl-definition/pull/71
[#73]: https://github.com/ergebnis/factory-girl-definition/pull/73

[@ergebnis]: https://github.com/ergebnis
[@localheinz]: https://github.com/localheinz
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# factory-girl-definition

[![Continuous Integration](https://github.com/localheinz/factory-girl-definition/workflows/Continuous%20Integration/badge.svg)](https://github.com/localheinz/factory-girl-definition/actions)
[![Code Coverage](https://codecov.io/gh/localheinz/factory-girl-definition/branch/master/graph/badge.svg)](https://codecov.io/gh/localheinz/factory-girl-definition)
[![Latest Stable Version](https://poser.pugx.org/localheinz/factory-girl-definition/v/stable)](https://packagist.org/packages/localheinz/factory-girl-definition)
[![Total Downloads](https://poser.pugx.org/localheinz/factory-girl-definition/downloads)](https://packagist.org/packages/localheinz/factory-girl-definition)
[![Continuous Integration](https://github.com/ergebnis/factory-girl-definition/workflows/Continuous%20Integration/badge.svg)](https://github.com/ergebnis/factory-girl-definition/actions)
[![Code Coverage](https://codecov.io/gh/ergebnis/factory-girl-definition/branch/master/graph/badge.svg)](https://codecov.io/gh/ergebnis/factory-girl-definition)
[![Latest Stable Version](https://poser.pugx.org/ergebnis/factory-girl-definition/v/stable)](https://packagist.org/packages/ergebnis/factory-girl-definition)
[![Total Downloads](https://poser.pugx.org/ergebnis/factory-girl-definition/downloads)](https://packagist.org/packages/ergebnis/factory-girl-definition)

Provides an interface for, and an easy way to find and register entity definitions for [`breerly/factory-girl-php`](https://github.com/breerly/factory-girl-php).

Expand All @@ -12,7 +12,7 @@ Provides an interface for, and an easy way to find and register entity definitio
Run

```
$ composer require --dev localheinz/factory-girl-definition
$ composer require --dev ergebnis/factory-girl-definition
```

## Usage
Expand All @@ -21,8 +21,8 @@ $ composer require --dev localheinz/factory-girl-definition

Implement one of the

* `Localheinz\FactoryGirl\Definition\Definition`
* `Localheinz\FactoryGirl\Definition\FakerAwareDefinition`
* `Ergebnis\FactoryGirl\Definition\Definition`
* `Ergebnis\FactoryGirl\Definition\FakerAwareDefinition`

interfaces and use the instance of `FactoryGirl\Provider\Doctrine\FixtureFactory`
that is passed into `accept()` to define entities:
Expand All @@ -32,9 +32,9 @@ that is passed into `accept()` to define entities:

namespace Foo\Bar\Test\Fixture\Entity;

use Ergebnis\FactoryGirl\Definition\Definition;
use FactoryGirl\Provider\Doctrine\FixtureFactory;
use Foo\Bar\Entity;
use Localheinz\FactoryGirl\Definition\Definition;

final class UserDefinition implements Definition
{
Expand Down Expand Up @@ -63,9 +63,9 @@ fixture factory, and optionally provide definitions with an instance of
namespace Foo\Bar\Test\Integration;

use Doctrine\ORM;
use Ergebnis\FactoryGirl\Definition\Definitions;
use FactoryGirl\Provider\Doctrine\FixtureFactory;
use Faker\Generator;
use Localheinz\FactoryGirl\Definition\Definitions;
use PHPUnit\Framework;

abstract class AbstractIntegrationTestCase extends Framework\TestCase
Expand Down
15 changes: 9 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "localheinz/factory-girl-definition",
"name": "ergebnis/factory-girl-definition",
"type": "library",
"description": "Provides an interface for, and an easy way to find and register entity definitions for breerly/factory-girl-php.",
"homepage": "https://github.com/localheinz/factory-girl-definition",
"homepage": "https://github.com/ergebnis/factory-girl-definition",
"license": "MIT",
"authors": [
{
Expand All @@ -16,6 +16,9 @@
"ergebnis/classy": "~0.5.0",
"fzaninotto/faker": "^1.9.0"
},
"replace": {
"localheinz/factory-girl-definition": "*"
},
"require-dev": {
"ergebnis/php-cs-fixer-config": "~1.0.0",
"ergebnis/phpstan-rules": "~0.14.0",
Expand All @@ -38,16 +41,16 @@
},
"autoload": {
"psr-4": {
"Localheinz\\FactoryGirl\\Definition\\": "src"
"Ergebnis\\FactoryGirl\\Definition\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Localheinz\\FactoryGirl\\Definition\\Test\\": "test"
"Ergebnis\\FactoryGirl\\Definition\\Test\\": "test"
}
},
"support": {
"issues": "https://github.com/localheinz/factory-girl-definition/issues",
"source": "https://github.com/localheinz/factory-girl-definition"
"issues": "https://github.com/ergebnis/factory-girl-definition/issues",
"source": "https://github.com/ergebnis/factory-girl-definition"
}
}
2 changes: 1 addition & 1 deletion 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 phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ includes:
parameters:
ergebnis:
classesAllowedToBeExtended:
- Ergebnis\FactoryGirl\Definition\AbstractDefinition
- InvalidArgumentException
- Localheinz\FactoryGirl\Definition\AbstractDefinition
- RuntimeException
inferPrivatePropertyTypeFromConstructor: true
level: max
Expand Down
4 changes: 2 additions & 2 deletions src/AbstractDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* @link https://github.com/localheinz/factory-girl-definition
* @link https://github.com/ergebnis/factory-girl-definition
*/

namespace Localheinz\FactoryGirl\Definition;
namespace Ergebnis\FactoryGirl\Definition;

use Faker\Generator;

Expand Down
4 changes: 2 additions & 2 deletions src/Definition.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* @link https://github.com/localheinz/factory-girl-definition
* @link https://github.com/ergebnis/factory-girl-definition
*/

namespace Localheinz\FactoryGirl\Definition;
namespace Ergebnis\FactoryGirl\Definition;

use FactoryGirl\Provider\Doctrine\FixtureFactory;

Expand Down
4 changes: 2 additions & 2 deletions src/Definitions.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* @link https://github.com/localheinz/factory-girl-definition
* @link https://github.com/ergebnis/factory-girl-definition
*/

namespace Localheinz\FactoryGirl\Definition;
namespace Ergebnis\FactoryGirl\Definition;

use Ergebnis\Classy;
use FactoryGirl\Provider\Doctrine\FixtureFactory;
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/InvalidDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* @link https://github.com/localheinz/factory-girl-definition
* @link https://github.com/ergebnis/factory-girl-definition
*/

namespace Localheinz\FactoryGirl\Definition\Exception;
namespace Ergebnis\FactoryGirl\Definition\Exception;

final class InvalidDefinition extends \RuntimeException
{
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/InvalidDirectory.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* @link https://github.com/localheinz/factory-girl-definition
* @link https://github.com/ergebnis/factory-girl-definition
*/

namespace Localheinz\FactoryGirl\Definition\Exception;
namespace Ergebnis\FactoryGirl\Definition\Exception;

final class InvalidDirectory extends \InvalidArgumentException
{
Expand Down
4 changes: 2 additions & 2 deletions src/FakerAwareDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* @link https://github.com/localheinz/factory-girl-definition
* @link https://github.com/ergebnis/factory-girl-definition
*/

namespace Localheinz\FactoryGirl\Definition;
namespace Ergebnis\FactoryGirl\Definition;

use Faker\Generator;

Expand Down
8 changes: 4 additions & 4 deletions test/AutoReview/SrcCodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* @link https://github.com/localheinz/factory-girl-definition
* @link https://github.com/ergebnis/factory-girl-definition
*/

namespace Localheinz\FactoryGirl\Definition\Test\AutoReview;
namespace Ergebnis\FactoryGirl\Definition\Test\AutoReview;

use Ergebnis\Test\Util\Helper;
use PHPUnit\Framework;
Expand All @@ -29,8 +29,8 @@ public function testSrcClassesHaveUnitTests(): void
{
self::assertClassesHaveTests(
__DIR__ . '/../../src',
'Localheinz\\FactoryGirl\\Definition\\',
'Localheinz\\FactoryGirl\\Definition\\Test\\Unit\\'
'Ergebnis\\FactoryGirl\\Definition\\',
'Ergebnis\\FactoryGirl\\Definition\\Test\\Unit\\'
);
}
}
8 changes: 4 additions & 4 deletions test/Fixture/Definition/Acceptable/UserDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* @link https://github.com/localheinz/factory-girl-definition
* @link https://github.com/ergebnis/factory-girl-definition
*/

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

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

/**
* Is acceptable as it implements the interface.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* @link https://github.com/localheinz/factory-girl-definition
* @link https://github.com/ergebnis/factory-girl-definition
*/

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

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

/**
* Is not acceptable as it does not implement the DefinitionInterface.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* @link https://github.com/localheinz/factory-girl-definition
* @link https://github.com/ergebnis/factory-girl-definition
*/

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

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

final class UserDefinition extends AbstractDefinition
{
Expand Down
Loading

0 comments on commit 22d39cb

Please sign in to comment.