- Issue created by @freelylw
- ๐ฎ๐ณIndia himanshu raj Noida
I tested installing Drupal 11.2.2 with PHP 8.3 on my local setup using DDEV, and the installation completed without any errors.
The web and vendor folders were created properly.
Could you please confirm if you have tried the installation using PHP 8.3 as well?
Also, are you using DDEV or some other local environment like XAMPP, Docker, etc.?Sharing these details could help us better understand the issue and possibly isolate the cause.
- ๐ฌ๐งUnited Kingdom freelylw
I just tried on Php8.3, exactly the same problem and error message . I am installing on a clean fresh VPS hosting account, no DDEV XAMPP or anything else.
- ๐ฎ๐ณIndia himanshu raj Noida
Thanks for confirming.
Since the issue persists on PHP 8.3 in your VPS environment, it likely relates to your serverโs PHP build, extensions, or configuration.
Please share your exact PHP version output (php -v), enabled extensions (php -m), and OS details. Checking OPcache settings or clearing Composer cache (composer clear-cache) might also help. - First commit to issue fork.
- ๐ช๐ธSpain TornatoreMDM
To provide more information, I received the same error when trying to do a clean install with DDEV on PHP version 8.2.22 and Composer 2.7.7.
Upgrading to PHP version 8.3 and attempting the installation with DDEV again worked correctly. - ๐ฎ๐ณIndia vinaysamant Kudal, Maharashtra
i m trying to install D11 since 11.1. Facing many issues. So i have to install D10.5. I use composer also and direct download also. Both not working for D11.
I am getting following errors -
- Installing composer/installers (v2.3.0): Extracting archive
- Installing drupal/core-composer-scaffold (11.2.2): Extracting archive
- Installing drupal/core-project-message (11.2.2): Extracting archive
- Installing drupal/core-recipe-unpack (11.2.2): Extracting archive
Install of drupal/core-recipe-unpack failedIn Plugin.php line 28:
[ParseError]
syntax error, unexpected identifier "RECIPE_PACKAGE_TYPE", expecting "="Exception trace:
at /var/www/clients/client2/web29/web/drupal11/vendor/drupal/core-recipe-unpack/Plugin.php:28
Composer\Autoload\{closure}() at phar:///usr/local/bin/composer/vendor/composer/ClassLoader.php:427
Composer\Autoload\ClassLoader->loadClass() at n/a:n/a
class_exists() at phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php:293
...Steps to reproduce
I have dedicated server installed at OVH.
It's Debian Bookworm with ISP 3.2 & Apache 2
PHP 8.2.29 & 10.11.11-MariaDB
commad is used : composer create-project drupal/recommended-project:11.2.2 ./Proposed resolution
syntax error, unexpected identifier "RECIPE_PACKAGE_TYPE", expecting "="
this needs to be corrected. - ๐ฌ๐งUnited Kingdom longwave UK
PHP 8.2.29 & 10.11.11-MariaDB
commad is used : composer create-project drupal/recommended-project:11.2.2 ./Drupal 11 requires PHP 8.3: https://www.drupal.org/docs/getting-started/system-requirements/overview... โ
I wonder if there is something we should add to
drupal/recommended-project
or another dependency to prevent Composer from trying to install on an earlier version. - ๐ฌ๐งUnited Kingdom longwave UK
Can reproduce locally:
$ php8.2 /usr/local/bin/composer create-project drupal/recommended-project:11.2.2 Creating a "drupal/recommended-project:11.2.2" project at "./recommended-project" Installing drupal/recommended-project (11.2.2) - Downloading drupal/recommended-project (11.2.2) - Installing drupal/recommended-project (11.2.2): Extracting archive Created project in /tmp/recommended-project Installing dependencies from lock file (including require-dev) Verifying lock file contents can be installed on current platform. Package operations: 64 installs, 0 updates, 0 removals ... - Installing composer/installers (v2.3.0): Extracting archive - Installing drupal/core-composer-scaffold (11.2.2): Extracting archive - Installing drupal/core-project-message (11.2.2): Extracting archive - Installing drupal/core-recipe-unpack (11.2.2): Extracting archive Install of drupal/core-recipe-unpack failed In Plugin.php line 28: [ParseError] syntax error, unexpected identifier "RECIPE_PACKAGE_TYPE", expecting "=" Exception trace: at /tmp/recommended-project/vendor/drupal/core-recipe-unpack/Plugin.php:28
- ๐ฌ๐งUnited Kingdom longwave UK
Let's try to find a way to prevent this by adding a constraint somewhere, so Composer gives a more useful error message.
- ๐ฌ๐งUnited Kingdom longwave UK
Discussed with @catch.
drupal/core
also specifies a minimum PHP version, butcomposer create-project
must ignore this. We discussed adding it to thedrupal/core-recommended
metapackage but probably the most reliable option is to add it to the project template, which is what Symfony and Laravel also do. - ๐ฎ๐ณIndia vinaysamant Kudal, Maharashtra
i m sorry for trying this with php-8.2. i will upgrade php on my server to 8.3 n retry this. But i with if composer or drupal installer can clearly show a message that this will not install on 8.2 .. will be more helpful.