sh
# Syntax.
composer show vendor/package
# Example.
composer show drupal/ecaname : drupal/eca
descrip. : Event, Conditions, Actions - powerful, versatile, and user-friendly rules engine for Drupal
keywords :
versions : * 2.1.0
type : drupal-module
license : GNU General Public License v2.0 or later (GPL-2.0-or-later) (OSI approved) https://spdx.org/licenses/GPL-2.0-or-later.html#licenseText
homepage : https://www.drupal.org/project/eca
source : [git] https://git.drupalcode.org/project/eca.git 2.1.0
dist : [zip] https://ftp.drupal.org/files/projects/eca-2.1.0.zip 2.1.0
path : /var/www/html/web/modules/contrib/eca
names : drupal/eca
support
source : https://drupal.org/project/eca
issues : https://drupal.org/project/issues/eca
requires
dragonmantank/cron-expression ^3.1
drupal/core ^10.3||^11
ext-dom *
ext-json *
mtownsend/xml-to-array ^2.0
php >=8.1
requires (dev)
drupal/eca_ui *
drupal/entity_reference_revisions ^1.12
drupal/inline_entity_form ^3.0
drupal/paragraphs ^1.18
drupal/token ^1.15
drupal/webform dev-3465838-drupal-11-compatibility
Show installed module information via composer
mc cat s3/customer/backups/prod/customer-20250131011503.sql.gz | gunzip -c | psql postgres://$POSTGRESQL_U
SER:$POSTGRESQL_PASSWORD@$POSTGRESQL_HOST:$POSTGRESQL_PORT/$POSTGRESQL_DATABASEPostgres DB Import
drush php-eval "\Drupal::moduleHandler()->loadInclude('media', 'install');media_install();";Fix broken media previews
// Remove the vendor folder
rm -rf vendor
// Switch inside the container (if you are using Docker)
doc exec bash
// Now run Composer inside the container
/usr/local/bin/composer installHow to handle a wrong PHP version in the vendor folder
// Default, only plaintext.
xdebug.cli_color=0
// Coloured if your terminal will support it.
xdebug.cli_color=1
// Forced coloured output.
xdebug.cli_color=2Enable XDebug syntax highlighting in PHP
git fetch all
git checkout BRANCHNAME
git pull origin BRANCHNAME
git merge origin/develop
# Solve the merge conflict.
# The commit message gets generated.
git commit
git push origin/BRANCHNAMELets do a step by step view of this:
Lets say we want to take our branch with the name feature/my_branch and merge origin/develop branch into it. This is common practice to make sure to always start to work with an up to date branch.
The first step should be to do a git fetch all. It will gather the changes for all branches that are within the repository and your local system of the current project you are in.
Then make sure you are on the branch you want with git switch feature/my_branch or if you don't have a local version yet get it from the repository with git checkout feature/my_branch.
Then get all the changes previously gathered with the git fetch all command with git pull. So now our branch that we are on should be on the most recent state for itself.
Now to get to the part where we want the recent changes of the develop branch into our branch.
git merge origin/develop will try to merge all the changes that happened on origin/develop into the branch you are currently on. Lets say you and develop both worked on the same file. Which is a common thing with the composer.lock or composer.json. You will have to solve the merge conflict by hand, step by step. Here is an example for an merge conflict:
{
"name": "example/project",
"require": {
<<<<<<< HEAD
"drupal/core": "^9.4",
"drupal/devel": "^4.1"
=======
"drupal/core": "^9.5",
"drupal/admin_toolbar": "^3.0"
>>>>>>> feature/my_branch
}
}As you can see within the code, we updated Drupal core and add the new module admin_toolbar. It's important to not just use your own changes, you need to check if it is the right choice indeed. To proceed you need to delete the lines that mark the changes and keep the code you want.
{
"name": "example/project",
"require": {
"drupal/core": "^9.5",
"drupal/admin_toolbar": "^3.0"
"drupal/devel": "^4.1"
}
}So if we solved the merge conflict like in the code above we want to commit the changes. In this case you don't need to create your own message for this commit, since we are in the process of a merge we can use simply git commit and a pre-generated commit message will be shown. Depending on your IDE you save the message and then can do the last step with
git push origin/feature/my_branch.
That concludes how to commit and push a change the right way!
How to commit a merge request and avoid or solve merge conflicts
git fetch --all
git checkout stage
# This resets your local stage branch to the version of remote.
# The origin/stage could diverge from the local due to resetting the branch.
git reset --hard origin/stage
git merge origin/BRANCHNAME
git push origin stage
git checkout BRANCHNAMEUpdate a diverged local branch from remote to be on track again
curl https://git.drupalcode.org/project/gitlab_templates/-/raw/main/gitlab-ci/template.gitlab-ci.yml > .gitlab-ci.ymlQuick start: module testing on drupal.org
drush migrate:statusDisplay a summary of the status of your migrations.
drush migrate:importTrigger the import process for migrations.
drush migrate:reset-statusReset the migration statuses if your migration get stuck.
drush migrate:rollbackRollback your migrations by undoing changes made.
drush migrate:stopStop a running migration gracefully.
drush migrate:fields-sourceList field sources of your sources plugin.
drush migrate:messagesShow migration messages.