Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions doc/02_Upgrade_Notes/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Upgrade notes

## 3.5.0
- Added commented methods in interfaces for upcoming introduction of getter/setter of `GetInheritedProperties` in AssetResolverContractInterface, ConcreteObjectResolverContractInterface, DataObjectFolderResolverContractInterface, DocumentResolverContractInterface.

## 2.0.0
All Resolver classes and interfaces will be marked as `@internal`

Expand Down
6 changes: 6 additions & 0 deletions src/Contract/Models/Asset/AssetResolverContractInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,10 @@
public function getById(int $id, array $params = []): ?Asset;

public function locateDaoClass(string $modelClass): ?string;

// BC-Break: This method will be introduced in v4.0.0

Check notice on line 37 in src/Contract/Models/Asset/AssetResolverContractInterface.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/Contract/Models/Asset/AssetResolverContractInterface.php#L37

Line indented incorrectly; expected at least 4 spaces, found 0
// public function getGetInheritedProperties(): bool;

Check notice on line 38 in src/Contract/Models/Asset/AssetResolverContractInterface.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/Contract/Models/Asset/AssetResolverContractInterface.php#L38

Line indented incorrectly; expected at least 4 spaces, found 0
Copy link
Contributor

@jdreesen jdreesen Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Symfony adds such new methods to the class as PHPDoc via @method bool getGetInheritedProperties().

This way, they are recognized by the IDE, PHPStan, etc.

See, e.g., https://github.com/symfony/symfony/pull/53998/changes#diff-4412ea6a8e82d6b291607b14e89869f152887f0cf57efdf97b5908f82ebc8e21R17

Copy link
Contributor Author

@kingjia90 kingjia90 Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh perfect! Thank you for the tip
i was thinking and looking for something like this to be consistent and aligned to Symfony too.

Copy link
Contributor Author

@kingjia90 kingjia90 Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but doesn't it gives a false impression the method already exists (eg. like a magic method)? i was afraid that Phpstan would complain about it

Copy link
Contributor Author

@kingjia90 kingjia90 Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also considered a @deprecation to use interface without the mentioned methods or so, but without a replacement, seems improper to use it


// BC-Break: This method will be introduced in v4.0.0
// public function setGetInheritedProperties(bool $getInheritedProperties): void;

Check notice on line 41 in src/Contract/Models/Asset/AssetResolverContractInterface.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/Contract/Models/Asset/AssetResolverContractInterface.php#L41

Line indented incorrectly; expected at least 4 spaces, found 0
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@

public function doHideUnpublished(): bool;


// BC-Break: This method will be introduced in v4.0.0

Check notice on line 33 in src/Contract/Models/DataObject/ConcreteObjectResolverContractInterface.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/Contract/Models/DataObject/ConcreteObjectResolverContractInterface.php#L33

Line indented incorrectly; expected at least 4 spaces, found 0
// public function getGetInheritedProperties(): bool;

Check notice on line 34 in src/Contract/Models/DataObject/ConcreteObjectResolverContractInterface.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/Contract/Models/DataObject/ConcreteObjectResolverContractInterface.php#L34

Line indented incorrectly; expected at least 4 spaces, found 0

// BC-Break: This method will be introduced in v4.0.0
// public function setGetInheritedProperties(bool $getInheritedProperties): void;

Check notice on line 37 in src/Contract/Models/DataObject/ConcreteObjectResolverContractInterface.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/Contract/Models/DataObject/ConcreteObjectResolverContractInterface.php#L37

Line indented incorrectly; expected at least 4 spaces, found 0


public function setGetInheritedValues(bool $getInheritedValues): void;

public function getGetInheritedValues(): bool;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@

public function doHideUnpublished(): bool;

// BC-Break: This method will be introduced in v4.0.0

Check notice on line 33 in src/Contract/Models/DataObject/DataObjectFolderResolverContractInterface.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/Contract/Models/DataObject/DataObjectFolderResolverContractInterface.php#L33

Line indented incorrectly; expected at least 4 spaces, found 0
// public function getGetInheritedProperties(): bool;

Check notice on line 34 in src/Contract/Models/DataObject/DataObjectFolderResolverContractInterface.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/Contract/Models/DataObject/DataObjectFolderResolverContractInterface.php#L34

Line indented incorrectly; expected at least 4 spaces, found 0

// BC-Break: This method will be introduced in v4.0.0
// public function setGetInheritedProperties(bool $getInheritedProperties): void;

Check notice on line 37 in src/Contract/Models/DataObject/DataObjectFolderResolverContractInterface.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/Contract/Models/DataObject/DataObjectFolderResolverContractInterface.php#L37

Line indented incorrectly; expected at least 4 spaces, found 0

public function setGetInheritedValues(bool $getInheritedValues): void;

public function getGetInheritedValues(): bool;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,11 @@
public function doHideUnpublished(): bool;

public function locateDaoClass(string $modelClass): ?string;

// BC-Break: This method will be introduced in v4.0.0

Check notice on line 43 in src/Contract/Models/Document/DocumentResolverContractInterface.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/Contract/Models/Document/DocumentResolverContractInterface.php#L43

Line indented incorrectly; expected at least 4 spaces, found 0
// public function getGetInheritedProperties(): bool;

Check notice on line 44 in src/Contract/Models/Document/DocumentResolverContractInterface.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/Contract/Models/Document/DocumentResolverContractInterface.php#L44

Line indented incorrectly; expected at least 4 spaces, found 0

// BC-Break: This method will be introduced in v4.0.0
// public function setGetInheritedProperties(bool $getInheritedProperties): void;

Check notice on line 47 in src/Contract/Models/Document/DocumentResolverContractInterface.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/Contract/Models/Document/DocumentResolverContractInterface.php#L47

Line indented incorrectly; expected at least 4 spaces, found 0

}