API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21DrupalKer...

- \Drupal\Core\DrupalKernelInterface::getSitePath()
- \Drupal\Core\DrupalKernelInterface::setSitePath()
- \Drupal\Core\DrupalKernelInterface::findSitePath
- \Drupal\Core\DrupalKernel::$sitePath

These should all document that the site path is a path relative to the app root.

E.g., this will typically be ''sites/default'.

Issue fork drupal-3209468

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

joachim created an issue. See original summary.

joachim’s picture

Although, KernelTestBase::bootKernel() calls $kernel->setSitePath with a value like 'vfs://root/sites/simpletest/87157814' and presumably that is NOT in the app root.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

joaopauloc.dev’s picture

Status: Active » Needs work
StatusFileSize
new1.49 KB
new1.49 KB

Documentation updated.

DrupalKernelInterface::getSitePath
DrupalKernelInterface::setSitePath

and

DrupalKernel property $sitePath

pooja saraah’s picture

StatusFileSize
new1.49 KB
new441 bytes

Fixed Custom Commands on #7
Attached interdiff patch.

joaopauloc.dev’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

The changes appear to make sense. Only phrase I'm not sure we can use is

Almost every time this value will be sites/default.

WIll see what the committers say but not sure we can assume that (even if it's true)

joachim’s picture

Status: Reviewed & tested by the community » Needs work

I think the test could do to be tweaked for grammar and readability. I'll have a go later.

Also there's a function first line that should be 'Gets' not 'Get'.

joaopauloc.dev’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

@joachim unless there was more you wanted to add think this is good.

  • catch committed 44336d1e on 10.0.x
    Issue #3209468 by joaopauloc.dev, pooja saraah, joachim:...

  • catch committed 1fe7829e on 10.1.x
    Issue #3209468 by joaopauloc.dev, pooja saraah, joachim:...

  • catch committed fe25e91c on 9.5.x
    Issue #3209468 by joaopauloc.dev, pooja saraah, joachim:...

  • catch committed d7c53d40 on 10.0.x
    Issue #3209468 by joaopauloc.dev, pooja saraah, joachim:...

  • catch committed a38d5bbd on 10.1.x
    Issue #3209468 by joaopauloc.dev, pooja saraah, joachim:...

  • catch committed f3536eea on 9.5.x
    Issue #3209468 by joaopauloc.dev, pooja saraah, joachim:...
catch’s picture

Version: 10.1.x-dev » 9.5.x-dev
Status: Reviewed & tested by the community » Fixed

Looks good to me.

Change drupal to Drupal on commit (actually a follow-up commit...).

By default, Drupal uses sites/default is a lot of defaults, but don't see a way around that really.

Status: Fixed » Closed (fixed)

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