can't install comerce/kickstart using composer

Created on 9 May 2025, 30 days ago
Updated 10 May 2025, 29 days ago

can't install comerce/kickstart profile using composer

this issue happened to me on windows and Fedora but i will post only the fedora version cause i tought windows had that problem cause it doesn't have tools like Linux tried cygwin but in vain so:

1-Fresh Fedora install

2-dnf update -y

then reboot OS

3-dnf install httpd mariadb-server -y

4- systemctl start httpd mariadb

5-systemctl enable httpd mariadb

6-dnf install php php-fpm php-mysqlnd php-opcache php-gd php-xml php-mbstring php-curl php-pecl-imagick php-pecl-zip libzip

7-changed the following lines in php.ini to:

max_execution_time = 300 
max_input_time = 300 
memory_limit = 512M 
post_max_size = 256M 
upload_max_filesize = 256M

8- systemctl start php-fpm

9-systemctl enable php-fpm

10-installed composer via these commands

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'.PHP_EOL; } else { echo 'Installer corrupt'.PHP_EOL; unlink('composer-setup.php'); exit(1); }"
php composer-setup.php --install-dir=/bin --filename=composer

10- disabled SElinux as it disturbs me alot

11-installed Drupal cms via

composer create-project drupal/cms
all is fine then i proceed to install drupal via browser(firefox)
when i see things are good i tried installing comerce kickstart

12- composer create-project centarro/commerce-kickstart-project kickstart

13- first problem was script complained about bcmath module" bcmath not found/loaded" i just dnf installed it and rebooted altogether

14- tried to re-run composer for kickstart everything was going fine until scripts halted again and threw this error that i can't fix, tried searching drupal stackexchange or this forum even tried few AI tools all of wich suggest that the link isn't working but when i navigate to that link from browser i see th patch fill

  - Installing vlucas/phpdotenv (v5.6.2): Extracting archive
  - Installing webmozart/path-util (2.3.0): Extracting archive
  - Applying patches for drupal/admin_toolbar
    https://git.drupalcode.org/project/admin_toolbar/-/merge_requests/117.diff (Issue #3506824 by dydave: Fixed compatibility with Project Browser)
   Could not apply patch! Skipping. The error was: Cannot apply patch https://git.drupalcode.org/project/admin_toolbar/-/merge_requests/117.diff

In Patches.php line 331:                                                                            
  Cannot apply patch Issue #3506824 by dydave: Fixed compatibility with Project Browser (https://git.drupalcode.org/project/admin_toolbar/-/merge_r  
  equests/117.diff)!                                                                                                         
🐛 Bug report
Status

Active

Version

5.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • problem recurred again, not sure why or how. after tinkering with kickstart i tried reinstalling it after deleting the kickstart folder, i got same error in original post, can't apply patch

    <pre>  - Installing <font color="#26A269">graham-campbell/result-type</font> (<font color="#A2734C">v1.1.3</font>): Extracting archive
      - Installing <font color="#26A269">vlucas/phpdotenv</font> (<font color="#A2734C">v5.6.2</font>): Extracting archive
      - Installing <font color="#26A269">webmozart/path-util</font> (<font color="#A2734C">2.3.0</font>): Extracting archive
      - Applying patches for <font color="#26A269">drupal/admin_toolbar</font>
        <font color="#26A269">https://git.drupalcode.org/project/admin_toolbar/-/merge_requests/117.diff</font> (<font color="#A2734C">Issue #3506824 by dydave: Fixed compatibility with Project Browser</font>)
       <span style="background-color:#C01C28"><font color="#CFCFCF">Could not apply patch! Skipping. The error was: Cannot apply patch https://git.drupalcode.org/project/admin_toolbar/-/merge_requests/117.diff</font></span>
    
    <font color="#A2734C">In Patches.php line 331:</font>
    <span style="background-color:#C01C28"><font color="#CFCFCF">                                                                                                                                                     </font></span>
    <span style="background-color:#C01C28"><font color="#CFCFCF">  Cannot apply patch Issue #3506824 by dydave: Fixed compatibility with Project Browser (https://git.drupalcode.org/project/admin_toolbar/-/merge_r  </font></span>
    <span style="background-color:#C01C28"><font color="#CFCFCF">  equests/117.diff)!                                                                                                                                 </font></span>
    <span style="background-color:#C01C28"><font color="#CFCFCF">                                                                                                                                                     </font></span>
    
    </pre>
  • I am having this same issue (Debian 11, PHP 8.3):

    - Applying patches for drupal/admin_toolbar
        https://git.drupalcode.org/project/admin_toolbar/-/merge_requests/117.diff (Issue #3506824 by dydave: Fixed compatibility with Project Browser)
       Could not apply patch! Skipping. The error was: Cannot apply patch https://git.drupalcode.org/project/admin_toolbar/-/merge_requests/117.diff
    
    In Patches.php line 331:
    
      Cannot apply patch Issue #3506824 by dydave: Fixed compatibility with Project Browser (https://git.drupalcode.org/project/admin_toolbar/-/merge_requests/117.diff)!
    
  • @dribgnikcom, did you try to install the patch package??
    for debian sudo apt install patch

  • @noored

    patch is already the newest version (2.7.6-7).
    
  • I can bypass this error by setting the following in composer.json:

    "composer-exit-on-patch-failure": true,
    

    from 'true' to 'false'.

    But there is definitely some issue with that patch that is preventing Composer from completing the install.

  • 🇩🇰Denmark petaberg

    @dribgnikcom - admin_toolbar 3.6.0 which has been installed contains the mentioned patch. Until fixed, run a --no-install...
    composer create-project --no-install centarro/commerce-kickstart-project * MyNewProjectFolder*
    cd * MyNewProjectFolder*

    edit composer.json
    remove in "ekstra" section":

    "patches": {
                "drupal/admin_toolbar": {
                    "Issue #3506824 by dydave: Fixed compatibility with Project Browser": "https://git.drupalcode.org/project/admin_toolbar/-/merge_requests/117.diff"
                }
            },

    Then run: composer install

Production build 0.71.5 2024