Skip to content

Commit

Permalink
add support of Drupal 10.1, 10.2, 10.3 & 11.0-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
WengerK committed Mar 12, 2024
1 parent f47a4f4 commit 14b8c1f
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 20 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ jobs:

strategy:
matrix:
drupal_version: ['9.5', '10.0']
drupal_version: ['9.5', '10.0', '10.1', '10.2', '10.3', '11.0']
module: ['factory_lollipop']
experimental: [ false ]
include:
- drupal_version: '11.0'
module: 'factory_lollipop'
experimental: true

steps:
- uses: actions/checkout@v4
Expand All @@ -38,9 +42,13 @@ jobs:

strategy:
matrix:
drupal_version: ['9.5', '10.0']
drupal_version: ['9.5', '10.0', '10.1', '10.2', '10.3', '11.0']
module: ['factory_lollipop']
experimental: [ false ]
include:
- drupal_version: '11.0'
module: 'factory_lollipop'
experimental: true

steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/styles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
with:
php-version: '8.1'
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
tools: cs2pr, composer:v1
tools: cs2pr, composer:v2
- uses: actions/checkout@v4
- run: composer install --prefer-dist
- run: ./vendor/bin/phpcs ./ --report=checkstyle | cs2pr
Expand All @@ -25,7 +25,7 @@ jobs:
with:
php-version: '8.1'
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
tools: cs2pr, composer:v1, phpmd
tools: cs2pr, composer:v2, phpmd
- uses: actions/checkout@v4
- run: composer install --prefer-dist
- run: phpmd ./ text ./phpmd.xml --suffixes php,module,inc,install,test,profile,theme,css,info,txt --exclude *Test.php,*vendor/*
Expand All @@ -39,7 +39,7 @@ jobs:
with:
php-version: '8.1'
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
tools: cs2pr, composer:v1, phpcpd
tools: cs2pr, composer:v2, phpcpd
- uses: actions/checkout@v4
- run: composer install --prefer-dist
- run: phpcpd ./src --suffix .php --suffix .module --suffix .inc --suffix .install --suffix .test --suffix .profile --suffix .theme --suffix .css --suffix .info --suffix .txt --exclude *.md --exclude *.info.yml --exclude tests --exclude vendor/
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- add support of Paragraph
- add Drupal Gitlab-CI
- add support of Drupal 10.1, 10.2, 10.3 & 11.0-dev

## [1.2.0] - 2022-12-02
### Removed
Expand Down
24 changes: 12 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,30 @@ on your environment:
* drush
* The latest dev release of Factory Lollipop
* docker
* docker-compose
* docker compose

### Project bootstrap

Once run, you will be able to access to your fresh installed Drupal on `localhost::8888`.

docker-compose build --pull --build-arg BASE_IMAGE_TAG=10.1 drupal
# (get a coffee, this will take some time...)
docker-compose up -d drupal
docker-compose exec -u www-data drupal drush site-install standard --db-url="mysql://drupal:drupal@db/drupal" -y
docker compose up -d drupal
docker compose exec -u www-data drupal drush site-install standard --db-url="mysql://drupal:drupal@db/drupal" -y

# You may be interesed by reseting the admin password of your Docker.
docker-compose exec drupal drush user:password admin admin
docker compose exec drupal drush user:password admin admin

# Enable the module to use it.
docker-compose exec drupal drush en factory_lollipop
docker compose exec drupal drush en factory_lollipop

## 🏆 Tests

We use the [Docker for Drupal Contrib images](https://hub.docker.com/r/wengerk/drupal-for-contrib) to run testing on our project.

Run testing by stopping at first failure using the following command:

docker-compose exec -u www-data drupal phpunit --group=factory_lollipop --no-coverage --stop-on-failure --configuration=/var/www/html/phpunit.xml
docker compose exec -u www-data drupal phpunit --group=factory_lollipop --no-coverage --stop-on-failure --configuration=/var/www/html/phpunit.xml

## 🚔 Check Drupal coding standards & Drupal best practices

Expand All @@ -70,7 +70,7 @@ The following Analyzer will be downloaded & installed as PHAR:

./scripts/hooks/post-commit
# or run command on the container itself
docker-compose exec drupal bash
docker compose exec drupal bash

#### Running Code Sniffer Drupal & DrupalPractice

Expand All @@ -82,13 +82,13 @@ violations.
PHP_CodeSniffer is an essential development tool that ensures your code remains clean and consistent.

```
$ docker-compose exec drupal ./vendor/bin/phpcs ./web/modules/contrib/factory_lollipop/
$ docker compose exec drupal ./vendor/bin/phpcs ./web/modules/contrib/factory_lollipop/
```

Automatically fix coding standards

```
$ docker-compose exec drupal ./vendor/bin/phpcbf ./web/modules/contrib/factory_lollipop/
$ docker compose exec drupal ./vendor/bin/phpcbf ./web/modules/contrib/factory_lollipop/
```

#### Running PHP Mess Detector
Expand All @@ -98,7 +98,7 @@ https://github.com/phpmd/phpmd
Detect overcomplicated expressions & Unused parameters, methods, properties.

```
$ docker-compose exec drupal phpmd ./web/modules/contrib/factory_lollipop/ text ./phpmd.xml \
$ docker compose exec drupal phpmd ./web/modules/contrib/factory_lollipop/ text ./phpmd.xml \
--suffixes php,module,inc,install,test,profile,theme,css,info,txt --exclude *Test.php,*vendor/*
```

Expand All @@ -109,7 +109,7 @@ https://github.com/sebastianbergmann/phpcpd
`phpcpd` is a Copy/Paste Detector (CPD) for PHP code.

```
$ docker-compose exec drupal phpcpd ./web/modules/contrib/factory_lollipop/src --suffix .php --suffix .module --suffix .inc --suffix .install --suffix .test --suffix .profile --suffix .theme --suffix .css --suffix .info --suffix .txt --exclude *.md --exclude *.info.yml --exclude tests --exclude vendor/
$ docker compose exec drupal phpcpd ./web/modules/contrib/factory_lollipop/src --suffix .php --suffix .module --suffix .inc --suffix .install --suffix .test --suffix .profile --suffix .theme --suffix .css --suffix .info --suffix .txt --exclude *.md --exclude *.info.yml --exclude tests --exclude vendor/
```

#### Running PhpDeprecationDetector
Expand All @@ -119,7 +119,7 @@ https://github.com/wapmorgan/PhpDeprecationDetector
A scanner that checks compatibility of your code with PHP interpreter versions.

```
$ docker-compose exec drupal phpdd ./web/modules/contrib/factory_lollipop/ \
$ docker compose exec drupal phpdd ./web/modules/contrib/factory_lollipop/ \
--file-extensions php,module,inc,install,test,profile,theme,info --exclude vendor
```

Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ It may be useful for existing users to check out the [upgrade guide](UPGRADING.m

## Versions

Factory Lollipop is available for both Drupal 9 and Drupal 10!
Factory Lollipop is available for both Drupal 9, Drupal 10 & Drupal 11 (dev) !

### Which version should I use?

Expand All @@ -89,6 +89,7 @@ Factory Lollipop is available for both Drupal 9 and Drupal 10!
| 9.0 | 1.0.0 |
| 9.x | 1.1.x |
| 10.x | 1.2.x |
| 11.x-dev | 1.2.x |

## Roadmap

Expand All @@ -101,10 +102,10 @@ _Everything contained before is in draft form and subject to change. We do not g

## Dependencies

The Drupal 9 version of Factory Lollipop requires nothing !
The Drupal version of Factory Lollipop requires nothing !
Feel free to use it.

Factory Lollipop requires PHP 7.3+ to works properly. We recommend updating to at least PHP 7.4 if possible, which is supported as of Drupal 8.8.3 (release date: March 7, 2018).
Factory Lollipop requires PHP 7.3+ to works properly. We recommend updating to at least PHP 8.1 if possible.

## Similar modules

Expand Down

0 comments on commit 14b8c1f

Please sign in to comment.