Skip to content

Commit

Permalink
Merge branch '10.x' into 11.x-from-upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
jfauske committed Jul 26, 2024
2 parents 7494229 + 4d5bb57 commit 3ff9d89
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 35 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:

env:
COMPOSER_MEMORY_LIMIT: -1
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
SYMFONY_DEPRECATIONS_HELPER: 'disabled=1'
SIMPLETEST_DB: sqlite://tmp/site.sqlite
SIMPLETEST_BASE_URL: "http://127.0.0.1:8080"

Expand All @@ -21,9 +23,15 @@ jobs:

matrix:
php-versions: ['8.3']
drupal-release: ['alpha', 'beta', 'dev']
composer-channel: ['stable', 'snapshot']

drupal-release: ['stable']
composer-channel: ['stable']
include:
- php-versions: '8.3'
drupal-release: dev
composer-channel: stable
- php-versions: '8.3'
drupal-release: stable
composer-channel: snapshot
steps:
- name: Dump matrix context
env:
Expand Down Expand Up @@ -77,8 +85,8 @@ jobs:
composer --verbose require --no-update drupal/core-composer-scaffold:^11@${{ matrix.drupal-release }}
composer --verbose require --no-update drupal/core-recommended:^11@${{ matrix.drupal-release }}
composer --verbose require --no-update --dev drupal/core-dev:^11@${{ matrix.drupal-release }}
# Remove the line below once the package is out of `alpha`.
[[ ${{ matrix.drupal-release }} == 'beta' ]] && composer require chi-teck/drupal-code-generator:^4@alpha
# Remove the line below once the package is out of `alpha`.
[[ ${{ matrix.drupal-release }} == 'beta' ]] && composer require chi-teck/drupal-code-generator:^4@alpha
composer --verbose update
- name: Install site
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
/web/profiles/contrib/
/web/libraries/

# Ignore sensitive information.
/web/sites/*/settings.php
# Ignore sensitive information
/web/sites/*/settings.local.php

