- Issue created by @joachim
- First commit to issue fork.
- ๐ฎ๐ณIndia govind_giri_goswami
Yes, we can remove the Drupal\locale\Locale::config() method because in files such as core/modules/locale/locale.bulk.inc and core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php, the function of the injected service is directly called instead of going through the config() function. Therefore, it's more efficient to directly utilize the injected service in these files.
- ๐ฎ๐ณIndia keshav patel
Keshav Patel โ made their first commit to this issueโs fork.
- Merge request !6948Resolve #3422915 "Deprecate drupallocalelocale and" โ (Closed) created by keshav patel
- Status changed to Needs review
8 months ago 4:48am 7 March 2024 - ๐ฎ๐ณIndia keshav patel
Replaced
Drupal\locale\Locale::config()
with\Drupal::service('locale.config_manager')
, Verified the Checks Usingcore/scripts/dev/commit-code-check.sh --cached
(All Checks Passed). Please Review - Status changed to Needs work
8 months ago 2:31pm 7 March 2024 - First commit to issue fork.
- Status changed to Needs review
8 months ago 9:45am 21 March 2024 - Status changed to Needs work
8 months ago 10:02am 21 March 2024 - ๐ฌ๐งUnited Kingdom joachim
> Deprecated the config() method.
Deprecating doesn't meant removing it -- we have to keep it in, and add a trigger_error() to it so that any callers are told that they need to updated their code.
- First commit to issue fork.
- Status changed to Needs review
8 months ago 7:19am 29 March 2024 - Status changed to Needs work
8 months ago 12:23pm 29 March 2024 - ๐บ๐ธUnited States smustgrave
Deprecation isnโt correct. Recommend looking through the repo for examples of deprecation format
- ๐ฏ๐ตJapan magaki
I modified the documentation according to Drupal deprecation policy and added its test.
Please review it.The test fails, but it doesn't seem to be related to the changes.
https://git.drupalcode.org/issue/drupal-3422915/-/pipelines/133015/test_...โก%EF%B8%8F%20PHPUnit%20Unit - ๐บ๐ธUnited States smustgrave
Seems small enough to deprecate in 10.3 for removal in 11.
Will need a change record and the link points to that. Can be simple and would search the change record list for other deprecation examples for to write one (usually just a sentence or two)
And for the random failure would try and pull the latest 11.x code into this branch. Thatโs resolved it on other issues.
- Status changed to Needs review
8 months ago 5:20am 30 March 2024 - ๐ฏ๐ตJapan magaki
I modified the deprecated version to 10.3 and removal version to 11.0.
I could not create change records because I have no permissions.
- ๐บ๐ธUnited States smustgrave
On this ticket whaat happens if you click add change notice?
- ๐บ๐ธUnited States smustgrave
If that doesnโt work will try and help on Monday
- ๐ฌ๐งUnited Kingdom joachim
> pull the latest 11.x code into this branch
Please rebase rather than merge!
- ๐ฏ๐ตJapan magaki
I made a mistake in rebase once, so I force pushed the pre-rebase, updated the 11.x branch of the repository to the latest, and rebased the branch to on top of that.
- ๐ฏ๐ตJapan magaki
Thank you for confirming my account.
I could create a new change records.
https://www.drupal.org/node/3437110 โ - Status changed to RTBC
8 months ago 3:19pm 30 March 2024 - ๐บ๐ธUnited States smustgrave
Deprecation CR looks good.
Thanks for updating link in code too.
- Status changed to Needs work
8 months ago 5:20pm 30 March 2024 - ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
Thanks for working on this everyone!
Some unrelated change snuck into the MR - probably due to an IDE - we need to remove that. Also I don;t think this issue should be introducing a camel cased variable everywhere. I
think we should replace Locale::config() we \Drupal::service('locale.config_manager') and be done.Also we need to add a deprecation to the class body so that we can safely remove the class in 11.x. I. think this is fine here because this in not a plugin and therefore won't trigger unexpected deprecations only good ones.
- Status changed to Needs review
8 months ago 5:42am 31 March 2024 - ๐ฏ๐ตJapan magaki
- Added documentation about the deprecation of the
Locale
class.
- Removed unnecessary periods.
- About using$localConfigManager
as a temporary variable ofLocale::config()
- Removed$localConfigManager
if it was only used once.
- Renamed to$locale_config_manager
if it was used more than once.
Please review it - Status changed to RTBC
7 months ago 4:08pm 22 April 2024 - ๐บ๐ธUnited States smustgrave
Deprecation seems good now. Marking this so we don't miss the 10.3 boat.
- Status changed to Needs work
7 months ago 5:19pm 22 April 2024 - ๐ฌ๐งUnited Kingdom catch
If we're doing this for removal in 11.0.0, we should also have an 11.x-specific MR here that does the removal directly without the bc layer / test coverage etc. The existing MR should be re-targeted/rebased for 10.3.x
Haven't been asking for this previously, but we're adding new deprecations nearly as quickly as we're removing them still, so think we need to start using that workflow.
- Merge request !7667#3422915 Deprecate Drupal\locale\Locale and its one method - 10.3.x with deprecation โ (Closed) created by joachim
- Status changed to Needs review
7 months ago 10:39am 23 April 2024 - ๐ฌ๐งUnited Kingdom joachim
Easier to make the current MR for 11.x the one without the deprecation, and make a new branch and MR for 10.3 with the current code.
- Status changed to RTBC
7 months ago 12:51pm 23 April 2024 - ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
alexpott โ changed the visibility of the branch 3422915-10.2.deprecate-drupallocalelocale to hidden.
- ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
alexpott โ changed the visibility of the branch 11.x to hidden.
- Status changed to Needs work
7 months ago 1:44pm 23 April 2024 - ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
I've fixed up the 10.3.x MR so that the test is correct - this does not return a \Drupal\Core\Config\ConfigManager object it returns a \Drupal\locale\LocaleConfigManager object.
Unfortunately the 11.x MR does not do the removal so that needs work.
Also we use
\Drupal::service()
overDrupal::service()
- Assigned to joachim
- ๐ฌ๐งUnited Kingdom joachim
> This file needs to be removed - this is the 11.x branch.
Ok something went WTF with my branches. I'll fix.
- Issue was unassigned.
- Status changed to Needs review
7 months ago 2:15pm 23 April 2024 - ๐ฌ๐งUnited Kingdom joachim
I've fixed the file removals in the 11.x MR. I've no idea how they got lost / and maybe on the wrong branch!
I'm confused about whether there's anything else to fix -- @alexpott you seem to have applied the suggested changes to both branches?
- Status changed to RTBC
7 months ago 3:29pm 28 April 2024 - ๐บ๐ธUnited States smustgrave
Rebased the 10.3.x MR as the failure appeared to be a random Umami bug.
Believe all feedback has been addressed
-
alexpott โ
committed dc9a4c53 on 10.3.x
Issue #3422915 by magaki, karanpagare, joachim, alexpott, Keshav Patel,...
-
alexpott โ
committed dc9a4c53 on 10.3.x
- Status changed to Fixed
7 months ago 7:36am 29 April 2024 - ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
-
alexpott โ
committed 4c93088c on 11.x
Issue #3422915 by magaki, karanpagare, joachim, alexpott, Keshav Patel,...
-
alexpott โ
committed 4c93088c on 11.x
-
alexpott โ
committed 4c93088c on 11.0.x
Issue #3422915 by magaki, karanpagare, joachim, alexpott, Keshav Patel,...
-
alexpott โ
committed 4c93088c on 11.0.x