- 🇫🇷France andypost
Fix one test and ensure NULL processed via
array_key_exists()
- Status changed to Needs review
almost 2 years ago 3:40pm 28 February 2023 - Status changed to Needs work
almost 2 years ago 2:46pm 2 March 2023 - Assigned to mondrake
- 🇮🇹Italy mondrake 🇮🇹
I'll give a try to this. In fact, this issue would be the major blocker for 📌 Deprecate support for unused \PDO::FETCH_* modes Fixed . There, I'll be trying to remove usage of \PDO::FETCH_CLASS fetch mode. That mode is in fact a bit in contraddiction with the philosophy of PHP 8.2 that started tightening on usage of dynamic properties.
- Issue was unassigned.
- Status changed to RTBC
over 1 year ago 5:15pm 29 March 2023 - 🇳🇱Netherlands daffie
All the code changes look good to me.
The#[\AllowDynamicProperties]
has been removed from the class.
Testing has been added.
For me it is RTBC. - 🇨🇭Switzerland berdir Switzerland
This gets rid of the attribute but doesn't really address #2.
I don't quite understand why this adds hasColumn() but no other explicit methods to access the data. either we add get as well or we don't have has either? __isset() exists too? Ah, I I see, it's to replace the property exists check. Unsure about the name too.
I don't think moving to an array from undefined properties is a performance problem, if we're concerned about that then we should probably not rely on magic methods. array_key_exists() is also slower than isset(), if we're concened about performance?
- 🇮🇹Italy mondrake 🇮🇹
#58 for sure if someone wants to develop a full fledged API according to #2, they may do so. In any case the magic methods will have to stay (even though deprecated) till next major. I think the point is more whether to do it here or in a following issue.
My motivation here is #36, I will not pursue any of the above further.
- Status changed to Needs work
over 1 year ago 9:32pm 30 March 2023 - 🇬🇧United Kingdom alexpott 🇪🇺🌍
We're changing from
if (property_exists($row, $this->aliases[$column])) {
toif ($row->hasColumn($this->aliases[$column])) {
- any contrib code that does this will break. As pointed out earlier dynamic properties on \stdClass are not deprecated so we're not really making a change we have to make here. So looking at contrib we'll break things see https://git.drupalcode.org/search?group_id=2&repository_ref=&scope=blobs... - plus if people are doing it in contrib then it will be done in custom code too.