Skip to content

Commit 04c3b50

Browse files
committed
Merge remote-tracking branch 'upstream/master' into fix-composite-key-serialize
2 parents ef54844 + 608a35a commit 04c3b50

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2568
-1304
lines changed

.doctrine-project.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"active": true,
3+
"name": "Data fixtures",
4+
"slug": "data-fixtures",
5+
"docsSlug": "doctrine-data-fixtures",
6+
"versions": [
7+
{
8+
"name": "1.4",
9+
"branchName": "master",
10+
"slug": "latest",
11+
"upcoming": true
12+
},
13+
{
14+
"name": "1.3",
15+
"branchName": "1.3",
16+
"slug": "1.3",
17+
"current": true,
18+
"aliases": [
19+
"current",
20+
"stable"
21+
]
22+
}
23+
]
24+
}

.gitattributes

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Auto-detect text files, ensure they use LF.
2+
* text=auto eol=lf
3+
4+
# Exclude non-essential files from dist
5+
/tests export-ignore
6+
/.gitattributes export-ignore
7+
/.gitignore export-ignore
8+
/.travis.yml export-ignore
9+
/phpunit.xml.dist export-ignore

.github/FUNDING.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
patreon: phpdoctrine
2+
tidelift: packagist/doctrine%2Fdata-fixtures
3+
custom: https://www.doctrine-project.org/sponsorship.html

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
phpunit.xml
22
vendor/
3+
.phpcs-cache
34
composer.lock

.travis.yml

+25-7
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,30 @@ cache:
77
- $HOME/.composer/cache
88

99
php:
10-
- 5.3
11-
- 5.4
12-
- 5.5
13-
- 5.6
14-
- hhvm
10+
- 7.2
11+
- 7.3
12+
- 7.4snapshot
1513

16-
install: composer install
14+
services: mongodb
1715

18-
script: phpunit -v
16+
before_install:
17+
- pecl install -f mongodb
18+
- composer validate --strict
19+
20+
install:
21+
- composer update --prefer-stable --prefer-dist ${COMPOSER_FLAGS}
22+
23+
script:
24+
- ./vendor/bin/phpunit -v
25+
26+
jobs:
27+
include:
28+
# Tests the lowest set of dependencies
29+
- php: 7.2
30+
env: LOWEST COMPOSER_FLAGS="--prefer-lowest"
31+
32+
- stage: Code Quality
33+
env: CODING_STANDARDS
34+
php: 7.2
35+
script:
36+
- ./vendor/bin/phpcs

CHANGELOG.md

