- Issue created by @prudloff
- ๐ฎ๐ณIndia pradhumanjainOSL
pradhumanjain2311 โ made their first commit to this issueโs fork.
- ๐ฎ๐ณIndia Sandeep Sanwale
Sandeep Sanwale โ made their first commit to this issueโs fork.
- Merge request !7843Issue #3442810: Deprecation in Number::alphadecimalToInt() โ (Open) created by Sandeep Sanwale
- ๐ฎ๐ณIndia Sandeep Sanwale
Here i have added the check which validates that if $string contains malformed string then it throws an exception .
- gaurav gupta Jaipur, Rajasthsan
Gaurav Gupta โ made their first commit to this issueโs fork.
- Status changed to Needs review
8 months ago 7:00am 30 April 2024 - Status changed to Needs work
8 months ago 1:31pm 30 April 2024 - First commit to issue fork.
- ๐ช๐ธSpain vidorado Pamplona (Navarra)
Many tests were failing because they were passing
NULL
or an empty string toNumber::alphadecimalToInt()
. So I believe we should continue accepting these two special "degenerate" values as input. Two tests have been added: one to ensure this behavior and other to verify that an exception is thrown for any other non-alphanumeric characters.I'm not sure how to proceed if we want to provide a deprecation message. Perhaps something like this?
@trigger_error('Passing non-alphanumeric characters is deprecated in Number::alphadecimalToInt() and will be removed in Drupal 12.', E_USER_DEPRECATED);
- ๐บ๐ธUnited States smustgrave
So believe we should actually do a deprecation here. #10 close but there's a specific pattern that has to be followed, would check core for examples. But deprecated in 11.2 and required in 12.
- ๐ช๐ธSpain vidorado Pamplona (Navarra)
I've created a change record and triggered a deprecation error, as it must be done according to https://www.drupal.org/node/2856615 โ
Additionally, the follow-issue ๐ Remove NumberTest::testAlphadecimalToIntReturnsZeroWithNullAndEmptyString() test Active as been created in order to remove the BC test.
- ๐บ๐ธUnited States smustgrave
Would be deprecated in 11.2
Can't add deprecation for versions with releases out already.
- ๐ช๐ธSpain vidorado Pamplona (Navarra)
Oops, sorry! :) I wasnโt sure which version to include in the message since I donโt really know when this MR will be merged. I initially put 11.0.0 and later forgot to revisit it.
So, should we always deprecate for the next minor version as an estimate?