Skip to content

Commit 7a83409

Browse files
committed
adjust from dantleech
1 parent 70728f3 commit 7a83409

26 files changed

+61
-71
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- 'master'
7+
- '[0-9]+.x'
8+
- '[0-9]+.[0-9]+'
9+
- '[0-9]+.[0-9]+.x'
810

911
jobs:
1012
php:
1113
name: "PHP ${{ matrix.php-version }}"
1214
runs-on: ubuntu-latest
1315

1416
env:
15-
KERNEL_CLASS: DTL\Bundle\PhpcrMigrations\Tests\Resources\App\AppKernel
17+
KERNEL_CLASS: PHPCR\PhpcrMigrationsBundle\Tests\Resources\App\AppKernel
1618

1719
strategy:
1820
fail-fast: false
@@ -40,7 +42,7 @@ jobs:
4042

4143
steps:
4244
- name: Checkout project
43-
uses: actions/checkout@v2
45+
uses: actions/checkout@v4
4446

4547
- name: Install and configure PHP
4648
uses: shivammathur/setup-php@v2

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
Tests/Resources/app/cache
2-
Tests/Resources/app/logs
1+
tests/Resources/App/var
32
composer.lock
43
vendor
54
.phpunit.result.cache
6-
Tests/Resources/App/var/cache
7-
Tests/Resources/App/var/logs

CHANGELOG.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
CHANGELOG
22
=========
33

4-
1.3.0
4+
1.4.0
55
-----
66

7-
- Support Symfony 6
8-
- Drop Support for PHP <= 7.1 and Symfony <= 4.3
7+
Initial release after renaming from `dantleech/phpcr-migrations-bundle` to `phpcr/phpcr-migrations-bundle`.
98

10-
1.2.0
11-
-----
12-
13-
- Support Symfony 5
9+
Adjusted namespaces to match PHPCR.

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,23 @@ PHPCR Migrations Bundle
22
=======================
33

44
This library provides a Symfony integration for the [PHPCR migrations
5-
library](https://github.com/dantleech/phpcr-migrations).
5+
library](https://github.com/phpcr/phpcr-migrations).
6+
7+
It has initially been created by Daniel Leech as `dantleech/phpcr-migrations-bundle` and was then
8+
donated to the PHPCR organization.
69

710
Configuration
811
-------------
912

1013
Configure the path to your migrations:
1114

1215
````yaml
13-
# app/config.yml
16+
# config/packages/phpcr-migrations.yaml
1417
phpcr_migrations:
15-
paths: [%kernel.root_dir%/phpcr-migrations]
18+
paths: [%kernel.project_dir%/phpcr-migrations]
1619
````
1720

18-
Or the bundle will automatically pick up any migrations in the
21+
And the bundle will automatically pick up any migrations in the
1922
`Resources/phpcr-migrations` folder in any bundles registered in the kernel.
2023

2124
Creating migrations
@@ -25,19 +28,19 @@ First create two new migration files:
2528

2629
````php
2730
<?php
28-
// app/phpcr-migrations/Version201501011200.php
31+
// phpcr-migrations/Version201501011200.php
2932

3033
use PHPCR\SessionInterface;
3134
use PHPCR\Migrations\VersionInterface;
3235

3336
class Version201501011200 implements VersionInterface
3437
{
35-
public function up(SessionInterface $session)
38+
public function up(SessionInterface $session): void
3639
{
3740
$session->getRootNode()->addNode('hello');
3841
}
3942

40-
public function down(SessionInterface $session)
43+
public function down(SessionInterface $session): void
4144
{
4245
$session->getRootNode()->getNode('hello')->remove();
4346
}
@@ -55,12 +58,12 @@ use PHPCR\Migrations\VersionInterface;
5558

5659
class Version201501011212 implements VersionInterface
5760
{
58-
public function up(SessionInterface $session)
61+
public function up(SessionInterface $session): void
5962
{
6063
$session->getNode('/hello')->addNode('world');
6164
}
6265

63-
public function down(SessionInterface $session)
66+
public function down(SessionInterface $session): void
6467
{
6568
$session->getNode('/hello')->getNode('world')->remove();
6669
}
@@ -99,7 +102,7 @@ Upgrading 2 version(s):
99102
+ [2/2]: 201501011212
100103
````
101104

102-
This should run the two migrations, your status should not look like this:
105+
This should run the two migrations.
103106

104107
Reverting
105108
---------
@@ -129,4 +132,3 @@ Actions are:
129132
- `down`: Revert one version
130133
- `top`: Migrate to the latest version
131134
- `bottom`: Revert all migrations
132-

Resources/docs/index.rst

Whitespace-only changes.

composer.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
{
2-
"name": "dantleech/phpcr-migrations-bundle",
2+
"name": "phpcr/phpcr-migrations-bundle",
33
"description": "PHPCR migrations bundle",
44
"license": "MIT",
55
"authors": [
66
{
77
"name": "Daniel Leech",
88
"email": "[email protected]"
9+
},
10+
{
11+
"name": "David Buchmann",
12+
"email": "[email protected]"
913
}
1014
],
1115
"require": {
@@ -31,12 +35,12 @@
3135
},
3236
"autoload": {
3337
"psr-4": {
34-
"DTL\\Bundle\\PhpcrMigrations\\": "."
38+
"PHPCR\\PhpcrMigrationsBundle\\": "src/"
3539
}
3640
},
37-
"extra": {
38-
"branch-alias": {
39-
"dev-master": "1.x-dev"
41+
"autoload-dev": {
42+
"psr-4": {
43+
"PHPCR\\PhpcrMigrationsBundle\\Tests\\": "tests/"
4044
}
4145
}
4246
}

phpunit.xml.dist

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,12 @@
66

77
<testsuites>
88
<testsuite name="PHPCR migrations Bundle">
9-
<directory>./Tests</directory>
9+
<directory>./tests</directory>
1010
</testsuite>
1111
</testsuites>
1212

13-
<filter>
14-
<whitelist addUncoveredFilesFromWhitelist="true">
15-
<directory>.</directory>
16-
<exclude>
17-
<directory>Resources/</directory>
18-
<directory>Tests/</directory>
19-
<directory>vendor/</directory>
20-
</exclude>
21-
</whitelist>
22-
</filter>
23-
2413
<php>
25-
<env name="KERNEL_CLASS" value="DTL\Bundle\PhpcrMigrations\Tests\Resources\App\AppKernel" />
14+
<env name="KERNEL_CLASS" value="PHPCR\PhpcrMigrationsBundle\Tests\Resources\App\AppKernel" />
2615
<env name="SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT" value="1"/>
2716
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak"/>
2817
</php>

Command/InitializeCommand.php renamed to src/Command/InitializeCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace DTL\Bundle\PhpcrMigrations\Command;
12+
namespace PHPCR\PhpcrMigrationsBundle\Command;
1313

1414
use PHPCR\Migrations\MigratorFactory;
1515
use Symfony\Component\Console\Command\Command;

Command/MigrateCommand.php renamed to src/Command/MigrateCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace DTL\Bundle\PhpcrMigrations\Command;
12+
namespace PHPCR\PhpcrMigrationsBundle\Command;
1313

1414
use PHPCR\Migrations\MigratorFactory;
1515
use Symfony\Component\Console\Command\Command;

Command/StatusCommand.php renamed to src/Command/StatusCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace DTL\Bundle\PhpcrMigrations\Command;
12+
namespace PHPCR\PhpcrMigrationsBundle\Command;
1313

1414
use PHPCR\Migrations\VersionFinder;
1515
use PHPCR\Migrations\VersionStorage;

0 commit comments

Comments
 (0)