+170
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
# Change Log
2+
All notable changes to this project will be documented in this file.
3+
This project adheres to [Semantic Versioning](http://semver.org/).
4+
5+
## [1.3.0] - 2017-11-27
6+
7+
### Fixed
8+
- [248: Rename example classes names for consistency](https://github.com/doctrine/data-fixtures/pull/248) - @Kwadz
9+
- [253: Fix syntax highlighting on README](https://github.com/doctrine/data-fixtures/pull/253) - @fefas
10+
- [269: Remove tabs](https://github.com/doctrine/data-fixtures/pull/269) - @garak
11+
12+
### Changed
13+
- [266: Bump PHP requirement to 7.1](https://github.com/doctrine/data-fixtures/pull/266) - @alcaeus
14+
15+
### Added
16+
- [255: Added handling of PHPCR documents on method `getIdentifier()`](https://github.com/doctrine/data-fixtures/pull/255) - @aemaething
17+
- [274: Hook point to control creating fixtures objects](https://github.com/doctrine/data-fixtures/pull/274) - @weaverryan
18+
19+
### Fixed
20+
- [572: Only show generated migration in verbose mode](https://github.com/doctrine/migrations/pull/572) - @alcaeus
21+
22+
## [1.6.0] - 2017-11-09
23+
24+
### Fixed
25+
- [536: Fix typo in exception message](https://github.com/doctrine/migrations/pull/536) - @mantiz
26+
- [545: Allow nullable custom template](https://github.com/doctrine/migrations/pull/545) - @PapsOu
27+
- [560: Fix `--dry-run` and `--write-sql` with `addSql`](https://github.com/doctrine/migrations/pull/560) - @mikeSimonson
28+
- [569: Allow using absolute paths for custom template](https://github.com/doctrine/migrations/pull/569) - @alcaeus
29+
30+
### Changed
31+
- [537: Require PHP 7.1](https://github.com/doctrine/migrations/pull/537) - @lcobucci
32+
- [563: Remove copyright headers](https://github.com/doctrine/migrations/pull/563) - @mikeSimonson
33+
- [534: Change RecursiveRegexFinder to follow Symlinks](https://github.com/doctrine/migrations/pull/534) - @burci
34+
35+
### Added
36+
- [506: Add migration events](https://github.com/doctrine/migrations/pull/506) - @chrisguitarguy
37+
- [509: Add delta in migrate command](https://github.com/doctrine/migrations/pull/509) - @Safranil
38+
- [535: Allow changing migration class template in generate command](https://github.com/doctrine/migrations/pull/535) - @PapsOu
39+
- [542: Enable phpcs to ensure coding style](https://github.com/doctrine/migrations/pull/542) - @lcobucci
40+
- [562: Allow providing a path for file dump](https://github.com/doctrine/migrations/pull/562) - @mikeSimonson
41+
- [565: Allow Symfony 4](https://github.com/doctrine/migrations/565) - @weaverryan
42+
- [568: Add `ConfigurationHelperInterface` to allow overriding internal class](https://github.com/doctrine/migrations/pull/568) - @alcaeus
43+
- [571: Allow changing migration class template in diff command](https://github.com/doctrine/migrations/pull/571) - @alcaeus
44+
45+
## [1.5.0] - 2016-12-25
46+
47+
### Fixed
48+
- [447: Fix typo in error code](https://github.com/doctrine/migrations/pull/447) thanks to @funivan
49+
- [448: Removed unused import](https://github.com/doctrine/migrations/pull/448) thanks to @localheinz
50+
- [451: Case insensitive method calls and types](https://github.com/doctrine/migrations/pull/451) thanks to @localheinz
51+
- [449: Use the class keyword](https://github.com/doctrine/migrations/pull/449) thanks to @localheinz
52+
- [453: Use better assertions](https://github.com/doctrine/migrations/pull/453) thanks to @localheinz
53+
- [452: Fix the visibility of the AbstractTest](https://github.com/doctrine/migrations/pull/452) thanks to @localheinz
54+
- [450: Use the short array syntax](https://github.com/doctrine/migrations/pull/450) thanks to @localheinz
55+
- [464: Clean the github autogenerated zip archive](https://github.com/doctrine/migrations/pull/464) thanks to @mlocati
56+
- [457: Fix an issue where the migration wheren't sorted propely](https://github.com/doctrine/migrations/pull/457) thanks to @JHGitty, @Charles68
57+
- [451: Case insensitive method calls and types](https://github.com/doctrine/migrations/pull/451) thanks to @localheinz
58+
- [471: Fix loading the configuration from a php file](https://github.com/doctrine/migrations/pull/471) thanks to @aaa2000
59+
- [451: Case insensitive method calls and types](https://github.com/doctrine/migrations/pull/451) thanks to @localheinz
60+
- [472: Change comment marker a cross platform one ](https://github.com/doctrine/migrations/pull/472) thanks to @aaa2000
61+
- [476: Add test for the execute command](https://github.com/doctrine/migrations/pull/476) thanks to @chrisguitarguy
62+
- [470: Case insensitive method calls and types](https://github.com/doctrine/migrations/pull/470) thanks to @abacaphiliac
63+
- [489: Better help message in the execute command](https://github.com/doctrine/migrations/pull/489) thanks to @eko
64+
- [500: Updating the dev dependencies](https://github.com/doctrine/migrations/pull/500) thanks to @mikeSimonson
65+
- [501: Fix a bug in a rarely used message call](https://github.com/doctrine/migrations/pull/501) thanks to @Seldaek
66+
67+
### Changed
68+
- [478: Changed the default generated version number to UTC](https://github.com/doctrine/migrations/pull/446) thanks to @c960657
69+
- [479: Explicitly connecting to support master slave connections](https://github.com/doctrine/migrations/pull/479) thanks to @chrisguitarguy
70+
- [482: Use strict comparaison in the generated migrations](https://github.com/doctrine/migrations/pull/482) thanks to @tifabien
71+
72+
### Added
73+
- [470: Add uptodate command](https://github.com/doctrine/migrations/pull/470) thanks to @abacaphiliac
74+
- [477: Add parameters to the output of the dry run migrations](https://github.com/doctrine/migrations/pull/477) thanks to @chrisguitarguy
75+
- [497: Show the content of the generated file on the console](https://github.com/doctrine/migrations/pull/497) thanks to @ErikTrapman
76+
- [480: Don't prompt the user for confirmation when there is nothing to do](https://github.com/doctrine/migrations/pull/480) thanks to @chrisguitarguy
77+
78+
79+
## [1.4.1] - 2016-03-14
80+
### Fixed
81+
- [439: Add missing dependency in the phar build](https://github.com/doctrine/migrations/pull/439)
82+
83+
84+
## [1.4.0] - 2016-02-23
85+
### Added
86+
- [431: Formatted diffs](https://github.com/doctrine/migrations/pull/431)
87+
- [437: Allowing to set the column name from config too](https://github.com/doctrine/migrations/pull/437)
88+
89+
## [1.3.1] - 2016-02-23
90+
### Fixed
91+
- [433: Fix: ExecuteCommand by making sure that it autoload the versions](https://github.com/doctrine/migrations/pull/433)
92+
- [434: Fixing an issue in the order at which some configuration key are loaded](https://github.com/doctrine/migrations/pull/434)
93+
94+
### Changed
95+
- [429: code refactoring for clarity](https://github.com/doctrine/migrations/pull/429)
96+
- [428: code refactoring for clarity](https://github.com/doctrine/migrations/pull/428)
97+
98+
### Added
99+
- [425: ProxyManager ~2.0 is also compatible with migrations](https://github.com/doctrine/migrations/pull/425)
100+
101+
102+
## [1.3.0] - 2016-01-23
103+
### Fixed
104+
- [421: Fix issue with some method when the migrations were not loaded](https://github.com/doctrine/migrations/pull/421)
105+
- [405: Correcting composer constraints: allowing PHP 7, dropping 5.4 support](https://github.com/doctrine/migrations/pull/405)
106+
- [406: putting the composer.json back in the archive](https://github.com/doctrine/migrations/pull/406)
107+
108+
### Changed
109+
- [233: Separate Configuration Objects from Configuration File Loading](https://github.com/doctrine/migrations/issues/233)
110+
- [407: Replacing the Schema by a proxy](https://github.com/doctrine/migrations/pull/407)
111+
- [422: Refactor the getConnection into a chainloader](https://github.com/doctrine/migrations/pull/422)
112+
- [Dropped the support for php 5.4](https://github.com/doctrine/migrations/pull/393)
113+
- [Again make the phar more than 3 times smaller](https://github.com/doctrine/migrations/pull/396)
114+
115+
### Added
116+
- [404: add possibility to read doctrine's config/cli-config.php](https://github.com/doctrine/migrations/pull/404)
117+
- [409: Add a failing test case for an edge case with the write-sql option](https://github.com/doctrine/migrations/pull/409)
118+
- [424: Adding a regression test for the configuration](https://github.com/doctrine/migrations/pull/424)
119+
- [391: Give the possibility to override the Migration template](https://github.com/doctrine/migrations/pull/391)
120+
121+
## [1.2.2] - 2016-01-07
122+
### Fixed
123+
- [Fix the write-sql option in the version class too](https://github.com/doctrine/migrations/commit/91043f742da8506ab7115a1d14247ce26375f6f5)
124+
125+
## [1.2.1] - 2015-12-23
126+
### Fixed
127+
- [Fix the write-sql option](https://github.com/doctrine/migrations/pull/400)
128+
129+
## [1.2.0] - 2015-12-15
130+
### Fixed
131+
- [fix "all migrated versions shown as unavailable executed" ](https://github.com/doctrine/migrations/commit/875849e2a80d37dc8bf5dd0663e464b6789e3b56)
132+
- [Prevent the use of 0 as migration name as it is used internally and conflict](http://github.com/doctrine/migrations/commit/5df49c5ad5dc2265401a54a3b9e6ecb3e7cda8d0)
133+
- [composer: drop symfony/console from suggested packages, since it's required package](http://github.com/doctrine/migrations/commit/d263c7bfac7188009ab0717ed5aa6577e80)
134+
- [fix spaces and complete missing file-docblocks](http://github.com/doctrine/migrations/commit/4b68a69c3e35492b36ec140ebb216cdb80ffe655)
135+
- [RecursiveDirectoryIterator don't obtain some order of the file list.](http://github.com/doctrine/migrations/commit/ed95c05c14381e64404f1135763fcc9b65317b96)
136+
- [Fix the yml parser issue with unescaped backslash in double quoted string](http://github.com/doctrine/migrations/commit/af3cce7d2e490ead821fcbdb54b4772b4913ee1d)
137+
138+
### Changed
139+
- [Adding compression to the generation of the phar](http://github.com/doctrine/migrations/commit/70730ff8655f0be89ce0f06d1e279930d7eb2550)
140+
- [tests: move autoload of tests to composer](http://github.com/doctrine/migrations/commit/3a4f8368e4b7b95d2e6c51c26f6dc41bb05a5ce5)
141+
- [travis: drop PHP 7.0 from allowed failures, it passes well](http://github.com/doctrine/migrations/commit/57ec2f071a7a840c554058b77f2089893d06ba23)
142+
- [Revert the use of exec to run sql queries](http://github.com/doctrine/migrations/commit/0af6e6e705b905a56cbed26cb5c17faad4c2c04f)
143+
144+
### Added
145+
- [Adding a little script to prepare and generate the phar](http://github.com/doctrine/migrations/commit/3a8ef413e7f8a42d4e0f3d32d30601b26fb27e60)
146+
- [Configuration: check if migration class exists added](http://github.com/doctrine/migrations/commit/a53d7c83b319341c985d2a21950e260fa55b0b8d)
147+
- [Made composer.json compatible with SF 3.0](http://github.com/doctrine/migrations/commit/4e909f2e661a8414a3e04ce987a09c9e849cd13f)
148+
- [Added configurable version column name](http://github.com/doctrine/migrations/commit/02ddf4318b84a20bb0e3486acfc6e6f41cc63426)
149+
150+
## [1.1.0] - 2015-09-29
151+
### Fixed
152+
- [Switch unexisting <warning> tag to <comment>](http://github.com/doctrine/migrations/commit/93a81ff0dcc858de4df5c17d97f2f24b3bfa3c36)
153+
- [Ensure that Yaml::parse return an array as it can apparently return a string](http://github.com/doctrine/migrations/commit/1499f0cc3e5f5b20a510ba8f0779d5c68a9e5084)
154+
- [Avoid uploading code coverage to Scrutinizer for HHVM and PHP 7](http://github.com/doctrine/migrations/commit/d47d65021dcb711480bf27f6d0bbba138e220f12)
155+
- [Improve the Travis configuration by persisting the composer cache](http://github.com/doctrine/migrations/commit/bda0509b479ae6605b8fa749b0999b4ce2ff8c04)
156+
- [Keep the license file in the downloadable archives](https://github.com/doctrine/migrations/commit/dfbee38e004899bc078d5d47b13bea53799fca1e#diff-fc723d30b02a4cca7a534518111c1a66)
157+
158+
### Changed
159+
- [Use short array syntax](http://github.com/doctrine/migrations/commit/50a6e18c95ff617325229a4a649d65c1a11445bc)
160+
- [composer: use PSR-4 autoload](http://github.com/doctrine/migrations/commit/7fb8d301b2f4d4a564433165e0604b7d34013844)
161+
- [refactoring the configuration loading](http://github.com/doctrine/migrations/commit/e95b277111c74cfe65eb959d4471f45a815e1ece)
162+
- [Drop support for php 5.3](https://github.com/doctrine/migrations/commit/0e60856a10e8b510daa612fe25f6245aece77e68)
163+
- [compressing the phar so that it's half the size now](https://github.com/doctrine/migrations/commit/70730ff8655f0be89ce0f06d1e279930d7eb2550)
164+
165+
### Added
166+
- [Added the ability to auto create migrations in a folder by month and year](http://github.com/doctrine/migrations/commit/0b8e40868e12a36de7f689add61857b9ba29c4bc)
167+
- [Set default name for configuration helper](http://github.com/doctrine/migrations/commit/1f3592f2f126a022db275192f17b8d5c01f19822)
168+
- [Added ability to load config from php array or json files.](http://github.com/doctrine/migrations/commit/8cf01d623f9eb3728ba86c22970347107a8f0be7)
169+
- [Added the possibility to inject the OutputWriter after instantiation](https://github.com/doctrine/migrations/pull/342)
170+
- [Added the --allow-no-migration option to avoid throwing an exception if no migrations are found](https://github.com/doctrine/migrations/commit/a9ec86faa3a3f7f592a633af43b6ef6c9f358239#diff-0a4648a19ba565cda76b349e89552a9b)

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2006-2012 Doctrine Project
1+
Copyright (c) 2006-2015 Doctrine Project
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of
44
this software and associated documentation files (the "Software"), to deal in

README.md

+15-13
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# Doctrine Data Fixtures Extension
22

3-
[![Build Status](https://travis-ci.org/doctrine/data-fixtures.png)](https://travis-ci.org/doctrine/data-fixtures)
3+
[![Build Status](https://travis-ci.org/doctrine/data-fixtures.svg?branch=master)](https://travis-ci.org/doctrine/data-fixtures)
44

55
This extension aims to provide a simple way to manage and execute the loading of data fixtures
6-
for the Doctrine ORM or ODM. You can write fixture classes by implementing the
7-
Doctrine\Common\DataFixtures\FixtureInterface interface:
6+
for the [Doctrine ORM or ODM](http://www.doctrine-project.org/). You can write fixture classes
7+
by implementing the [`Doctrine\Common\DataFixtures\FixtureInterface`](lib/Doctrine/Common/DataFixtures/FixtureInterface.php) interface:
88

99
```php
1010
namespace MyDataFixtures;
1111

1212
use Doctrine\Common\Persistence\ObjectManager;
1313
use Doctrine\Common\DataFixtures\FixtureInterface;
1414

15-
class LoadUserData implements FixtureInterface
15+
class UserFixtureLoader implements FixtureInterface
1616
{
1717
public function load(ObjectManager $manager)
1818
{
@@ -30,10 +30,10 @@ Now you can begin adding the fixtures to a loader instance:
3030

3131
```php
3232
use Doctrine\Common\DataFixtures\Loader;
33-
use MyDataFixtures\LoadUserData;
33+
use MyDataFixtures\UserDataLoader;
3434

3535
$loader = new Loader();
36-
$loader->addFixture(new LoadUserData);
36+
$loader->addFixture(new UserDataLoader());
3737
```
3838

3939
You can load a set of fixtures from a directory as well:
@@ -44,7 +44,9 @@ $loader->loadFromDirectory('/path/to/MyDataFixtures');
4444

4545
Or you can load a set of fixtures from a file:
4646

47-
$loader->loadFromFile('/path/to/MyDataFixtures/MyFixture1.php');
47+
```php
48+
$loader->loadFromFile('/path/to/MyDataFixtures/MyFixture1.php');
49+
```
4850

4951
You can get the added fixtures using the getFixtures() method:
5052

@@ -82,14 +84,14 @@ namespace MyDataFixtures;
8284
use Doctrine\Common\DataFixtures\AbstractFixture;
8385
use Doctrine\Common\Persistence\ObjectManager;
8486

85-
class LoadUserRoleData extends AbstractFixture
87+
class UserRoleDataLoader extends AbstractFixture
8688
{
8789
public function load(ObjectManager $manager)
8890
{
8991
$adminRole = new Role();
9092
$adminRole->setName('admin');
9193

92-
$anonymousRole = new Role;
94+
$anonymousRole = new Role();
9395
$anonymousRole->setName('anonymous');
9496

9597
$manager->persist($adminRole);
@@ -110,7 +112,7 @@ namespace MyDataFixtures;
110112
use Doctrine\Common\DataFixtures\AbstractFixture;
111113
use Doctrine\Common\Persistence\ObjectManager;
112114

113-
class LoadUserData extends AbstractFixture
115+
class UserDataLoader extends AbstractFixture
114116
{
115117
public function load(ObjectManager $manager)
116118
{
@@ -190,10 +192,10 @@ class MyOtherFixture extends AbstractFixture
190192

191193
## Running the tests:
192194

193-
PHPUnit 3.5 or newer together with Mock_Object package is required.
195+
Phpunit is included in the dev requirements of this package.
196+
194197
To setup and run tests follow these steps:
195198

196199
- go to the root directory of data-fixtures
197200
- run: **composer install --dev**
198-
- copy the phpunit config **cp phpunit.xml.dist phpunit.xml**
199-
- run: **phpunit**
201+
- run: **vendor/bin/phpunit**

0 commit comments

Comments
 (0)