Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5be7450
Update branch metadata
greg0ire Oct 12, 2025
854e67b
Target dependabot to 2.18.x
greg0ire Oct 12, 2025
39ed2c6
Merge pull request #2097 from greg0ire/update-branch-metadata
greg0ire Oct 12, 2025
1d039a2
Merge pull request #2100 from greg0ire/dependabot-target-2
greg0ire Oct 12, 2025
4d57797
Bump doctrine/.github from 8.0.0 to 10.1.0
dependabot[bot] Oct 12, 2025
927b569
Merge pull request #2099 from doctrine/dependabot/github_actions/doct…
greg0ire Oct 12, 2025
0f96500
Document removal of proxy-related settings
greg0ire Oct 13, 2025
026694f
Address PHPUnit notices
greg0ire Oct 13, 2025
398e911
Merge pull request #2108 from greg0ire/document-removed-settings
greg0ire Oct 13, 2025
32ca67c
Fix typo in v3 upgrade docs
jmsche Oct 13, 2025
dab3c4a
Merge pull request #2110 from jmsche/patch-1
greg0ire Oct 13, 2025
1b3ffb3
Merge pull request #2109 from greg0ire/address-phpunit-notices
greg0ire Oct 14, 2025
5df4d43
Update validate_xml_mapping info
greg0ire Oct 14, 2025
3c68255
Merge pull request #2112 from greg0ire/validate-xml-mapping-docs
greg0ire Oct 14, 2025
d088386
Bump doctrine/.github from 10.1.0 to 12.0.0
dependabot[bot] Oct 20, 2025
862f667
Bump doctrine/.github from 12.0.0 to 12.1.0
dependabot[bot] Oct 27, 2025
f9ab2d7
Revert "Scan file where DI functions are defined"
greg0ire Nov 1, 2025
ec96d28
Configure new kernel parameters
greg0ire Nov 1, 2025
17b0380
Merge pull request #2125 from greg0ire/fix-build
greg0ire Nov 1, 2025
0da556b
Bump actions/download-artifact from 5 to 6
dependabot[bot] Nov 2, 2025
011ec6b
Bump actions/upload-artifact from 4 to 5
dependabot[bot] Nov 2, 2025
984070d
Merge pull request #2122 from doctrine/dependabot/github_actions/2.18…
greg0ire Nov 2, 2025
44c203b
Merge pull request #2123 from doctrine/dependabot/github_actions/2.18…
greg0ire Nov 2, 2025
17b0d1a
Fix detectMappingType if the entity contain a package attribute
jtattevin Oct 16, 2025
f3f3141
Fix regex to match php allowed char in namespace
jtattevin Oct 16, 2025
f4a9935
Add tests and comments on the regex
jtattevin Oct 20, 2025
126ec9e
Remove prefix/suffix detection ; Adjust comments
jtattevin Oct 20, 2025
6a620f9
Bump doctrine/.github from 12.1.0 to 12.2.0
dependabot[bot] Nov 3, 2025
b769877
Merge pull request #2115 from jtattevin/fix-2111-detect-mapping-type-…
greg0ire Nov 5, 2025
c532e9a
Merge remote-tracking branch 'origin/2.18.x' into 3.0.x
greg0ire Nov 5, 2025
113afba
Merge pull request #2127 from greg0ire/3.0.x
greg0ire Nov 5, 2025
b05b29e
fix escape function throwing exception if float returned
Nov 7, 2025
15ead89
chore: allow and test Symfony 8
alexislefebvre Nov 27, 2025
6826dac
chore: show parameters in name of CI jobs
alexislefebvre Nov 27, 2025
967cce3
fix: add return type to `DoctrineExtension::load()`
alexislefebvre Nov 27, 2025
19f34e3
chore: remove tests that involve XML
alexislefebvre Nov 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions .doctrine-project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,40 @@
"slug": "doctrine-bundle",
"versions": [
{
"name": "3.0",
"branchName": "3.0.x",
"name": "4.0",
"branchName": "4.0.x",
"slug": "latest",
"upcoming": true
},
{
"name": "3.1",
"branchName": "3.1.x",
"slug": "3.1",
"upcoming": true
},
{
"name": "3.0",
"branchName": "3.0.x",
"slug": "3.0",
"current": true
},
{
"name": "2.19",
"branchName": "2.19.x",
"slug": "2.19",
"maintained": true
},
{
"name": "2.18",
"branchName": "2.18.x",
"slug": "2.18",
"upcoming": true
"maintained": true
},
{
"name": "2.17",
"branchName": "2.17.x",
"slug": "2.17",
"current": true
"maintained": false
},
{
"name": "2.16",
Expand Down
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ updates:
interval: "weekly"
labels:
- "CI"
target-branch: "2.18.x"
2 changes: 1 addition & 1 deletion .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ on:
jobs:
coding-standards:
name: "Coding Standards"
uses: "doctrine/.github/.github/workflows/coding-standards.yml@8.0.0"
uses: "doctrine/.github/.github/workflows/coding-standards.yml@v12.2.0"
with:
composer-options: "--prefer-dist --prefer-stable"
2 changes: 1 addition & 1 deletion .github/workflows/composer-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ on:
jobs:
composer-lint:
name: "Composer Lint"
uses: "doctrine/.github/.github/workflows/composer-lint.yml@8.0.0"
uses: "doctrine/.github/.github/workflows/composer-lint.yml@v12.2.0"
15 changes: 10 additions & 5 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

name: "Continuous Integration"
name: "CI"

on:
pull_request:
Expand Down Expand Up @@ -27,7 +27,7 @@ on:

jobs:
phpunit:
name: "PHPUnit"
name: PHPUnit, PHP ${{ matrix.php-version || 'Ø' }} - Symfony ${{ matrix.symfony-require || 'Ø' }} - deps ${{ matrix.dependencies || 'Ø' }} - stability ${{ matrix.stability || 'Ø' }}
runs-on: "ubuntu-latest"
env:
SYMFONY_REQUIRE: ${{matrix.symfony-require}}
Expand Down Expand Up @@ -55,7 +55,12 @@ jobs:
php-version: "8.4"

# Test LTS
- symfony-require: "6.4.*"
- symfony-require: "7.4.*"
dependencies: "highest"
php-version: "8.4"

# Test non-LTS
- symfony-require: "8.0.*"
dependencies: "highest"
php-version: "8.4"

Expand Down Expand Up @@ -113,7 +118,7 @@ jobs:
run: "vendor/bin/phpunit --coverage-clover=coverage.xml"

- name: "Upload coverage file"
uses: "actions/upload-artifact@v4"
uses: "actions/upload-artifact@v5"
with:
name: "phpunit-${{ matrix.php-version }}-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}.coverage"
path: "coverage.xml"
Expand All @@ -133,7 +138,7 @@ jobs:
fetch-depth: 2

- name: "Download coverage files"
uses: "actions/download-artifact@v5"
uses: "actions/download-artifact@v6"
with:
path: "reports"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ on:
jobs:
documentation:
name: "Documentation"
uses: "doctrine/.github/.github/workflows/documentation.yml@8.0.0"
uses: "doctrine/.github/.github/workflows/documentation.yml@v12.2.0"
2 changes: 1 addition & 1 deletion .github/workflows/release-on-milestone-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
release:
name: "Git tag, release & create merge-up PR"
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@8.0.0"
uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@v12.2.0"
secrets:
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ on:
jobs:
static-analysis:
name: "Static Analysis"
uses: "doctrine/.github/.github/workflows/phpstan.yml@8.0.0"
uses: "doctrine/.github/.github/workflows/phpstan.yml@v12.2.0"
2 changes: 1 addition & 1 deletion .github/workflows/website-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ on:
jobs:
json-validate:
name: "Validate JSON schema"
uses: "doctrine/.github/.github/workflows/website-schema.yml@8.0.0"
uses: "doctrine/.github/.github/workflows/website-schema.yml@v12.2.0"
13 changes: 10 additions & 3 deletions .symfony.bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,16 @@ branches:
- "2.16.x"
- "2.17.x"
- "2.18.x"
- "2.19.x"
- "3.0.x"
- "3.1.x"
- "4.0.x"
maintained_branches:
- "2.17.x"
- "2.18.x"
- "2.19.x"
- "3.0.x"
- "3.1.x"
- "4.0.x"
doc_dir: "docs/en/"
current_branch: "2.17.x"
dev_branch: "2.18.x"
current_branch: "3.0.x"
dev_branch: "3.1.x"
7 changes: 7 additions & 0 deletions UPGRADE-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ have been removed:
- `doctrine.orm.entity_managers.some_em.report_fields_where_declared`
- `doctrine.orm.enable_lazy_ghost_objects`

Also, the 3 following options were no-ops when enabling native lazy objects
and have been removed as well:

- `doctrine.orm.auto_generate_proxy_classes`
- `doctrine.orm.proxy_dir`
- `doctrine.orm.proxy_namespace`

### The `doctrine.dbal.default_table_options.collate` default table option is removed

Use `doctrine.dbal.default_table_options.collation` instead.
Expand Down
36 changes: 18 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
"doctrine/deprecations": "^1.0",
"doctrine/persistence": "^4",
"doctrine/sql-formatter": "^1.0.1",
"symfony/cache": "^6.4 || ^7.0",
"symfony/config": "^6.4 || ^7.0",
"symfony/console": "^6.4 || ^7.0",
"symfony/dependency-injection": "^6.4 || ^7.0",
"symfony/doctrine-bridge": "^6.4.3 || ^7.0.3",
"symfony/framework-bundle": "^6.4 || ^7.0",
"symfony/cache": "^6.4 || ^7.0 || ^8.0",
"symfony/config": "^6.4 || ^7.0 || ^8.0",
"symfony/console": "^6.4 || ^7.0 || ^8.0",
"symfony/dependency-injection": "^6.4 || ^7.0 || ^8.0",
"symfony/doctrine-bridge": "^6.4.3 || ^7.0.3 || ^8.0",
"symfony/framework-bundle": "^6.4 || ^7.0 || ^8.0",
"symfony/service-contracts": "^3"
},
"require-dev": {
Expand All @@ -50,18 +50,18 @@
"phpstan/phpstan-strict-rules": "^2",
"phpunit/phpunit": "^12.3.10",
"psr/log": "^3.0",
"symfony/doctrine-messenger": "^6.4 || ^7.0",
"symfony/expression-language": "^6.4 || ^7.0",
"symfony/messenger": "^6.4 || ^7.0",
"symfony/property-info": "^6.4 || ^7.0",
"symfony/security-bundle": "^6.4 || ^7.0",
"symfony/stopwatch": "^6.4 || ^7.0",
"symfony/string": "^6.4 || ^7.0",
"symfony/twig-bridge": "^6.4 || ^7.0",
"symfony/validator": "^6.4 || ^7.0",
"symfony/var-exporter": "^6.4.1 || ^7.0.1",
"symfony/web-profiler-bundle": "^6.4 || ^7.0",
"symfony/yaml": "^6.4 || ^7.0",
"symfony/doctrine-messenger": "^6.4 || ^7.0 || ^8.0",
"symfony/expression-language": "^6.4 || ^7.0 || ^8.0",
"symfony/messenger": "^6.4 || ^7.0 || ^8.0",
"symfony/property-info": "^6.4 || ^7.0 || ^8.0",
"symfony/security-bundle": "^6.4 || ^7.0 || ^8.0",
"symfony/stopwatch": "^6.4 || ^7.0 || ^8.0",
"symfony/string": "^6.4 || ^7.0 || ^8.0",
"symfony/twig-bridge": "^6.4 || ^7.0 || ^8.0",
"symfony/validator": "^6.4 || ^7.0 || ^8.0",
"symfony/var-exporter": "^6.4.1 || ^7.0.1 || ^8.0",
"symfony/web-profiler-bundle": "^6.4 || ^7.0 || ^8.0",
"symfony/yaml": "^6.4 || ^7.0 || ^8.0",
"twig/twig": "^3.21.1"
},
"conflict": {
Expand Down
8 changes: 8 additions & 0 deletions docs/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"require-dev": {
"doctrine/docs-builder": "^1.0"
},
"config": {
"sort-packages": true
}
}
2 changes: 0 additions & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ parameters:
- config
- src
- tests
scanFiles:
- vendor/symfony/dependency-injection/Loader/Configurator/functions.php
ignoreErrors:
# phpstan has no array shape intersection support https://github.com/phpstan/phpstan/issues/12414
- message: '#unresolvable type.#'
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/DoctrineExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ private function validateAutoMapping(array $managerConfigs): string|null
*
* @return void
*/
public function load(array $configs, ContainerBuilder $container)
public function load(array $configs, ContainerBuilder $container): void
{
$configuration = $this->getConfiguration($configs, $container);
$config = $this->processConfigurationPrependingDefaults($configuration, $configs);
Expand Down
2 changes: 1 addition & 1 deletion src/Twig/DoctrineExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function getFilters(): array
*
* @internal
*/
public static function escapeFunction(mixed $parameter): string|int
public static function escapeFunction(mixed $parameter): string|int|float
{
$result = $parameter;

Expand Down
2 changes: 2 additions & 0 deletions tests/CacheSchemaSubscriberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ public function testSchemaSubscriberWiring(): void
'kernel.build_dir' => sys_get_temp_dir(),
'kernel.environment' => 'test',
'kernel.runtime_environment' => '%%env(default:kernel.environment:APP_RUNTIME_ENV)%%',
'kernel.runtime_mode.web' => false,
'kernel.root_dir' => __DIR__ . '/../../../../', // src dir
'kernel.project_dir' => __DIR__ . '/../../../../', // src dir
'kernel.share_dir' => sys_get_temp_dir(),
'kernel.bundles_metadata' => [],
'kernel.charset' => 'UTF-8',
'kernel.container_class' => ContainerBuilder::class,
Expand Down
12 changes: 5 additions & 7 deletions tests/Command/CreateDatabaseDoctrineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Doctrine\DBAL\DriverManager;
use Doctrine\DBAL\Schema\SchemaManagerFactory;
use Doctrine\Persistence\ManagerRegistry;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\MockObject\Stub;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Tester\CommandTester;
use Symfony\Component\DependencyInjection\Container;
Expand Down Expand Up @@ -59,25 +59,23 @@ public function testExecute(): void
* @param mixed[]|null $params Connection parameters
* @psalm-param Params $params
*
* @return MockObject&Container
* @return Stub&Container
*/
private function getMockContainer(string $connectionName, array|null $params = null): MockObject
private function getMockContainer(string $connectionName, array|null $params = null): Stub
{
// Mock the container and everything you'll need here
$mockDoctrine = $this->createStub(ManagerRegistry::class);

$mockDoctrine->method('getDefaultConnectionName')->willReturn($connectionName);

$config = (new Configuration())->setSchemaManagerFactory($this->createMock(SchemaManagerFactory::class));
$config = (new Configuration())->setSchemaManagerFactory($this->createStub(SchemaManagerFactory::class));

$mockConnection = $this->createStub(Connection::class);
$mockConnection->method('getConfiguration')->willReturn($config);
$mockConnection->method('getParams')->willReturn($params);
$mockDoctrine->method('getConnection')->willReturn($mockConnection);

$mockContainer = $this->getMockBuilder(Container::class)
->onlyMethods(['get'])
->getMock();
$mockContainer = $this->createStub(Container::class);

$mockContainer->method('get')->with('doctrine')->willReturn($mockDoctrine);

Expand Down
16 changes: 7 additions & 9 deletions tests/Command/DropDatabaseDoctrineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Doctrine\Persistence\ManagerRegistry;
use Generator;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\MockObject\Stub;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Tester\CommandTester;
use Symfony\Component\DependencyInjection\Container;
Expand Down Expand Up @@ -137,9 +137,9 @@ public static function provideIncompatibleDriverOptions(): Generator
* @param list<mixed> $params Connection parameters
* @psalm-param Params $params
*
* @return MockObject&Container
* @return Stub&Container
*/
private function getMockContainer(string $connectionName, array $params): MockObject
private function getMockContainer(string $connectionName, array $params): Stub
{
// Mock the container and everything you'll need here
$mockDoctrine = $this->createStub(ManagerRegistry::class);
Expand All @@ -148,18 +148,16 @@ private function getMockContainer(string $connectionName, array $params): MockOb

$config = (new Configuration())->setSchemaManagerFactory(new DefaultSchemaManagerFactory());

$mockConnection = $this->createMock(Connection::class);
$mockConnection = $this->createStub(Connection::class);
$mockConnection->method('getConfiguration')->willReturn($config);
$mockConnection->method('getParams')->willReturn($params);
$mockDoctrine->method('getConnection')->willReturn($mockConnection);

$mockContainer = $this->getMockBuilder(Container::class)
->onlyMethods(['get'])
->getMock();
$mockContainer = $this->createStub(Container::class);

$mockContainer->method('get')
->with('doctrine')
->willReturn($mockDoctrine);
->with('doctrine')
->willReturn($mockDoctrine);

return $mockContainer;
}
Expand Down
10 changes: 5 additions & 5 deletions tests/DataCollector/DoctrineDataCollectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ public function testCollectEntities(): void
$manager = $this->createStub(EntityManagerInterface::class);
$config = $this->createMock(Configuration::class);
$factory = $this->createMock(ClassMetadataFactory::class);
$collector = $this->createCollector(['default' => $manager], true, $this->createMock(DebugDataHolder::class));
$unitOfWork = $this->createMock(UnitOfWork::class);
$collector = $this->createCollector(['default' => $manager], true, $this->createStub(DebugDataHolder::class));
$unitOfWork = $this->createStub(UnitOfWork::class);

$manager->method('getMetadataFactory')->willReturn($factory);
$manager->method('getConfiguration')->willReturn($config);
Expand Down Expand Up @@ -74,8 +74,8 @@ public function testDoesNotCollectEntities(): void
}

$manager = $this->createMock(EntityManager::class);
$config = $this->createMock(Configuration::class);
$collector = $this->createCollector(['default' => $manager], false, $this->createMock(DebugDataHolder::class));
$config = $this->createStub(Configuration::class);
$collector = $this->createCollector(['default' => $manager], false, $this->createStub(DebugDataHolder::class));
$unitOfWork = $this->createStub(UnitOfWork::class);

$manager->expects($this->never())->method('getMetadataFactory');
Expand All @@ -91,7 +91,7 @@ public function testDoesNotCollectEntities(): void

public function testGetGroupedQueries(): void
{
$debugDataHolder = $this->createMock(DebugDataHolder::class);
$debugDataHolder = $this->createStub(DebugDataHolder::class);

$queries = [
'default' => [
Expand Down
2 changes: 2 additions & 0 deletions tests/DependencyInjection/Compiler/IdGeneratorPassTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ public function testRepositoryServiceWiring(): void
'kernel.bundles' => $bundles,
'kernel.cache_dir' => sys_get_temp_dir(),
'kernel.build_dir' => sys_get_temp_dir(),
'kernel.share_dir' => sys_get_temp_dir(),
'kernel.environment' => 'test',
'kernel.runtime_environment' => '%%env(default:kernel.environment:APP_RUNTIME_ENV)%%',
'kernel.runtime_mode.web' => false,
'kernel.root_dir' => __DIR__ . '/../../../../', // src dir
'kernel.project_dir' => __DIR__ . '/../../../../', // src dir
'kernel.bundles_metadata' => [],
Expand Down
Loading
Loading