Skip to content

Commit 59405c0

Browse files
committed
Merge branch '5.0.x' into 4.2.x-merge-up-into-5.0.x_ouqcWgwJ
# Conflicts: # composer.json
2 parents 19b568d + 772010a commit 59405c0

File tree

77 files changed

+364
-897
lines changed

Some content is hidden

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

77 files changed

+364
-897
lines changed

.doctrine-project.json

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,37 @@
44
"slug": "doctrine-orm-module",
55
"versions": [
66
{
7-
"name": "4.2",
8-
"branchName": "4.2.x",
9-
"slug": "4.2",
7+
"name": "5.1",
8+
"branchName": "5.1.x",
9+
"slug": "5.1",
1010
"aliases": [
1111
"latest"
1212
],
1313
"upcoming": true
1414
},
1515
{
16-
"name": "4.1",
17-
"branchName": "4.1.x",
18-
"slug": "4.1",
16+
"name": "5.0",
17+
"branchName": "5.0.x",
18+
"slug": "5.0",
1919
"aliases": [
2020
"current",
2121
"stable"
2222
],
2323
"current": true,
2424
"maintained": true
2525
},
26+
{
27+
"name": "4.2",
28+
"branchName": "4.2.x",
29+
"slug": "4.2",
30+
"maintained": true
31+
},
32+
{
33+
"name": "4.1",
34+
"branchName": "4.1.x",
35+
"slug": "4.1",
36+
"maintained": false
37+
},
2638
{
2739
"name": "4.0",
2840
"branchName": "4.0.x",

.github/workflows/coding-standards.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ jobs:
1414
uses: "doctrine/.github/.github/workflows/coding-standards.yml@1.4.1"
1515
with:
1616
php-version: '8.1'
17-
composer-options: '--prefer-dist --ignore-platform-req=php'

.github/workflows/continuous-integration.yml

Lines changed: 17 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
php-version:
20-
- "7.3"
2120
- "7.4"
2221
- "8.0"
2322
- "8.1"
@@ -30,22 +29,22 @@ jobs:
3029
- true
3130
- false
3231
include:
33-
- php-version: "7.3"
34-
dependencies: "lowest"
35-
dbal-version: "2.13.0"
36-
optional-dependencies: false
37-
- php-version: "7.3"
38-
dependencies: "lowest"
39-
dbal-version: "3.1.0"
40-
optional-dependencies: false
41-
- php-version: "7.3"
42-
dependencies: "lowest"
43-
dbal-version: "2.13.0"
44-
optional-dependencies: true
45-
- php-version: "7.3"
46-
dependencies: "lowest"
47-
dbal-version: "3.1.0"
48-
optional-dependencies: true
32+
- php-version: "7.4"
33+
dbal-version: "2.13.0"
34+
dependencies: "lowest"
35+
optional-dependencies: false
36+
- php-version: "7.4"
37+
dbal-version: "3.1.0"
38+
dependencies: "lowest"
39+
optional-dependencies: false
40+
- php-version: "7.4"
41+
dbal-version: "2.13.0"
42+
dependencies: "lowest"
43+
optional-dependencies: true
44+
- php-version: "7.4"
45+
dbal-version: "3.1.0"
46+
dependencies: "lowest"
47+
optional-dependencies: true
4948

5049
services:
5150
mysql:
@@ -78,26 +77,14 @@ jobs:
7877

7978
- name: "Install dependencies with Composer"
8079
uses: "ramsey/composer-install@v1"
81-
if: "! startsWith(matrix.php-version, '8')"
8280
with:
8381
dependency-versions: "${{ matrix.dependencies }}"
8482
composer-options: "--prefer-dist --no-suggest"
8583

86-
- name: "Install dependencies with Composer (--ignore-platform-req=php)"
87-
uses: "ramsey/composer-install@v1"
88-
if: "startsWith(matrix.php-version, '8')"
89-
with:
90-
dependency-versions: "${{ matrix.dependencies }}"
91-
composer-options: "--prefer-dist --no-suggest --ignore-platform-req=php"
92-
9384
- name: "Remove optional dependencies"
94-
if: "! startsWith(matrix.php-version, '8') && ! matrix.optional-dependencies"
85+
if: "! matrix.optional-dependencies"
9586
run: "composer remove --dev doctrine/data-fixtures doctrine/migrations"
9687

97-
- name: "Remove optional dependencies (--ignore-platform-req=php)"
98-
if: "startsWith(matrix.php-version, '8') && ! matrix.optional-dependencies"
99-
run: "composer remove --ignore-platform-req=php --dev doctrine/data-fixtures doctrine/migrations"
100-
10188
- name: "Configure test application"
10289
run: "cp ci/config/application.config.php config/application.config.php"
10390

.github/workflows/static-analysis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ jobs:
1414
uses: "doctrine/.github/.github/workflows/static-analysis.yml@1.4.1"
1515
with:
1616
php-version: '8.1'
17-
composer-options: '--prefer-dist --ignore-platform-req=php'

Module.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
/**
3+
* This file is placed here for compatibility with Laminas's ModuleManager.
4+
* It allows usage of this module even without composer.
5+
* The original Module.php is in 'src/' in order to respect PSR-4.
6+
*/
7+
require_once __DIR__ . '/src/Module.php';

README.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,6 @@ Run the following to install this library using [Composer](https://getcomposer.o
2323
composer require doctrine/doctrine-orm-module
2424
```
2525

26-
### Note on PHP 8.0 or later
27-
28-
[DoctrineModule](https://github.com/doctrine/DoctrineModule/) provides an integration with
29-
[laminas-cache](https://docs.laminas.dev/laminas-cache/), which currently comes with some storage adapters which
30-
are not compatible with PHP 8.0 or later. To prevent installation of these unused cache adapters, you will need
31-
to add the following to your `composer.json` file:
32-
33-
```json
34-
"require": {
35-
"doctrine/doctrine-orm-module": "^4.1.0"
36-
},
37-
"replace": {
38-
"laminas/laminas-cache-storage-adapter-apc": "*",
39-
"laminas/laminas-cache-storage-adapter-dba": "*",
40-
"laminas/laminas-cache-storage-adapter-memcache": "*",
41-
"laminas/laminas-cache-storage-adapter-memcached": "*",
42-
"laminas/laminas-cache-storage-adapter-mongodb": "*",
43-
"laminas/laminas-cache-storage-adapter-wincache": "*",
44-
"laminas/laminas-cache-storage-adapter-xcache": "*",
45-
"laminas/laminas-cache-storage-adapter-zend-server": "*"
46-
}
47-
```
48-
49-
Consult the [laminas-cache documentation](https://docs.laminas.dev/laminas-cache/installation/#avoid-unused-cache-adapters-are-being-installed)
50-
for further information on this issue.
51-
5226
## Documentation
5327

5428
Please check the [documentation on the Doctrine website](https://www.doctrine-project.org/projects/doctrine-orm-module.html)

composer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,22 @@
4545
}
4646
},
4747
"require": {
48-
"php": "^7.3 || ~8.0.0 || ~8.1.0",
48+
"php": "^7.4 || ~8.0.0 || ~8.1.0",
4949
"ext-json": "*",
5050
"container-interop/container-interop": "^1.2.0",
51-
"doctrine/dbal": "^2.13.4 || ^3.1.3",
52-
"doctrine/doctrine-laminas-hydrator": "^2.2.1",
53-
"doctrine/doctrine-module": "^4.2.2",
51+
"doctrine/dbal": "^2.13.4 || ^3.1.4",
52+
"doctrine/doctrine-laminas-hydrator": "^2.2.1 || ^3.0.0",
53+
"doctrine/doctrine-module": "^5.0.0",
5454
"doctrine/event-manager": "^1.1.1",
5555
"doctrine/orm": "^2.11.1",
56-
"doctrine/persistence": "^2.2.2",
56+
"doctrine/persistence": "^2.2.3",
5757
"laminas/laminas-eventmanager": "^3.4.0",
5858
"laminas/laminas-modulemanager": "^2.11.0",
5959
"laminas/laminas-mvc": "^3.3.0",
6060
"laminas/laminas-paginator": "^2.11.0",
61-
"laminas/laminas-servicemanager": "^3.7.0",
62-
"laminas/laminas-stdlib": "^3.6.1",
63-
"symfony/console": "^5.3.0 || ^6.0.0"
61+
"laminas/laminas-servicemanager": "^3.10.0",
62+
"laminas/laminas-stdlib": "^3.6.4",
63+
"symfony/console": "^5.4.1 || ^6.0.1"
6464
},
6565
"require-dev": {
6666
"doctrine/annotations": "^1.13.2",
@@ -76,7 +76,7 @@
7676
"phpstan/phpstan-phpunit": "^1.0",
7777
"phpunit/phpunit": "^9.5.10",
7878
"squizlabs/php_codesniffer": "^3.6.1",
79-
"vimeo/psalm": "^4.13.0"
79+
"vimeo/psalm": "^4.15.0"
8080
},
8181
"conflict": {
8282
"doctrine/migrations": "<3.3"

docs/en/index.rst

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,34 +20,6 @@ Run the following to install this library using `Composer <https://getcomposer.o
2020
2121
$ composer require doctrine/doctrine-orm-module
2222
23-
Note on PHP 8.0 or later
24-
^^^^^^^^^^^^^^^^^^^^^^^^
25-
26-
`DoctrineModule <https://www.doctrine-project.org/projects/doctrine-module/en/current/index.html>`__
27-
provides an integration with `laminas-cache <https://docs.laminas.dev/laminas-cache/>`__, which
28-
currently comes with some storage adapters which are not compatible with PHP 8.0 or later. To
29-
prevent installation of these unused cache adapters, you will need to add the following to your
30-
``composer.json`` file:
31-
32-
.. code:: json
33-
34-
"require": {
35-
"doctrine/doctrine-orm-module": "^4.1.0"
36-
},
37-
"replace": {
38-
"laminas/laminas-cache-storage-adapter-apc": "*",
39-
"laminas/laminas-cache-storage-adapter-dba": "*",
40-
"laminas/laminas-cache-storage-adapter-memcache": "*",
41-
"laminas/laminas-cache-storage-adapter-memcached": "*",
42-
"laminas/laminas-cache-storage-adapter-mongodb": "*",
43-
"laminas/laminas-cache-storage-adapter-wincache": "*",
44-
"laminas/laminas-cache-storage-adapter-xcache": "*",
45-
"laminas/laminas-cache-storage-adapter-zend-server": "*"
46-
}
47-
48-
Consult the `laminas-cache documentation <https://docs.laminas.dev/laminas-cache/installation/#avoid-unused-cache-adapters-are-being-installed>`__
49-
for further information on this issue.
50-
5123
Next Steps
5224
----------
5325

phpcs.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<arg name="cache" value=".phpcs.cache"/>
77
<arg name="colors"/>
88

9-
<!-- set minimal required PHP version (7.3) -->
10-
<config name="php_version" value="70300"/>
9+
<!-- set minimal required PHP version (7.4) -->
10+
<config name="php_version" value="70400"/>
1111

1212
<!-- Ignore warnings, show progress of the run and show sniff names -->
1313
<arg value="nps"/>

phpstan.neon

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
parameters:
2-
level: 5
2+
level: 6
33
paths:
44
- src
55
- tests
6+
checkGenericClassInNonGenericObjectType: false
67
treatPhpDocTypesAsCertain: false
78
ignoreErrors:
9+
-
10+
message: '#Method .*EntityBasedFormBuilder::createForm\(\) .* iterable type .*FormInterface#'
11+
path: src/Form/Annotation/EntityBasedFormBuilder.php
812
-
913
message: '#Offset class-string<object> on array\{\} in isset\(\) does not exist#'
1014
path: src/Yuml/MetadataGrapher.php

psalm.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<psalm
3-
errorLevel="5"
3+
errorLevel="4"
44
phpVersion="8.0"
55
resolveFromConfigFile="true"
66
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

src/CliConfigurator.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@
2121

2222
class CliConfigurator
2323
{
24-
/** @var string */
25-
private $defaultObjectManagerName = 'doctrine.entitymanager.orm_default';
24+
private string $defaultObjectManagerName = 'doctrine.entitymanager.orm_default';
2625

2726
/** @var string[] */
28-
private $commands = [
27+
private array $commands = [
2928
'doctrine.dbal_cmd.runsql',
3029
'doctrine.dbal_cmd.reserved_words',
3130
'doctrine.orm_cmd.clear_cache_metadata',
@@ -46,7 +45,7 @@ class CliConfigurator
4645
];
4746

4847
/** @var string[] */
49-
private $migrationCommands = [
48+
private array $migrationCommands = [
5049
'doctrine.migrations_cmd.current',
5150
'doctrine.migrations_cmd.diff',
5251
'doctrine.migrations_cmd.dumpschema',
@@ -62,8 +61,7 @@ class CliConfigurator
6261
'doctrine.migrations_cmd.uptodate',
6362
];
6463

65-
/** @var ContainerInterface */
66-
private $container;
64+
private ContainerInterface $container;
6765

6866
public function __construct(ContainerInterface $container)
6967
{

0 commit comments

Comments
 (0)