Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error on cache:clear while composer install #2358

Open
j4r3kb opened this issue Jan 6, 2022 · 2 comments
Open

error on cache:clear while composer install #2358

j4r3kb opened this issue Jan 6, 2022 · 2 comments

Comments

@j4r3kb
Copy link

j4r3kb commented Jan 6, 2022

composer install

Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 1
!!  
!!   // Clearing the cache for the dev environment with debug                       
!!   // true                                                                        
!!  
!!  
!!  In XmlFileLoader.php line 407:
!!                                                                                 
!!    Unable to parse file "/app/vendor/friendsofsymfony/rest-bundle/DependencyIn  
!!    jection/../Resources/config/view.xml": The XML file "/app/vendor/friendsofs  
!!    ymfony/rest-bundle/DependencyInjection/../Resources/config/view.xml" is not  
!!     valid.                                                                      
!!                                                                                 
!!  
!!  In XmlUtils.php line 148:
!!                                                                                 
!!    The XML file "/app/vendor/friendsofsymfony/rest-bundle/DependencyInjection/  
!!    ../Resources/config/view.xml" is not valid.                                  
!!                                                                                 
!!  
!!  In XmlFileLoader.php line 684:
!!                                                                         
!!    Notice: tempnam(): file created in the system's temporary directory  
!!                                                                         
!!  
!!  cache:clear [--no-warmup] [--no-optional-warmers]
!!  
!!  

same with composer auto-scripts

composer.json used: https://pastebin.com/JtHk3ZiV

strange because calling symfony console cache:clear gives no errors
The only not usual thing I'm using is the composer via docker this way:

#!/bin/sh

docker run --rm --interactive --tty \
    --user "$(id -u)":"$(id -g)" \
    --volume "$(pwd)":/app \
    --volume "${COMPOSER_HOME:-$HOME/.composer}":/tmp \
    --workdir /app \
    --env COMPOSER_HOME=/tmp \
    composer "$@"
@j4r3kb
Copy link
Author

j4r3kb commented Jan 6, 2022

OK it seems the issue is from using the composer's docker image. When using for example composer.phar inside a container with PHP the problem is gone.

@medbak
Copy link

medbak commented Apr 1, 2022

OK it seems the issue is from using the composer's docker image. When using for example composer.phar inside a container with PHP the problem is gone.

I have a similar issue with monolog, I tried as you mentioned to download composer.phar and use it inside the container but the same issue persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants