Skip to content

Commit 1c5376e

Browse files
Merge pull request #14 from emulsify-ds/release/2.1.0
Prepare Emulsify Tools 2.1.0 release
2 parents ef2ae39 + a92e488 commit 1c5376e

58 files changed

Lines changed: 3035 additions & 467 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/php-compatibility.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,25 @@ jobs:
3030
- name: Lint PHP sources
3131
run: git ls-files '*.php' | xargs -n 1 php -l
3232

33+
phpcs:
34+
name: PHPCS (PHP 8.4)
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v4
39+
40+
- name: Setup PHP
41+
uses: shivammathur/setup-php@v2
42+
with:
43+
php-version: "8.4"
44+
coverage: none
45+
46+
- name: Install dependencies
47+
run: composer install --prefer-dist --no-interaction
48+
49+
- name: Run PHP_CodeSniffer
50+
run: composer lint:phpcs
51+
3352
unit:
3453
name: PHPUnit (Drupal ${{ matrix.drupal-label }} / PHP ${{ matrix.php-version }})
3554
runs-on: ubuntu-latest

.github/workflows/semantic-release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525
uses: cycjimmy/semantic-release-action@v6
2626
with:
2727
semantic_version: 25.0.3
28+
extra_plugins: |
29+
@semantic-release/changelog@6.0.3
30+
@semantic-release/git@10.0.1
2831
env:
2932
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3033

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Changelog

LICENSE

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GNU GENERAL PUBLIC LICENSE
22
Version 2, June 1991
33

4-
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
4+
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
55
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
66
Everyone is permitted to copy and distribute verbatim copies
77
of this license document, but changing it is not allowed.
@@ -290,8 +290,8 @@ to attach them to the start of each source file to most effectively
290290
convey the exclusion of warranty; and each file should have at least
291291
the "copyright" line and a pointer to where the full notice is found.
292292

293-
{description}
294-
Copyright (C) {year} {fullname}
293+
<one line to give the program's name and a brief idea of what it does.>
294+
Copyright (C) <year> <name of author>
295295

296296
This program is free software; you can redistribute it and/or modify
297297
it under the terms of the GNU General Public License as published by
@@ -329,12 +329,11 @@ necessary. Here is a sample; alter the names:
329329
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330330
`Gnomovision' (which makes passes at compilers) written by James Hacker.
331331

332-
{signature of Ty Coon}, 1 April 1989
332+
<signature of Ty Coon>, 1 April 1989
333333
Ty Coon, President of Vice
334334

335335
This General Public License does not permit incorporating your program into
336336
proprietary programs. If your program is a subroutine library, you may
337337
consider it more useful to permit linking proprietary applications with the
338338
library. If this is what you want to do, use the GNU Lesser General
339339
Public License instead of this License.
340-

LICENSE.txt

Lines changed: 0 additions & 339 deletions
This file was deleted.

README.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,31 @@ codebase now uses PHP 8.4-only syntax where it improves readability.
1515
- The Twig helpers and child theme generator remain broadly useful on their own,
1616
but the favicon migration and admin-theme favicon features expect the
1717
Emulsify 7.x companion theme APIs to be present.
18+
- In short: child theme generation remains available for Emulsify Drupal 6.x
19+
projects, while generated favicon deployment and repair are the Emulsify
20+
Drupal 7.x companion workflows in this 2.x line.
1821

1922
## Usage
2023

2124
### Child theme generation
2225

23-
Emulsify Tools 1.x provides the supported Drush workflow for generating Emulsify Drupal 6.x child themes. Use either command form:
24-
25-
Child theme generation:
26+
Emulsify Tools 2.x still includes the supported Drush workflow for generating
27+
Emulsify Drupal 6.x child themes. Use either command form:
2628

2729
`drush emulsify_tools:bake [theme_name]`
2830

29-
The commands are equivalent. The generated child theme uses `emulsify` as its runtime parent theme and should be created under the Drupal custom theme path expected by the command, such as `web/themes/custom/my_theme` in a Composer-based Drupal project.
31+
`drush emulsify [theme_name]`
32+
33+
The commands are equivalent. The generated child theme uses `emulsify` as its
34+
runtime parent theme and should be created under the Drupal custom theme path
35+
expected by the command, such as `web/themes/custom/my_theme` in a
36+
Composer-based Drupal project.
3037

31-
Drupal core Starterkit-based generation is being prepared for the Emulsify Drupal 7.x release line. For Emulsify Drupal 6.x, use Emulsify Tools for child theme generation.
38+
Drupal core Starterkit-based generation is being prepared for the Emulsify Drupal
39+
7.x release line. For Emulsify Drupal 6.x child theme projects, use Emulsify
40+
Tools for child theme generation.
3241

33-
Generated favicon deployment:
42+
Generated favicon deployment for Emulsify Drupal 7.x companion themes:
3443

3544
`drush emulsify_tools:favicon-generate [theme_name]`
3645

@@ -304,7 +313,12 @@ To validate the Emulsify Drupal 6.x child theme generation workflow against this
304313
.github/scripts/generation-smoke.sh
305314
```
306315

