91 lines
No EOL
5.8 KiB
JSON
91 lines
No EOL
5.8 KiB
JSON
{
|
|
"uuid": [
|
|
{
|
|
"value": "4f2f14d0-f991-4f10-b516-20e744c08fce"
|
|
}
|
|
],
|
|
"langcode": [
|
|
{
|
|
"value": "en"
|
|
}
|
|
],
|
|
"type": [
|
|
{
|
|
"target_id": "daily_email",
|
|
"target_type": "node_type",
|
|
"target_uuid": "8bde1f2f-eef9-4f2d-ae9c-96921f8193d7"
|
|
}
|
|
],
|
|
"revision_timestamp": [
|
|
{
|
|
"value": "2025-05-11T09:00:30+00:00"
|
|
}
|
|
],
|
|
"revision_uid": [
|
|
{
|
|
"target_type": "user",
|
|
"target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849"
|
|
}
|
|
],
|
|
"revision_log": [],
|
|
"status": [
|
|
{
|
|
"value": true
|
|
}
|
|
],
|
|
"uid": [
|
|
{
|
|
"target_type": "user",
|
|
"target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849"
|
|
}
|
|
],
|
|
"title": [
|
|
{
|
|
"value": "Why use Composer to manage Drupal dependencies?\n"
|
|
}
|
|
],
|
|
"created": [
|
|
{
|
|
"value": "2023-10-10T00:00:00+00:00"
|
|
}
|
|
],
|
|
"changed": [
|
|
{
|
|
"value": "2025-05-11T09:00:30+00:00"
|
|
}
|
|
],
|
|
"promote": [
|
|
{
|
|
"value": false
|
|
}
|
|
],
|
|
"sticky": [
|
|
{
|
|
"value": false
|
|
}
|
|
],
|
|
"default_langcode": [
|
|
{
|
|
"value": true
|
|
}
|
|
],
|
|
"revision_translation_affected": [
|
|
{
|
|
"value": true
|
|
}
|
|
],
|
|
"path": [
|
|
{
|
|
"alias": "\/daily\/2023\/10\/10\/why-use-composer-to-manage-drupal-dependencies",
|
|
"langcode": "en"
|
|
}
|
|
],
|
|
"body": [
|
|
{
|
|
"value": "\n <p>One of the initial negatives when Drupal 8 launched was introducing Composer, PHP's dependency manager, and how it could affect non-technical users.<\/p>\n\n<p>When I started doing Drupal, I downloaded the .tar.gz or .zip file of Drupal, extracted it, and placed it within my project.<\/p>\n\n<p>I did the same for any additional modules I needed.<\/p>\n\n<p>To update them, I needed to delete my files and repeat the process of downloading and replacing them.<\/p>\n\n<h2 id=\"drush\">Drush<\/h2>\n\n<p>Then, instead of doing it manually, I used Drush, the \"Drupal shell\", to download the files. This saved some time, but it still has down-sides.<\/p>\n\n<p>What if you needed to install a module like Pathauto, which has dependencies you also need to download and install?<\/p>\n\n<p>With Drush or downloading the files manually, you'd need to download the dependencies separately.<\/p>\n\n<h2 id=\"composer\">Composer<\/h2>\n\n<p>Composer is a dependency manager, which means it can handle these dependencies for us.<\/p>\n\n<p>It looks at each project's <code>composer.json<\/code> file to find its dependencies and downloads them.<\/p>\n\n<p>For example, to install Pathauto, you run <code>composer require drupal\/pathauto<\/code>.<\/p>\n\n<p>Within its output, you'll see this:<\/p>\n\n<pre><code class=\"language-plain\">Package operations: 3 installs, 0 updates, 0 removals\n - Downloading drupal\/token (1.12.0)\n - Downloading drupal\/ctools (4.0.4)\n - Downloading drupal\/pathauto (1.12.0)\n<\/code><\/pre>\n\n<p>As well as Pathauto, it's downloading its dependencies - ctools and pathauto.<\/p>\n\n<p>Instead of downloading three modules, we can do it with one command.<\/p>\n\n<p>In fact, we don't need to know what its dependencies are - Composer will do that.<\/p>\n\n<p>Also, updating the modules is just another simple command - <code>composer update<\/code>.<\/p>\n\n<p>While it may be intimidating to non-technical users, learning a few simple commands makes installing and updating modules much easier!<\/p>\n\n ",
|
|
"format": "full_html",
|
|
"processed": "\n <p>One of the initial negatives when Drupal 8 launched was introducing Composer, PHP's dependency manager, and how it could affect non-technical users.<\/p>\n\n<p>When I started doing Drupal, I downloaded the .tar.gz or .zip file of Drupal, extracted it, and placed it within my project.<\/p>\n\n<p>I did the same for any additional modules I needed.<\/p>\n\n<p>To update them, I needed to delete my files and repeat the process of downloading and replacing them.<\/p>\n\n<h2 id=\"drush\">Drush<\/h2>\n\n<p>Then, instead of doing it manually, I used Drush, the \"Drupal shell\", to download the files. This saved some time, but it still has down-sides.<\/p>\n\n<p>What if you needed to install a module like Pathauto, which has dependencies you also need to download and install?<\/p>\n\n<p>With Drush or downloading the files manually, you'd need to download the dependencies separately.<\/p>\n\n<h2 id=\"composer\">Composer<\/h2>\n\n<p>Composer is a dependency manager, which means it can handle these dependencies for us.<\/p>\n\n<p>It looks at each project's <code>composer.json<\/code> file to find its dependencies and downloads them.<\/p>\n\n<p>For example, to install Pathauto, you run <code>composer require drupal\/pathauto<\/code>.<\/p>\n\n<p>Within its output, you'll see this:<\/p>\n\n<pre><code class=\"language-plain\">Package operations: 3 installs, 0 updates, 0 removals\n - Downloading drupal\/token (1.12.0)\n - Downloading drupal\/ctools (4.0.4)\n - Downloading drupal\/pathauto (1.12.0)\n<\/code><\/pre>\n\n<p>As well as Pathauto, it's downloading its dependencies - ctools and pathauto.<\/p>\n\n<p>Instead of downloading three modules, we can do it with one command.<\/p>\n\n<p>In fact, we don't need to know what its dependencies are - Composer will do that.<\/p>\n\n<p>Also, updating the modules is just another simple command - <code>composer update<\/code>.<\/p>\n\n<p>While it may be intimidating to non-technical users, learning a few simple commands makes installing and updating modules much easier!<\/p>\n\n ",
|
|
"summary": null
|
|
}
|
|
]
|
|
} |