Hi,

in Drupal 7 you could bootstrap Drupal partly with f.e.

drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE);

This is useful to use only the database API for a specific case.

drupal_bootstrap(); isn't available in Drupal 8 anymore.

I "guess" there's a more "clever" way now. :)

My question: How Drupal be booted partly in the 8 version?

Thanks in front for your support.

Comments

jepSter created an issue. See original summary.

AniaMi’s picture

Any ideas?

jepster_’s picture

Unfortunately still not..

jepster_’s picture

Version: 8.0.2 » 8.1.8
alexpott’s picture

Status: Active » Needs review

There is no bootstrap in the terms of a system that boots up to specific levels as required. Services are initialised on demand. To get to an environment where the auto-loader and the container work see https://api.drupal.org/api/drupal/core%21scripts%21password-hash.sh/8.2.x - specifically the lines after the autoloader include.

See also the change record https://www.drupal.org/node/2275139

jepster_’s picture

Status: Needs review » Closed (fixed)

Thanks alexpott. Your example seems to do exactly what I need. I will close this issue. If everything pops out, I will just re-open it.