307-
The script creates a disposable Drupal fixture site, installs Emulsify Drupal `^6`, installs this checkout as Emulsify Tools `1.x`, verifies both Drush command help targets, runs `drush emulsify watson`, validates the generated theme files, and enables the generated child theme. It intentionally does not test Drupal core Starterkit generation.
316+
The script creates a disposable Drupal fixture site, installs Emulsify Drupal
317+
`^6`, installs this 2.x checkout through the script's local `TOOLS_VERSION`
318+
fixture alias, verifies both Drush command help targets, runs
319+
`drush emulsify watson`, validates the generated theme files, and enables the
320+
generated child theme. It intentionally does not test Drupal core Starterkit
321+
generation or the Emulsify Drupal 7.x favicon deployment workflow.
308322

309323
Requirements: Composer and PHP. The default SQLite fixture database also requires `pdo_sqlite`.
310324

@@ -343,8 +357,9 @@ There's a two-step process to publish a new release to [the project page](https:
343357

344358
- Merge the release-ready changes into `main`.
345359
- The [semantic-release workflow](https://github.com/emulsify-ds/emulsify_tools/actions)
346-
will calculate the next version from the merged commit messages, create the
347-
GitHub release, and push the new tag to Drupal.org.
360+
will calculate the next version from the merged commit messages, update
361+
`CHANGELOG.md`, create a `[skip ci]` release commit, create the GitHub
362+
release, and push the release commit and new tag to Drupal.org.
348363
- When the workflow completes, confirm the new version appears on the
349364
[GitHub Releases page](https://github.com/emulsify-ds/emulsify_tools/releases).
350365

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
"drush/drush": "Install Drush 13+ to use the emulsify_tools:bake and favicon deployment commands."
3030
},
3131
"scripts": {
32+
"lint": [
33+
"@lint:phpcs"
34+
],
35+
"lint:phpcs": "phpcs -q",
36+
"lint:phpcbf": "phpcbf",
3237
"test:unit": "phpunit --configuration phpunit.xml.dist",
3338
"test:deprecations": "phpstan analyse --configuration phpstan.neon.dist --no-progress --memory-limit=1G --debug"
3439
},

emulsify_tools.post_update.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
<?php
22

3+
/**
4+
* @file
5+
* Post update hooks for Emulsify Tools.
6+
*/
7+
38
declare(strict_types=1);
49

510
use Drupal\emulsify_tools\Favicon\FaviconThemeSettingsBackfill;
611

712
/**
813
* Backfills favicon theme settings for installed Emulsify-based themes.
14+
*
15+
* @param array<string, mixed> $sandbox
16+
* The Drupal post update sandbox.
917
*/
1018
function emulsify_tools_post_update_backfill_emulsify_favicon_settings(array &$sandbox = []): string {
1119
/** @var \Drupal\emulsify_tools\Favicon\FaviconThemeSettingsBackfill $backfill */

emulsify_tools.services.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
services:
2+
cache.emulsify_tools:
3+
class: Drupal\Core\Cache\CacheBackendInterface
4+
tags:
5+
- { name: cache.bin }
6+
factory: ['@cache_factory', 'get']
7+
arguments: [emulsify_tools]
28
emulsify_tools.filesystem:
39
class: Symfony\Component\Filesystem\Filesystem
410
Symfony\Component\Filesystem\Filesystem:

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@
2525
"scripts": {
2626
"husky:commit-msg": "commitlint --edit $1",
2727
"husky:pre-commit": "npm run lint",
28-
"lint": "npm run lint:php",
28+
"lint": "npm run lint:php && npm run lint:phpcs",
2929
"lint-fix": "npm run lint:php",
3030
"lint:php": "node scripts/lint-php.mjs",
31+
"lint:phpcs": "composer lint:phpcs",
3132
"lint-staged": "lint-staged"
3233
}
3334
}

0 commit comments

Comments
 (0)