Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Necessary refactorings for Property hooks #11659

Open
wants to merge 28 commits into
base: 3.4.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c2713ad
property hooks.
beberlei Oct 10, 2024
052c7d7
Add all necessary accessors, adapting doctrine/persistence and ORM in…
beberlei Oct 10, 2024
b3cffe2
Introduce LegacyReflectionFields abstraction, deriving from propertyA…
beberlei Oct 10, 2024
7d61a1e
Fixes in LegacyReflectionFields.
beberlei Oct 10, 2024
fcc53b2
Use ClassMetadata::$propertyAccessors in all places.
beberlei Oct 10, 2024
bd29248
Adjust test.
beberlei Oct 10, 2024
eba01f8
Style, missing getReflectionProperties()Property() that were renamed.
beberlei Oct 10, 2024
79d1f07
Deprecate access to ClassMetadata::$reflFields.
beberlei Oct 10, 2024
0c1cf85
Address PHPStan issues.
beberlei Oct 12, 2024
622ba2d
Mark all PropertyAccessor classes @internal.
beberlei Oct 12, 2024
23c31ae
Static analysis.
beberlei Nov 3, 2024
e82690d
More psalm to fix the errors.
beberlei Nov 3, 2024
073809c
Fixup EnumPropertyAccessor::toEnum
beberlei Nov 3, 2024
2f98e11
Remove last use of reflFields in core.
beberlei Nov 3, 2024
c2a2386
suppress phpcs that cant be done
beberlei Nov 3, 2024
8c9bfca
Fix wrong type, phpstan failure.
beberlei Nov 3, 2024
6ff2b13
Add comment to PropertyAccessor interface
beberlei Dec 6, 2024
238fb74
Add RawValuePropertyAccessor to see how it will look in 8.4, pre supp…
beberlei Dec 6, 2024
5a22007
Update PR with PHP Stan by fixing some and baselining other violations.
beberlei Dec 8, 2024
82cf294
Update src/Mapping/PropertyAccessors/PropertyAccessor.php
beberlei Feb 14, 2025
68c17ca
Merge remote-tracking branch 'origin/3.4.x' into PropertyHooks
beberlei Feb 14, 2025
6fb3083
Merge remote-tracking branch 'beberlei/PropertyHooks' into PropertyHooks
beberlei Feb 14, 2025
1cae053
Extract PropertyAccessorFactory, tests for enum and typednodefault ac…
beberlei Feb 15, 2025
673cf0d
Add test for ObjectCastPropertyAccessor.
beberlei Feb 15, 2025
72ce662
Tests for ObjectCastPropertyAccessor and RawValuePropertyAccessor.
beberlei Feb 15, 2025
e7db1b0
Add ReadOnlyAccessorTest
beberlei Feb 15, 2025
8e1a27b
Explain deprecation in UPGRADE.md
beberlei Feb 15, 2025
5077ae4
Housekeeping
beberlei Feb 15, 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
Prev Previous commit
Next Next commit
Mark all PropertyAccessor classes @internal.
  • Loading branch information
beberlei committed Dec 8, 2024
commit 622ba2dcc71f270229cd5e4fcff6671f24baa1e6
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Doctrine\Instantiator\Instantiator;

/** @internal */
class EmbeddablePropertyAccessor implements PropertyAccessor
{
private static Instantiator|null $instantiator = null;
Expand Down
1 change: 1 addition & 0 deletions src/Mapping/PropertyAccessors/EnumPropertyAccessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use function is_array;
use function reset;

/** @internal */
class EnumPropertyAccessor implements PropertyAccessor
{
public function __construct(private PropertyAccessor $parent, private string $enumType)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

use function ltrim;

/** @internal */
class ObjectCastPropertyAccessor implements PropertyAccessor
{
public static function fromNames(string $class, string $name): self
Expand Down
1 change: 1 addition & 0 deletions src/Mapping/PropertyAccessors/PropertyAccessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Doctrine\ORM\Mapping\PropertyAccessors;

/** @internal */
interface PropertyAccessor
greg0ire marked this conversation as resolved.
Show resolved Hide resolved
{
public function setValue(object $object, mixed $value): void;
Expand Down
1 change: 1 addition & 0 deletions src/Mapping/PropertyAccessors/ReadonlyAccessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

use function sprintf;

/** @internal */
class ReadonlyAccessor implements PropertyAccessor
{
public function __construct(private PropertyAccessor $parent, private ReflectionProperty $reflectionProperty)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use function assert;
use function sprintf;

/** @internal */
class TypedNoDefaultPropertyAccessor implements PropertyAccessor
{
private Closure|null $unsetter = null;
Expand Down