Commit 787127df authored by Dries's avatar Dries

- Patch #1089320 by Dave Reid: update version strings and constants to 8.x.

parent 7a8e71e0
Drupal 7.0, xxxx-xx-xx (development version)
Drupal 8.0, xxxx-xx-xx (development version)
----------------------
Drupal 7.0, 2011-01-05
----------------------
- Database:
* Fully rewritten database layer utilizing PHP 5's PDO abstraction layer.
......
......@@ -10,9 +10,8 @@ particular areas of Drupal. All of them are subject to change.
Branch maintainers
------------------
Drupal 7
Drupal 8
- Dries Buytaert 'dries' <http://drupal.org/user/1>
- Angela Byron 'webchick' <http://drupal.org/user/24967>
Component maintainers
......@@ -126,7 +125,7 @@ Topic coordinators
Accessibility
- Everett Zufelt 'Everett Zufelt' <http://drupal.org/user/406552>
- Brandon Bowersox 'brandonojc' <http://drupal.org/user/186415>
- Brandon Bowersox 'brandonojc' <http://drupal.org/user/186415>
Documentation
- Ariane Khachatourians 'arianek' <http://drupal.org/user/158886>
......
......@@ -3,10 +3,10 @@ INTRODUCTION
------------
This document describes how to:
* Update your Drupal site from one minor 7.x version to another minor 7.x
version; for example, from 7.8 to 7.9, or from 7.6 to 7.10.
* Update your Drupal site from one minor 8.x version to another minor 8.x
version; for example, from 8.8 to 8.9, or from 8.6 to 8.10.
* Upgrade your Drupal site's major version from 6.x to 7.x.
* Upgrade your Drupal site's major version from 7.x to 8.x.
First steps and definitions:
......@@ -43,7 +43,7 @@ More in-depth information on upgrading can be found at http://drupal.org/upgrade
MINOR VERSION UPDATES
---------------------
To update from one minor 7.x version of Drupal to any later 7.x version, after
To update from one minor 8.x version of Drupal to any later 8.x version, after
following the instructions in the INTRODUCTION section at the top of this file:
1. Log in as a user with the permission "Administer software updates".
......@@ -64,7 +64,7 @@ following the instructions in the INTRODUCTION section at the top of this file:
giving the database name, user, and password) from the old settings.php to
the new settings.php.
4. Download the latest Drupal 7.x release from http://drupal.org to a
4. Download the latest Drupal 8.x release from http://drupal.org to a
directory outside of your web root. Extract the archive and copy the files
into your Drupal directory.
......@@ -113,31 +113,31 @@ following the instructions in the INTRODUCTION section at the top of this file:
MAJOR VERSION UPGRADE
---------------------
To upgrade from a previous major version of Drupal to Drupal 7.x, after
To upgrade from a previous major version of Drupal to Drupal 8.x, after
following the instructions in the INTRODUCTION section at the top of this file:
1. Check on the Drupal 7 status of your contributed and custom modules and
1. Check on the Drupal 8 status of your contributed and custom modules and
themes. See http://drupal.org/node/948216 for information on upgrading
contributed modules and themes. See http://drupal.org/node/895314 for a list
of modules that have been moved into core for Drupal 7, and instructions on
of modules that have been moved into core for Drupal 8, and instructions on
how to update them. See http://drupal.org/update/modules for information on
how to update your custom modules, and http://drupal.org/update/theme for
custom themes.
You may decide at this point that you cannot upgrade your site, because
needed modules or themes are not ready for Drupal 7.
needed modules or themes are not ready for Drupal 8
2. Update to the latest available version of Drupal 6.x (if your current version
is Drupal 5.x, you have to upgrade to 6.x first). If you need to update,
download Drupal 6.x and follow the instructions in its UPGRADE.txt. This
document only applies for upgrades from 6.x to 7.x.
2. Update to the latest available version of Drupal 7.x (if your current version
is Drupal 6.x, you have to upgrade to 7.x first). If you need to update,
download Drupal 7.x and follow the instructions in its UPGRADE.txt. This
document only applies for upgrades from 7.x to 8.x.
3. Log in as user ID 1 (the site maintenance user).
4. Go to Administer > Site configuration > Site maintenance. Select
"Off-line" and save the configuration.
5. Go to Administer > Site building > Themes. Enable "Garland" and select it as
5. Go to Administer > Site building > Themes. Enable "Bartik" and select it as
the default theme.
6. Go to Administer > Site building > Modules. Disable all modules that are not
......@@ -145,7 +145,7 @@ following the instructions in the INTRODUCTION section at the top of this file:
modules cannot be disabled, because others depend on them. Repeat this step
until all non-core modules are disabled.
If you know that you will not re-enable some modules for Drupal 7.x and you
If you know that you will not re-enable some modules for Drupal 8.x and you
no longer need their data, then you can uninstall them under the Uninstall
tab after disabling them.
......@@ -161,9 +161,9 @@ following the instructions in the INTRODUCTION section at the top of this file:
9. If you uninstalled any modules, remove them from the sites/all/modules and
other sites/*/modules directories. Leave other modules in place, even though
they are incompatible with Drupal 7.x.
they are incompatible with Drupal 8.x.
10. Download the latest Drupal 7.x release from http://drupal.org to a
10. Download the latest Drupal 8.x release from http://drupal.org to a
directory outside of your web root. Extract the archive and copy the files
into your Drupal directory.
......@@ -185,7 +185,7 @@ following the instructions in the INTRODUCTION section at the top of this file:
11. Re-apply any modifications to files such as .htaccess or robots.txt.
12. Make your settings.php file writeable, so that the update process can
convert it to the format of Drupal 7.x. settings.php is usually located in
convert it to the format of Drupal 8.x. settings.php is usually located in
sites/default/settings.php
......@@ -221,4 +221,3 @@ following the instructions in the INTRODUCTION section at the top of this file:
To get started with Drupal 7 administration, visit
http://drupal.org/getting-started/7/admin
......@@ -8,12 +8,12 @@
/**
* The current system version.
*/
define('VERSION', '7.0-dev');
define('VERSION', '8.0-dev');
/**
* Core API compatibility.
*/
define('DRUPAL_CORE_COMPATIBILITY', '7.x');
define('DRUPAL_CORE_COMPATIBILITY', '8.x');
/**
* Minimum supported version of PHP.
......
......@@ -7166,7 +7166,7 @@ function debug($data, $label = NULL, $print_r = FALSE) {
* Parse a dependency for comparison by drupal_check_incompatibility().
*
* @param $dependency
* A dependency string, for example 'foo (>=7.x-4.5-beta5, 3.x)'.
* A dependency string, for example 'foo (>=8.x-4.5-beta5, 3.x)'.
* @return
* An associative array with three keys:
* - 'name' includes the name of the thing to depend on (e.g. 'foo').
......@@ -7183,7 +7183,7 @@ function drupal_parse_dependency($dependency) {
// We use named subpatterns and support every op that version_compare
// supports. Also, op is optional and defaults to equals.
$p_op = '(?P<operation>!=|==|=|<|<=|>|>=|<>)?';
// Core version is always optional: 7.x-2.x and 2.x is treated the same.
// Core version is always optional: 8.x-2.x and 2.x is treated the same.
$p_core = '(?:' . preg_quote(DRUPAL_CORE_COMPATIBILITY) . '-)?';
$p_major = '(?P<major>\d+)';
// By setting the minor version to x, branches can be matched.
......
......@@ -9,14 +9,14 @@
*/
/**
* Minimum schema version of Drupal 6 required for upgrade to Drupal 7.
* Minimum schema version of Drupal 7 required for upgrade to Drupal 8.
*
* Upgrades from Drupal 6 to Drupal 7 require that Drupal 6 be running
* Upgrades from Drupal 7 to Drupal 8 require that Drupal 7 be running
* the most recent version, or the upgrade could fail. We can't easily
* check the Drupal 6 version once the update process has begun, so instead
* check the Drupal 7 version once the update process has begun, so instead
* we check the schema version of system.module in the system table.
*/
define('REQUIRED_D6_SCHEMA_VERSION', '6055');
define('REQUIRED_D7_SCHEMA_VERSION', '7069');
/**
* Disable any items in the {system} table that are not core compatible.
......@@ -145,7 +145,7 @@ function update_prepare_d7_bootstrap() {
// drupal_get_installed_schema_version().
$system_schema = drupal_get_installed_schema_version('system');
if ($system_schema < 7000) {
$has_required_schema = $system_schema >= REQUIRED_D6_SCHEMA_VERSION;
$has_required_schema = $system_schema >= REQUIRED_D7_SCHEMA_VERSION;
$requirements = array(
'drupal 6 version' => array(
'title' => 'Drupal 6 version',
......@@ -304,140 +304,6 @@ function update_prepare_d7_bootstrap() {
}
}
/**
* A helper function that modules can use to assist with the transformation
* from numeric block deltas to string block deltas during the 6.x -> 7.x
* upgrade.
*
* @todo This function should be removed in 8.x.
*
* @param $sandbox
* An array holding data for the batch process.
* @param $renamed_deltas
* An associative array. Keys are module names, values an associative array
* mapping the old block deltas to the new block deltas for the module.
* Example:
* @code
* $renamed_deltas = array(
* 'mymodule' =>
* array(
* 0 => 'mymodule-block-1',
* 1 => 'mymodule-block-2',
* ),
* );
* @endcode
* @param $moved_deltas
* An associative array. Keys are source module names, values an associative
* array mapping the (possibly renamed) block name to the new module name.
* Example:
* @code
* $moved_deltas = array(
* 'user' =>
* array(
* 'navigation' => 'system',
* ),
* );
* @endcode
*/
function update_fix_d7_block_deltas(&$sandbox, $renamed_deltas, $moved_deltas) {
// Loop through each block and make changes to the block tables.
// Only run this the first time through the batch update.
if (!isset($sandbox['progress'])) {
// Determine whether to use the old or new block table names.
$block_tables = db_table_exists('blocks') ? array('blocks', 'blocks_roles') : array('block', 'block_role');
foreach ($block_tables as $table) {
foreach ($renamed_deltas as $module => $deltas) {
foreach ($deltas as $old_delta => $new_delta) {
// Only do the update if the old block actually exists.
$block_exists = db_query("SELECT COUNT(*) FROM {" . $table . "} WHERE module = :module AND delta = :delta", array(
':module' => $module,
':delta' => $old_delta,
))
->fetchField();
if ($block_exists) {
db_update($table)
->fields(array('delta' => $new_delta))
->condition('module', $module)
->condition('delta', $old_delta)
->execute();
}
}
}
foreach ($moved_deltas as $old_module => $deltas) {
foreach ($deltas as $delta => $new_module) {
// Only do the update if the old block actually exists.
$block_exists = db_query("SELECT COUNT(*) FROM {" . $table . "} WHERE module = :module AND delta = :delta", array(
':module' => $old_module,
':delta' => $delta,
))
->fetchField();
if ($block_exists) {
db_update($table)
->fields(array('module' => $new_module))
->condition('module', $old_module)
->condition('delta', $delta)
->execute();
}
}
}
}
// Initialize batch update information.
$sandbox['progress'] = 0;
$sandbox['last_user_processed'] = -1;
$sandbox['max'] = db_query("SELECT COUNT(*) FROM {users} WHERE data IS NOT NULL")->fetchField();
}
// Now do the batch update of the user-specific block visibility settings.
$limit = 100;
$result = db_select('users', 'u')
->fields('u', array('uid', 'data'))
->condition('uid', $sandbox['last_user_processed'], '>')
->orderBy('uid', 'ASC')
->where('data IS NOT NULL')
->range(0, $limit)
->execute();
foreach ($result as $row) {
$data = unserialize($row->data);
$user_needs_update = FALSE;
foreach ($renamed_deltas as $module => $deltas) {
foreach ($deltas as $old_delta => $new_delta) {
if (isset($data['block'][$module][$old_delta])) {
// Transfer the old block visibility settings to the newly-renamed
// block, and mark this user for a database update.
$data['block'][$module][$new_delta] = $data['block'][$module][$old_delta];
unset($data['block'][$module][$old_delta]);
$user_needs_update = TRUE;
}
}
}
foreach ($moved_deltas as $old_module => $deltas) {
foreach ($deltas as $delta => $new_module) {
if (isset($data['block'][$old_module][$delta])) {
// Transfer the old block visibility settings to the moved
// block, and mark this user for a database update.
$data['block'][$new_module][$delta] = $data['block'][$old_module][$delta];
unset($data['block'][$old_module][$delta]);
$user_needs_update = TRUE;
}
}
}
// Update the current user.
if ($user_needs_update) {
db_update('users')
->fields(array('data' => serialize($data)))
->condition('uid', $row->uid)
->execute();
}
// Update our progress information for the batch update.
$sandbox['progress']++;
$sandbox['last_user_processed'] = $row->uid;
}
// Indicate our current progress to the batch update system.
if ($sandbox['progress'] < $sandbox['max']) {
$sandbox['#finished'] = $sandbox['progress'] / $sandbox['max'];
}
}
/**
* Perform Drupal 6.x to 7.x updates that are required for update.php
* to function properly.
......
......@@ -2,7 +2,7 @@ name = Aggregator
description = "Aggregates syndicated content (RSS, RDF, and Atom feeds)."
package = Core
version = VERSION
core = 7.x
core = 8.x
files[] = aggregator.test
configure = admin/config/services/aggregator/settings
stylesheets[all][] = aggregator.css
......@@ -2,5 +2,5 @@ name = "Aggregator module tests"
description = "Support module for aggregator related testing."
package = Testing
version = VERSION
core = 7.x
core = 8.x
hidden = TRUE
......@@ -2,6 +2,6 @@ name = Block
description = Controls the visual building blocks a page is constructed with. Blocks are boxes of content rendered into an area, or region, of a web page.
package = Core
version = VERSION
core = 7.x
core = 8.x
files[] = block.test
configure = admin/structure/block
......@@ -2,5 +2,5 @@ name = Block test
description = Provides test blocks.
package = Testing
version = VERSION
core = 7.x
core = 8.x
hidden = TRUE
......@@ -2,5 +2,5 @@ name = Blog
description = Enables multi-user blogs.
package = Core
version = VERSION
core = 7.x
core = 8.x
files[] = blog.test
......@@ -2,7 +2,7 @@ name = Book
description = Allows users to create and organize related content in an outline.
package = Core
version = VERSION
core = 7.x
core = 8.x
files[] = book.test
configure = admin/content/book/settings
stylesheets[all][] = book.css
......@@ -2,5 +2,5 @@ name = Color
description = Allows administrators to change the color scheme of compatible themes.
package = Core
version = VERSION
core = 7.x
core = 8.x
files[] = color.test
......@@ -2,7 +2,7 @@ name = Comment
description = Allows users to comment on and discuss published content.
package = Core
version = VERSION
core = 7.x
core = 8.x
dependencies[] = text
files[] = comment.module
files[] = comment.test
......
......@@ -2,6 +2,6 @@ name = Contact
description = Enables the use of both personal and site-wide contact forms.
package = Core
version = VERSION
core = 7.x
core = 8.x
files[] = contact.test
configure = admin/structure/contact
......@@ -2,4 +2,4 @@ name = Contextual links
description = Provides contextual links to perform actions related to elements on a page.
package = Core
version = VERSION
core = 7.x
core = 8.x
name = Dashboard
description = Provides a dashboard page in the administrative interface for organizing administrative tasks and tracking information within your site.
core = 7.x
core = 8.x
package = Core
version = VERSION
files[] = dashboard.test
......
......@@ -2,5 +2,5 @@ name = Database logging
description = Logs and records system events to the database.
package = Core
version = VERSION
core = 7.x
core = 8.x
files[] = dblog.test
......@@ -2,7 +2,7 @@ name = Field
description = Field API to add fields to entities like nodes and users.
package = Core
version = VERSION
core = 7.x
core = 8.x
files[] = field.module
files[] = field.attach.inc
files[] = tests/field.test
......
......@@ -2,7 +2,7 @@ name = Field SQL storage
description = Stores field data in an SQL database.
package = Core
version = VERSION
core = 7.x
core = 8.x
dependencies[] = field
files[] = field_sql_storage.test
required = TRUE
......@@ -2,7 +2,7 @@ name = List
description = Defines list field types. Use with Options to create selection lists.
package = Core
version = VERSION
core = 7.x
core = 8.x
dependencies[] = field
dependencies[] = options
files[] = tests/list.test
name = "List test"
description = "Support module for the List module tests."
core = 7.x
core = 8.x
package = Testing
version = VERSION
hidden = TRUE
......@@ -2,6 +2,6 @@ name = Number
description = Defines numeric field types.
package = Core
version = VERSION
core = 7.x
core = 8.x
dependencies[] = field
files[] = number.test
......@@ -2,6 +2,6 @@ name = Options
description = Defines selection, check box and radio button widgets for text and numeric fields.
package = Core
version = VERSION
core = 7.x
core = 8.x
dependencies[] = field
files[] = options.test
......@@ -2,7 +2,7 @@ name = Text
description = Defines simple text field types.
package = Core
version = VERSION
core = 7.x
core = 8.x
dependencies[] = field
files[] = text.test
required = TRUE
name = "Field API Test"
description = "Support module for the Field API tests."
core = 7.x
core = 8.x
package = Testing
files[] = field_test.entity.inc
version = VERSION
......
......@@ -2,6 +2,6 @@ name = Field UI
description = User interface for the Field API.
package = Core
version = VERSION
core = 7.x
core = 8.x
dependencies[] = field
files[] = field_ui.test
......@@ -2,6 +2,6 @@ name = File
description = Defines a file field type.
package = Core
version = VERSION
core = 7.x
core = 8.x
dependencies[] = field
files[] = tests/file.test
......@@ -2,5 +2,5 @@ name = File test
description = Provides hooks for testing File module functionality.
package = Core
version = VERSION
core = 7.x
core = 8.x
hidden = TRUE
......@@ -2,7 +2,7 @@ name = Filter
description = Filters content in preparation for display.
package = Core
version = VERSION
core = 7.x
core = 8.x
files[] = filter.test
required = TRUE
configure = admin/config/content/formats
......@@ -4,7 +4,7 @@ dependencies[] = taxonomy
dependencies[] = comment
package = Core
version = VERSION
core = 7.x
core = 8.x
files[] = forum.test
configure = admin/structure/forum
stylesheets[all][] = forum.css
......@@ -2,5 +2,5 @@ name = Help
description = Manages the display of online help.
package = Core
version = VERSION
core = 7.x
core = 8.x
files[] = help.test
......@@ -2,7 +2,7 @@ name = Image
description = Provides image manipulation tools.
package = Core
version = VERSION
core = 7.x
core = 8.x
dependencies[] = file
files[] = image.test
configure = admin/config/media/image-styles
......@@ -2,6 +2,6 @@ name = Image test
description = Provides hook implementations for testing Image module functionality.
package = Core
version = VERSION
core = 7.x
core = 8.x
files[] = image_module_test.module
hidden = TRUE
......@@ -2,6 +2,6 @@ name = Locale
description = Adds language handling functionality and enables the translation of the user interface to languages other than English.
package = Core
version = VERSION
core = 7.x
core = 8.x
files[] = locale.test
configure = admin/config/regional/language
name = "Locale Test"
description = "Support module for the locale layer tests."
core = 7.x
core = 8.x
package = Testing
version = VERSION
hidden = TRUE
......@@ -2,6 +2,6 @@ name = Menu
description = Allows administrators to customize the site navigation menu.
package = Core
version = VERSION
core = 7.x
core = 8.x
files[] = menu.test
configure = admin/structure/menu
......@@ -2,7 +2,7 @@ name = Node
description = Allows content to be submitted to the site and displayed on pages.
package = Core
version = VERSION
core = 7.x
core = 8.x
files[] = node.module
files[] = node.test
required = TRUE
......
......@@ -2,5 +2,5 @@ name = "Node module access tests"
description = "Support module for node permission testing."
package = Testing
version = VERSION
core = 7.x
core = 8.x
hidden = TRUE
......@@ -2,5 +2,5 @@ name = "Node module tests"
description = "Support module for node related testing."
package = Testing
version = VERSION
core = 7.x
core = 8.x
hidden = TRUE
......@@ -2,5 +2,5 @@ name = "Node module exception tests"
description = "Support module for node related exception testing."
package = Testing
version = VERSION
core = 7.x
core = 8.x
hidden = TRUE
......@@ -2,5 +2,5 @@ name = OpenID
description = "Allows users to log into your site using OpenID."
version = VERSION
package = Core
core = 7.x
core = 8.x
files[] = openid.test
......@@ -2,6 +2,6 @@ name = OpenID dummy provider
description = "OpenID provider used for testing."
package = Testing
version = VERSION
core = 7.x
core = 8.x
dependencies[] = openid
hidden = TRUE
......@@ -2,4 +2,4 @@ name = Overlay
description = Displays the Drupal administration interface in an overlay.
package = Core
version = VERSION
core = 7.x
core = 8.x
......@@ -2,6 +2,6 @@ name = Path
description = Allows users to rename URLs.
package = Core
version = VERSION
core = 7.x
core = 8.x
files[] = path.test
configure = admin/config/search/path
......@@ -2,5 +2,5 @@ name = PHP filter
description = Allows embedded PHP code/snippets to be evaluated.
package = Core
version = VERSION
core = 7.x
core = 8.x
files[] = php.test
......@@ -2,6 +2,6 @@ name = Poll
description = Allows your site to capture votes on different topics in the form of multiple choice questions.
package = Core
version = VERSION
core = 7.x
core = 8.x
files[] = poll.test
stylesheets[all][] = poll.css
......@@ -2,7 +2,7 @@ name = Profile
description = Supports configurable user profiles.
package = Core
version = VERSION
core = 7.x
core = 8.x
files[] = profile.test
configure = admin/config/people/profile
; The Profile module is deprecated