@@ -11,37 +11,31 @@ drupal_composer() {
11
11
composer --working-dir=" $drupal_dir " --no-interaction " $@ "
12
12
}
13
13
14
- # Create new Drupal 9 project
14
+ # Create new Drupal 10 project
15
15
if [ ! -f " $drupal_dir /composer.json" ]; then
16
- composer --no-interaction create-project drupal/recommended-project:^9 " $drupal_dir "
16
+ composer --no-interaction create-project drupal/recommended-project:^10 " $drupal_dir "
17
17
fi
18
18
# Copy our code into the modules folder
19
-
20
- # Clean up
21
- rm -fr " ${drupal_dir:? } /$module_path "
22
-
19
+ mkdir -p " $drupal_dir /$module_path "
23
20
# https://stackoverflow.com/a/15373763
24
- # rsync --archive --compress . --filter=':- .gitignore' --exclude "$drupal_dir" --exclude .git "$drupal_dir/$module_path"
25
-
26
- # The rsync command in not available in itkdev/php8.1-fpm
27
-
28
- git config --global --add safe.directory /app
29
- # Copy module files into module path
30
- for f in $( git ls-files) ; do
31
- mkdir -p " $drupal_dir /$module_path /$( dirname " $f " ) "
32
- cp " $f " " $drupal_dir /$module_path /$f "
33
- done
21
+ rsync --archive --compress . --filter=' :- .gitignore' --exclude " $drupal_dir " --exclude .git " $drupal_dir /$module_path "
34
22
35
23
drupal_composer config minimum-stability dev
36
24
37
25
# Allow ALL plugins
38
26
# https://getcomposer.org/doc/06-config.md#allow-plugins
39
27
drupal_composer config --no-plugins allow-plugins true
40
28
29
+ # Making Drupal 10 compatible
30
+ drupal_composer require psr/http-message:^1.0
31
+ drupal_composer require mglaman/composer-drupal-lenient
32
+ drupal_composer config --merge --json extra.drupal-lenient.allowed-list ' ["drupal/coc_forms_auto_export", "drupal/webform_node_element"]'
33
+
41
34
drupal_composer require wikimedia/composer-merge-plugin
42
35
drupal_composer config extra.merge-plugin.include " $module_path /composer.json"
43
36
# https://www.drupal.org/project/drupal/issues/3220043#comment-14845434
44
37
drupal_composer require --dev symfony/phpunit-bridge
45
38
39
+
46
40
# Run PHPStan
47
41
(cd " $drupal_dir /$module_path " && ../../../../vendor/bin/phpstan)
0 commit comments