Skip to content

Commit 2c3b45a

Browse files
authored
Merge pull request #382 from symfony-cmf/phpcr-odm-1
Keep support for PHPCR-ODM 1.4
2 parents 9b38b0e + 7b185ba commit 2c3b45a

File tree

5 files changed

+54
-21
lines changed

5 files changed

+54
-21
lines changed

.travis.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,19 @@ cache:
1414

1515
env:
1616
matrix:
17-
- SYMFONY_VERSION=3.1.*
17+
- SYMFONY_VERSION=3.2.*
1818
global:
1919
- SYMFONY_DEPRECATIONS_HELPER=231
20-
- SYMFONY_PHPUNIT_REMOVE="symfony/yaml"
21-
- SYMFONY_PHPUNIT_DIR="./.phpunit"
22-
- SYMFONY_PHPUNIT_VERSION=5.7
20+
- SYMFONY_PHPUNIT_REMOVE="symfony/yaml" SYMFONY_PHPUNIT_DIR="./.phpunit" SYMFONY_PHPUNIT_VERSION=5.7
2321

2422
matrix:
2523
include:
26-
- php: 7.0
24+
- php: 7.1
2725
env: DEPS=dev SYMFONY_VERSION=3.3.*
2826
- php: 5.6
2927
env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_DEPRECATIONS_HELPER=weak
30-
- php: 7.0
31-
env: SYMFONY_VERSION=3.0.*
32-
- php: 7.0
33-
env: SYMFONY_VERSION=3.2.*
28+
- php: 7.1
29+
env: SYMFONY_VERSION=3.1.*
3430
fast_finish: true
3531

3632
before_install:
@@ -48,4 +44,3 @@ script: vendor/bin/simple-phpunit
4844

4945
notifications:
5046
irc: "irc.freenode.org#symfony-cmf"
51-

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Changelog
22
=========
33

4-
* **2016-12-02**: [BC BREAK] Move all sonata related code
4+
* **2016-12-02**: [BC BREAK] Moved all sonata related code to sonata-phpcr-admin-integration-bundle
55
* **2016-10-10**: [ORM] Add option to use custom Route class in ORM
66
* **2016-06-18**: [BC BREAK] Removed all `*.class` parameters.
77
* **2016-06-18**: [BC BREAK] Removed the `cmf_routing.dynamic.persistence.phpcr.route_basepath`

composer.json

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,26 @@
1919
"require-dev": {
2020
"symfony-cmf/core-bundle": "^2.0",
2121
"symfony-cmf/testing": "^2.0",
22-
"doctrine/phpcr-odm": "^2.0",
22+
"doctrine/phpcr-odm": "^1.4|^2.0",
2323
"symfony/phpunit-bridge": "^3.2",
2424
"matthiasnoback/symfony-dependency-injection-test": "~0.6",
2525
"matthiasnoback/symfony-config-test": "^1.3.1",
2626
"phpunit/php-code-coverage": "@stable",
27-
"sonata-project/admin-bundle": "^2.3.7|^3.0",
28-
"sonata-project/block-bundle": "^2.2.8|^3.0",
29-
"sonata-project/core-bundle": "^2.2.5|^3.0",
3027
"symfony/monolog-bundle": "^2.3|^3.0",
3128
"doctrine/orm": "^2.5",
3229
"doctrine/data-fixtures": "^1.0.0"
3330
},
3431
"minimum-stability": "dev",
3532
"prefer-stable": true,
3633
"suggest": {
37-
"doctrine/phpcr-odm": "To enable support for the PHPCR ODM documents (^1.3)",
34+
"doctrine/phpcr-odm": "To enable support for the PHPCR ODM documents (^1.4)",
3835
"doctrine/phpcr-bundle": "To enable support for the PHPCR ODM documents",
3936
"doctrine/orm": "To enable support for the ORM entities (^2.5)",
40-
4137
"symfony-cmf/content-bundle": "To optionally use the configured value for 'content_basepath' from the CoreBundle",
42-
"symfony-cmf/core-bundle": "To use the provided Doctrine\\Phpcr documents and for easier configuration (^1.1)",
43-
44-
"symfony-cmf/sonata-admin-integration": "To provide an admin interface for the PHPCR ODM documents (^1.1)"
38+
"symfony-cmf/core-bundle": "To use the RouteTypeType form type and for easier configuration (^2.0)"
4539
},
4640
"conflict": {
47-
"doctrine/phpcr-odm": "<2.0"
41+
"doctrine/phpcr-odm": "<1.4"
4842
},
4943
"autoload": {
5044
"psr-4": {

src/Doctrine/Phpcr/RedirectRoute.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,28 @@ public function getParentDocument()
9494
return $this->parent;
9595
}
9696

97+
/**
98+
* @deprecated For BC with the PHPCR-ODM 1.4 HierarchyInterface
99+
* @see setParentDocument
100+
*/
101+
public function setParent($parent)
102+
{
103+
@trigger_error('The '.__METHOD__.'() method is deprecated and will be removed in version 3.0. Use setParentDocument() instead.', E_USER_DEPRECATED);
104+
105+
return $this->setParentDocument($parent);
106+
}
107+
108+
/**
109+
* @deprecated For BC with the PHPCR-ODM 1.4 HierarchyInterface
110+
* @see getParentDocument
111+
*/
112+
public function getParent()
113+
{
114+
@trigger_error('The '.__METHOD__.'() method is deprecated and will be removed in version 3.0. Use getParentDocument() instead.', E_USER_DEPRECATED);
115+
116+
return $this->getParentDocument();
117+
}
118+
97119
/**
98120
* Rename a route by setting its new name.
99121
*

src/Doctrine/Phpcr/Route.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,28 @@ public function getParentDocument()
104104
return $this->parent;
105105
}
106106

107+
/**
108+
* @deprecated For BC with the PHPCR-ODM 1.4 HierarchyInterface
109+
* @see setParentDocument
110+
*/
111+
public function setParent($parent)
112+
{
113+
@trigger_error('The '.__METHOD__.'() method is deprecated and will be removed in version 3.0. Use setParentDocument() instead.', E_USER_DEPRECATED);
114+
115+
return $this->setParentDocument($parent);
116+
}
117+
118+
/**
119+
* @deprecated For BC with the PHPCR-ODM 1.4 HierarchyInterface
120+
* @see getParentDocument
121+
*/
122+
public function getParent()
123+
{
124+
@trigger_error('The '.__METHOD__.'() method is deprecated and will be removed in version 3.0. Use getParentDocument() instead.', E_USER_DEPRECATED);
125+
126+
return $this->getParentDocument();
127+
}
128+
107129
/**
108130
* Rename a route by setting its new name.
109131
*

0 commit comments

Comments
 (0)