Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/php-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
fail-fast: false
matrix:
php-version:
- "8.3"
- "8.4"
- "8.5"
steps:
Expand All @@ -31,7 +32,7 @@ jobs:
run: git ls-files '*.php' | xargs -n 1 php -l

phpcs:
name: PHPCS (PHP 8.4)
name: PHPCS (PHP 8.3)
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -40,7 +41,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.4"
php-version: "8.3"
coverage: none

- name: Install dependencies
Expand All @@ -56,6 +57,9 @@ jobs:
fail-fast: false
matrix:
include:
- php-version: "8.3"
drupal-core: "^11.3"
drupal-label: "^11.3"
- php-version: "8.4"
drupal-core: "^11.3"
drupal-label: "^11.3"
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ jobs:

- name: Sync release tags to Drupal.org Project
if: steps.semantic.outputs.new_release_published == 'true'
env:
RELEASE_TAG: ${{ steps.semantic.outputs.new_release_git_tag }}
run: |
git remote add drupal-org '${{ secrets.DRUPAL_REPO_URL }}'
git push drupal-org --tags
git push drupal-org "refs/tags/${RELEASE_TAG}:refs/tags/${RELEASE_TAG}"
git push drupal-org HEAD:main
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ This module provides Emulsify Twig extensions, theme-defined Twig namespaces, ch

## Compatibility

This module targets Drupal `11.3+`, includes Drupal 12 forward compatibility, and requires PHP `8.4+`. Drupal core development branch coverage is experimental until Drupal 12 beta or stable releases are available.
This module targets Drupal `11.3+`, includes Drupal 12 forward compatibility,
and supports PHP `8.3+` for Drupal 11 sites. Drupal 12 compatibility follows
Drupal core's PHP requirements and is tested on PHP `8.5`.

The bundled Drush commands follow the Drush 13+ autowiring pattern, and the
codebase now uses PHP 8.4-only syntax where it improves readability.
codebase avoids syntax newer than PHP 8.3 so Drupal 11 sites can keep using
their supported PHP 8.3 runtimes.

### Companion theme pairing

Expand Down Expand Up @@ -288,7 +291,7 @@ changes after running the command.

### Requires

- [PHP 8.4+](https://www.php.net/)
- [PHP 8.3+](https://www.php.net/)
- [Composer 2](https://getcomposer.org/)
- [Node.js 20.11+](https://nodejs.org/)

Expand Down Expand Up @@ -360,6 +363,8 @@ There's a two-step process to publish a new release to [the project page](https:
will calculate the next version from the merged commit messages, update
`CHANGELOG.md`, create a `[skip ci]` release commit, create the GitHub
release, and push the release commit and new tag to Drupal.org.
- Release tags use the semantic version only, such as `2.1.1`, with no `v`
prefix.
- When the workflow completes, confirm the new version appears on the
[GitHub Releases page](https://github.com/emulsify-ds/emulsify_tools/releases).

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
},
"require": {
"php": "^8.4",
"php": "^8.3",
"drupal/core": "^11.3 || ^12"
},
"require-dev": {
Expand Down
1 change: 1 addition & 0 deletions release.config.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// release.config.cjs
module.exports = {
branches: ['main'],
tagFormat: '${version}',
repositoryUrl: 'https://github.com/emulsify-ds/emulsify_tools.git',
plugins: [
[
Expand Down
2 changes: 1 addition & 1 deletion src/Drush/Commands/SubThemeCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ private function customizeStarterRecipe(string $name, string $machineName, strin
* The finder.
*/
private function getDirectDescendants(string $dir): Finder {
return new Finder()
return (new Finder())
->in($dir)
->depth('== 0');
}
Expand Down
8 changes: 4 additions & 4 deletions src/SubThemeGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private function removeStarterkitOnlyFiles(string $directory, string $originalMa
* The original machine name.
*/
private function discoverOriginalMachineName(string $directory): string {
$finder = new Finder()
$finder = (new Finder())
->files()
->depth('== 0')
->in($directory)
Expand Down Expand Up @@ -158,7 +158,7 @@ private function modifyFileContent(string $fileName, array $replacementPairs): v
*/
private function getFileNamesToRename(string $directory, string $originalMachineName): array {
$fileNames = [];
$finder = new Finder()
$finder = (new Finder())
->files()
->in($directory)
->name("*{$originalMachineName}*");
Expand All @@ -183,7 +183,7 @@ private function getFileNamesToRename(string $directory, string $originalMachine
*/
private function getDirectoryNamesToRename(string $directory, string $originalMachineName): array {
$directoryNames = [];
$finder = new Finder()
$finder = (new Finder())
->directories()
->in($directory)
->name("*{$originalMachineName}*");
Expand Down Expand Up @@ -229,7 +229,7 @@ private function getFileContentReplacementPairs(string $machineName, string $nam
*/
private function getFilesToMakeReplacements(string $directory): array {
$fileNames = [];
$finder = new Finder()
$finder = (new Finder())
->files()
->in($directory);

Expand Down
Loading