# Ignore Drupal's file directory.
/web/sites/*/files/
Expand Down
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Composer template for Drupal projects

[![CI](https://github.com/drupal-composer/drupal-project/actions/workflows/ci.yml/badge.svg?branch=11.x)](https://github.com/drupal-composer/drupal-project/actions/workflows/ci.yml)
![LICENSE](https://img.shields.io/github/license/drupal-composer/drupal-project)
[![CI](https://github.com/ramsalt/drupal-project/actions/workflows/ci.yml/badge.svg?branch=10.x)](https://github.com/ramsalt/drupal-project/actions/workflows/ci.yml)

This project template provides a starter kit for managing your site
dependencies with [Composer](https://getcomposer.org/).
Expand Down Expand Up @@ -29,7 +28,7 @@ for your setup.
Create your project:

```bash
composer create-project drupal-composer/drupal-project:11.x-dev some-dir --no-interaction
composer create-project ramsalt/drupal-project:11.x-dev some-dir --no-interaction
```

The `composer create-project` command passes ownership of all files to the
Expand All @@ -48,16 +47,16 @@ composer require drupal/devel
```

By default, this project is set to install only stable releases of dependencies,
as specified by `"minimum-stability": "stable"` in `composer.json`. If you need
to use non-stable releases (e.g., `alpha`, `beta`, `RC`), you can modify the
version constraint to allow for such versions. For instance, to require a beta
as specified by `"minimum-stability": "stable"` in `composer.json`. If you need
to use non-stable releases (e.g., `alpha`, `beta`, `RC`), you can modify the
version constraint to allow for such versions. For instance, to require a beta
version of a module:

```bash
composer require drupal/devel:1.0.0-beta1
```

Alternatively, you can globally adjust the stability settings by modifying
Alternatively, you can globally adjust the stability settings by modifying
`composer.json` to include the desired stability level and explicitly allow it:

```json
Expand All @@ -67,7 +66,7 @@ Alternatively, you can globally adjust the stability settings by modifying
}
```

This configuration ensures that stable releases are preferred, but allows the
This configuration ensures that stable releases are preferred, but allows the
installation of non-stable packages when necessary.

### Adding libraries
Expand Down
67 changes: 49 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,36 @@
{
"name": "drupal-composer/drupal-project",
"description": "Project template for Drupal 11 projects with Composer",
"name": "ramsalt/drupal-project",
"description": "Project template for Drupal 10 projects with Composer",
"type": "project",
"license": "GPL-2.0-or-later",
"type": "project",
"authors": [
{
"name": "",
"name": "Marlon <[email protected]>",
"role": ""
},
{
"name": "Stephan <[email protected]>",
"role": ""
}
],
"repositories": {
"private-packagist": {
"type": "composer",
"url": "https://repo.packagist.com/ramsalt/"
},
"packagist.org": false
},
"require": {
"php": ">=8.3",
"composer/installers": "^2.1",
"cweagans/composer-patches": "^1.7",
"drupal/core-composer-scaffold": "^11@alpha",
"drupal/core-recommended": "^11@alpha",
"drupal/monolog": "^3.0",
"drush/drush": "^13@beta",
"oomphinc/composer-installers-extender": "^2.0",
"ramsalt/drupal-scaffold": "*",
"vlucas/phpdotenv": "^5.1",
"webflo/drupal-finder": "^1.3"
},
Expand All @@ -26,17 +41,7 @@
"conflict": {
"drupal/drupal": "*"
},
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
},
{
"type": "composer",
"url": "https://asset-packagist.org"
}
],
"minimum-stability": "alpha",
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"classmap": [
Expand All @@ -47,6 +52,9 @@
]
},
"config": {
"platform":{
"php": "8.3"
},
"allow-plugins": {
"composer/installers": true,
"cweagans/composer-patches": true,
Expand Down Expand Up @@ -96,21 +104,44 @@
"web/modules/custom/{$name}": [
"type:drupal-custom-module"
],
"web/modules/ramsaltmedia/{$name}": [
"type:ramsaltmedia-module"
],
"web/profiles/custom/{$name}": [
"type:drupal-custom-profile"
],
"web/themes/custom/{$name}": [
"type:drupal-custom-theme"
]
},
],
"web/themes/ramsaltmedia/{$name}": [
"type:ramsaltmedia-theme"
],
"installer-types": [
"bower-asset",
"npm-asset"
"npm-asset",
"ramsaltmedia-module",
"ramsaltmedia-theme"
],
"drupal-scaffold": {
"allowed-packages": [
"ramsalt/drupal-scaffold"
],
"locations": {
"web-root": "web/"
},
"file-mapping": {
"[web-root]/sites/development.services.yml": {
"mode": "replace",
"path": "web/core/assets/scaffold/files/development.services.yml",
"overwrite": false
}
}
},
"patchLevel": {
"drupal/core": "-p2"
},
"patches": {}
"enable-patching": true,
"patches-file": "composer.patches.json"
},
"scripts": {
"pre-install-cmd": [
Expand Down
3 changes: 3 additions & 0 deletions composer.patches.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"patches": {}
}
3 changes: 1 addition & 2 deletions scripts/composer/ScriptHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use Drupal\Core\Site\SettingsEditor;
use DrupalFinder\DrupalFinderComposerRuntime;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Filesystem\Path;

class ScriptHandler {

Expand Down Expand Up @@ -48,7 +47,7 @@ public static function createRequiredFiles(Event $event) {
require_once $drupalRoot . '/core/includes/install.inc';
new Settings([]);
$settings['settings']['config_sync_directory'] = (object) [
'value' => Path::makeRelative($drupalFinder->getComposerRoot() . '/config/sync', $drupalRoot),
'value' => '../config/sync',
'required' => TRUE,
];
SettingsEditor::rewrite($drupalRoot . '/sites/default/settings.php', $settings);
Expand Down

0 comments on commit 3ff9d89

Please sign in to comment.