Skip to content

Merge 4.2.0 up into 5.0.x - #510

Merged
greg0ire merged 53 commits into
doctrine:4.1.xfrom
greg0ire:5.0.x
Apr 26, 2026
Merged

greg0ire merged 53 commits into
doctrine:4.1.xfrom
greg0ire:5.0.x

Conversation

@greg0ire

Copy link
Copy Markdown
Member

No description provided.

greg0ire and others added 30 commits April 3, 2025 20:18
….x_TA2qrOVB

Merge release 4.1.0 into 5.0.x
Add `getFieldValue` and `setFieldValue` to `ClassMetadata` interface
Add test on unbound scope of the included file
Deprecate updating $metadata variable in the php file directly
Exclude _files directory from PHPStan inspection
Support closure returned by `.php` files in the `PHPDriver`
This is consistent with other Doctrine projects. Note that I had to add
a "covariant" keyword on the template definition of getReflectionClass()
return type. That's because since PHP 8.4, ReflectionClass is considered
invariant because of lazy objects. Lazy objects introduce new methods to
ReflectionClass where the template appears in parameter position, for
instance that is the case for isUninitializedLazyObject().
I do not understand why this wasn't an issue with
ReflectionClass::isInstance(), which was introduced way earlier than
that though.

The solution I picked is to use "call-site variance", effectively saying
that this is OK in this instance (but it might not be, I'm not sure).

The alternative to adding this keyword would be to drop generic
information entirely.

See phpstan/phpstan#12459 for more details.
Deprecate `ClassMetadataFactory::setMetadataFor()`
Not necessary when using native lazy objects with PHP 8.4+
Make `AbstractManagerRegistry::$proxyInterfaceName` nullable
Deprecate `Proxy` interface and related
greg0ire and others added 23 commits January 16, 2026 09:07
It is no longer clear to me why I did not make the
AbstractManagerRegistry::$connections and
AbstractManagerRegistry::$managers readonly already in
59029af.
The class is final and has no parent, so this is fine.
Used configuration:

	<?php

	declare(strict_types=1);

	use Rector\Config\RectorConfig;

	return RectorConfig::configure()
	    ->withPaths([
		__DIR__ . '/src',
	    ])
	    ->withPhpSets();
findAll and findBy should return list
Use the ColocatedMappingDriver that provides this feature
….Mapping.PHPTestEntityAssert.php that asserts $metadata variable existence
…c API

The trait was used without restrictions, leaking addPaths, getPaths,
addExcludePaths, getExcludePaths, getFileExtension, and setFileExtension
as public methods. Alias them all to private to keep the public API
limited to the MappingDriver interface.

Add a test that asserts the exact list of public methods on StaticPHPDriver
to prevent regressions.
Support ClassLocator in StaticPHPDriver
….x_Ir7uGPdR

Merge release 4.1.2 into 4.2.x
@greg0ire
greg0ire merged commit c8614e6 into doctrine:4.1.x Apr 26, 2026
9 checks passed
@greg0ire

Copy link
Copy Markdown
Member Author

Woops, I should undo this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants