Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Deprecate static reflection #47

Closed

Conversation

greg0ire
Copy link
Member

It has become a burden to maintain, for no benefit since we cannot find
usages for it in Doctrine itself. The plan is to create a new major
version without this types, so that php 8 compatibility is achieved.

After this, the package will consist in only 2 classes that should
probably moved elsewhere.

It has become a burden to maintain, for no benefit since we cannot find
usages for it in Doctrine itself. The plan is to create a new major
version without this types, so that php 8 compatibility is achieved.

After this, the package will consist in only 2 classes that should
probably moved elsewhere.

print_r($staticReflectionProperty->getUseStatements());
The main functionality of this package has been deprecated, you should
not use it.
Copy link
Member Author

@greg0ire greg0ire Jul 28, 2020

Choose a reason for hiding this comment

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

Tell me what you think about this: does Doctrine usually document deprecated functionality? IMO it's best not to encourage people to build more on it.

Copy link
Member

Choose a reason for hiding this comment

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

Wording is strange. So are we deprecating the package, or not? If we are, wording should say so. If we aren't, why is this saying to not use the package if there is still some use?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah… if the main functionality of the package is deprecated, then what should it be used for and what's its new main functionality? Deprecating the whole thing and moving the relevant pieces elsewhere might be a more proper decision.

@greg0ire
Copy link
Member Author

greg0ire commented Jul 28, 2020

#24 added one TypedNoDefaultReflectionProperty of the 2 classes for the ORM, and is referenced in Persistence, maybe it should be moved to that lib?

@greg0ire
Copy link
Member Author

RuntimePublicReflectionProperty is used in persistence and ORM, maybe it should be moved to persistence?

@ostrolucky
Copy link
Member

I agree

@malarzm
Copy link
Member

malarzm commented Jul 29, 2020

ODM started using the package recently with doctrine/mongodb-odm#2188

@greg0ire
Copy link
Member Author

@malarzm do you remember why the dependency was added? Asking because I can't find a reference to the Common\Reflection namespace in that PR…

@malarzm
Copy link
Member

malarzm commented Jul 29, 2020

@greg0ire the dependency was added to ensure we get latest doctrine/reflection including all the fixes for PHP 7.4 and uninitialized properties. I might have jumped the gun thinking the classes would be incorporated into ORM, doctrine/persistence would work just fine for ODM 👍

@greg0ire
Copy link
Member Author

I made some progress regarding the move at doctrine/persistence#122 , but I'm not quite there yet, help is welcome.

@greg0ire greg0ire closed this Oct 15, 2020
@greg0ire greg0ire deleted the deprecate-static-reflection branch October 15, 2020 17:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants