Download the PHP package boatware/drupal-project without Composer

On this page you can find all versions of the php package boatware/drupal-project. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package drupal-project

boatware: Drupal Project

This project gives you a quick start to a new Drupal project. It includes all commonly used QA tools like PHPStan or Psalm but also a database dump if you want to start with a fully configured system.

This README is a starting point for your project and not necessarily part of the project template.

Table of contents

System requirements

Server requirements

Recommended servers

For local development

Recommended

Login

Passwords listed below are the default passwords for the default accounts. First step should be to change the password for every account.

Login via /user/login or /user (in the latter case you'll be redirected if you aren't logged in already).

Username Password Description
admin admin Administrator account, only used by us
editor editor Editor account, most often used by customers
user-manager user-manager User manager account that can create, update and delete user accounts
api api API user account that can be used to authenticate against the API

Changelog

You can find the changelog in the file CHANGELOG.md.

Documentation

You'll be able to find the documentation in this README file and in the docs directory.

Setup

If you are working on an existing project, you can skip this section. Alternatively, you can also just delete this section from the customers project documentation since it's not needed anymore.

Requirements

* Only needed if you want to run commands like composer install locally. With Lando you also can run such commands inside Lando by prefixing the commands with lando.

1. Copy the repository

The composer way means that you install the project template with the composer create-project command.

You can create the project by running the following command in your terminal:

With this step you can skip step 2 since the create-project command will already install dependencies and run the bin/setup binary for you.

2. Install dependencies

To install all dependencies, run the following command in your terminal:

When creating a new project, this command will also run the binary bin/setup which will do some setup steps for you. After that you can delete that file since it won't be used anymore.

3. Unpack media files

To unpack the media files, run the following command in your terminal:

This command will put the pre-saved files into the correct directory.

4. Setup environment

To get the project running, you need to provide at least database credentials.

For this, this template provides an .env file which should have been created by the bin/setup command. If not, you can create it manually by copying the .env.example file.

The default credentials are as follows:

If you choose to use another environment, for example Homestead, you need to adjust these values according to your development environment.

5. Setup Lando (optional)

If you are not using Lando as development environment, you can skip this step.

Before you can start Lando for the first time, you need to adjust the project name in the .lando.yml file. Per convention, you name it after the directory you're in.

6. Setup Deployment

Since the first thing you do after a fresh install is to setup the deployment. This way we don't need to store any database dumps inside the repository.

To setup the deployment, remove the file deploy.php if it exists, copy the file deploy.dist.php to deploy.php and adjust the values according to your needs.

:warning: Make sure to check the deploy.php file after you're done! The project template is set up to be deployed to its own hosts.

7. Start Environment

To start the environment, run the following command in your terminal:

8. Install Drupal

Grab the current database dump from the server that serves the current state of the project and import it into your local database. You can do this by running the following command in your terminal:

Make sure to apply the latest configuration changes by running the following command in your terminal:

Then clear the cache by running the following command in your terminal:

This ensures that the configuration is up-to-date since the database dump might be a bit older.

9. Download files directory

To have the uploaded media files for the imported content on your local environment, login to the server via SSH and run the following command in your terminal:

where PROJECT_ROOT is the path to the project root directory (not the document root /web).

Then download the file to your local machine and unpack it.

One way to do this is to run the following command in your terminal:

where USER is the SSH user, HOST is the SSH host and PROJECT_ROOT is the path to the project root directory (not the document root /web).

Then unpack the file by running the following command in your terminal:

Make sure to delete the files.tar.gz file on the server and locally after you're done.

10. Aftercare

After the installation is done, you can deploy the freshly created project to a staging server. For this to work properly you need to follow these steps:

Now you can deploy the project by running

Some additional steps you might want to do:

Setup (existing project)

Requirements

* Only needed if you want to run commands like composer install locally. With Lando you also can run such commands inside Lando by prefixing the commands with lando.

1. Copy the repository

To get the latest version of the project, create a new directory first:

Then clone the project into the current directory by executing the following command in your terminal:

2. Install dependencies

To install all dependencies, run the following command in your terminal:

3. Setup environment

To get the project running, you need to provide at least database credentials.

For this, copy the .env.example file and name it .env. Then adjust the values according to your needs.

The default credentials are as follows:

When working in another environment than Lando, you need to adjust these values according to your development environment.

4. Start Lando

To start Lando, run the following command in your terminal:

The first time will take a while since Lando needs to build the containers, so go and get yourself a coffee.

5. Import database

If the system has been deployed anywhere get the database dump:

Then import the database into your local environment by running the following command in your terminal:

6. Import configuration

Make sure you have the latest configuration changes in your environment by running the following command in your terminal:

7. Clear cache

To make sure everything is working properly, clear the cache by running the following command in your terminal:

8. Validate environment

To finish the local setup you should check the following:

Working on a project

While working on a project, you should follow some conventions to make sure that everything is working properly and that we maintain our standards.

Commit messages

Commit messages should be written in English and follow the Conventional Commits standard.

For example:

If you're working on a Jira ticket or a GitHub issue, you should reference the ticket in the commit message:

Branch names

Branch names should be written in English and follow the Gitflow standard.

Some notable caveats:

Drupal Coding Standards

Make sure to follow the Drupal coding standards. You can check your code by running the following command in your terminal (either locally or from within your environment):

Naming conventions

Structural conventions

Modules

Themes

Classes

Commit frequency

Commit often and commit early. This way you can easily revert changes, and you can easily track down bugs.

Changelog

Whenever you do add, change or replace something, make sure to add a changelog entry. This way you can easily track down changes and communicate them to the customer.

You should follow the Keep a Changelog standard.

Important: Don't add entries for every single commit. Instead, add entries for every real change. You may work on an addition, removal or change in over 10+ commits, but you should only add one entry to the changelog.

Update Drupal

To update the Drupal core, all contributed projects (modules, themes, etc.) and their dependencies, you can either choose the semi automatic way by running a single command or the manual way by running all necessary commands one by one.

Semi automatic

To update Drupal to the latest minor version run the following command in your terminal:

This command executes the same commands as the manual way but in a single command.

Manual

Note: All commands below utilize the docker compose run command. If you prefer doing this on your local machine or any other setup, adjust the commands to your needs.

In order tpo update Drupal you need to fetch the latest compatible version of the Drupal core and all contributed projects by executing the following command in your terminal:

The next step is to update the database by running the following command:

Since the database update may change configuration files, you need to export the configuration by running the following command:

Finally, you only should clear the cache by running the following command:

Now you can check the project for any errors, commit every changed file and push the updates.

Included binaries

All binaries described below are located at ./bin.

lint-php - PHP Linter

Lints all PHP files in the ./web/modules/custom and ./web/themes/custom directories to find syntax errors.

Usage

phpcs - PHP Code Sniffer

Detect issues with code style and formatting in the ./web/modules/custom, ./web/themes/custom and ./web/profiles/custom directories.

The standard that is being used is the Drupal coding standard. Have a look at the Drupal coding standards for more information.

Usage

To check for issues, run the following command in your terminal:

phpstan - PHP Static Analysis Tool

Detects possible errors in the ./web/modules/custom, ./web/themes/custom and ./web/profiles/custom directories.

The level that is being used is level 8. Have a look at the configuration for more information.

Usage

Common problems

1. Deployer throws an error at the deploy:lock step

The error message looks like this:

This happens when the deploy.lock file is not present on the server. To fix this, make sure the deploy:prepare step is being executed on deployment. This step ensures the directory structure and that the deploy.lock file can be created.

2. Deployer throws an error at the deploy:update_code step

The error message looks like this:

When this error occurs there may be one of the following reasons:

License

Since Drupal itself is licensed under the GNU General Public License, this project is licensed under the same license.

Contributing

Acknowledgements

Contact

Project status


(c) 2024 Thomas Artmann


All versions of drupal-project with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
composer/installers Version ^2.2
drupal/admin_toolbar Version ^3.4
drupal/core-composer-scaffold Version ^11
drupal/core-project-message Version ^11
drupal/core-recommended Version ^11
drupal/gin Version ^3.0@RC
drupal/gin_login Version ^2.1
drupal/restui Version ^1.21
drupal/upgrade_status Version ^4.3
drush/drush Version ^13
mnsami/composer-custom-directory-installer Version ^2.0
vlucas/phpdotenv Version ^5.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package boatware/drupal-project contains the following files

Loading the files please wait ....