Follow-up to #2873750: Add Change record to @deprecated for install_ensure_config_directory()

Add @trigger_error() to and remove usages of install_ensure_config_directory()

This method was deprecated in #2466197: Staging directory should not have to be writeable..

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
FileSize
1.57 KB

Here's a patch

alexpott’s picture

Rerolled.

borisson_’s picture

Status: Needs review » Reviewed & tested by the community
+++ b/core/modules/simpletest/src/KernelTestBase.php
@@ -121,7 +121,7 @@ protected function prepareConfigDirectories() {
+    if (!file_prepare_directory($path, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS)) {

In install_ensure_config_directory
we were also doing:
file_prepare_directory($config_directory, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS);

So that means that functionally we're doing the same thing, looks very good.

xjm’s picture

Status: Reviewed & tested by the community » Needs review

Confirmed that this is the last reference:

[ibnsina:maintainer | Fri 16:01:33] $ grep -r "install_ensure_config_directory" *
core/includes/install.inc:function install_ensure_config_directory($type) {
core/modules/simpletest/src/KernelTestBase.php:    if (!install_ensure_config_directory(CONFIG_SYNC_DIRECTORY)) {

The change record in https://www.drupal.org/node/2501187 doesn't mention this function and only refers to the long-gone active directory. It looks like the CR reference was added in #2873750: Add Change record to @deprecated for install_ensure_config_directory(), but let's either update the change record appropriately or switch to a better one if there's a better one?

alexpott’s picture

Status: Needs review » Reviewed & tested by the community

I've added the deprecation of the function to the existing CR. The code that was already on the CR is the same code that you would need to replace the call to install_ensure_config_directory().

  • xjm committed 119362c on 8.5.x
    Issue #2914033 by alexpott, borisson_: Complete deprecation of...

  • xjm committed 70205b5 on 8.4.x
    Issue #2914033 by alexpott, borisson_: Complete deprecation of...
xjm’s picture

Version: 8.5.x-dev » 8.4.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.5.x and cherry-picked to 8.4.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.