Description
Ever since upgrading to the latest version of Docksal, all my new projects are defaulting to composer 2. Most everything I work on has composer 1 as a requirement still.
Setting your composer version back to version 1, using the instructions laid out in the (documentation on setting your composer to version 1)[https://docs.docksal.io/service/cli/settings/#composer]. doesn't work for me.
A workaround I've discovered: you can also set your php version as well, it will then sometimes revert the composer 1. Operative word: sometimes.
Note: is it possible to set the default to composer 1? I added the composer 1 setting the global dockals.env file, located ~/.docksal
Steps to reproduce the issue:
fin updatefin composer --versionComposer version 2.0.6 2020-11-07 11:21:17fin config set COMPOSER_DEFAULT_VERSION=1fin project reset clifin composer --versionComposer version 2.0.6 2020-11-07 11:21:17Describe the results you received:
Results...
Composer 2
Describe the results you expected:
Expected behavior...
Composer 1
Output of fin config:
fin config output
---------------------
COMPOSE_PROJECT_NAME_SAFE: d8
COMPOSE_FILE:
/Users/me/.docksal/stacks/volumes-nfs.yml
/Users/me/.docksal/stacks/stack-default.yml
/Users/me/Projects/d8/.docksal/docksal.yml
ENV_FILE:
/Users/me/Projects/d8/.docksal/docksal.env
PROJECT_ROOT: /Users/me/Projects/d8
DOCROOT: docroot
VIRTUAL_HOST: d8.docksal
VIRTUAL_HOST_ALIASES: *.d8.docksal
IP: 192.168.64.100
MYSQL: 192.168.64.100:32769
Docker Compose configuration
---------------------
services:
cli:
dns:
- 192.168.64.100
- 8.8.8.8
environment:
BLACKFIRE_CLIENT_ID: null
BLACKFIRE_CLIENT_TOKEN: null
COMPOSER_ALLOW_XDEBUG: '0'
COMPOSER_DISABLE_XDEBUG_WARN: '0'
DOCROOT: docroot
DRUSH_ALLOW_XDEBUG: '0'
DRUSH_OPTIONS_URI: d8.docksal
GIT_USER_EMAIL:
GIT_USER_NAME:
HOST_GID: '20'
HOST_UID: '502'
MYSQL_DATABASE: default
MYSQL_HOST: db
MYSQL_PASSWORD: user
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: user
PHP_IDE_CONFIG: null
SECRET_ACAPI_EMAIL: null
SECRET_ACAPI_KEY: null
SECRET_ACQUIACLI_KEY: null
SECRET_ACQUIACLI_SECRET: null
SECRET_PLATFORMSH_CLI_TOKEN: null
SECRET_SSH_PRIVATE_KEY: null
SECRET_TERMINUS_TOKEN: null
SSH_AUTH_SOCK: /.ssh-agent/proxy-socket
VIRTUAL_HOST: d8.docksal
XDEBUG_CONFIG: remote_connect_back=0 remote_host=192.168.64.1
XDEBUG_ENABLED: '0'
hostname: cli
image: docksal/cli:2.12-php7.4
labels:
io.docksal.shell: bash
io.docksal.user: docker
logging:
options:
max-file: '10'
max-size: 1m
volumes:
- docksal_ssh_agent:/.ssh-agent:ro
- cli_home:/home/docker:rw
- /tmp/.docksal/d8:/tmp/.docksal/d8:ro
- project_root:/var/www:rw,nocopy,cached
db:
dns:
- 192.168.64.100
- 8.8.8.8
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: null
MYSQL_DATABASE: default
MYSQL_INITDB_SKIP_TZINFO: null
MYSQL_ONETIME_PASSWORD: null
MYSQL_PASSWORD: user
MYSQL_RANDOM_ROOT_PASSWORD: null
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: user
hostname: db
image: docksal/mysql:5.6-1.5
logging:
options:
max-file: '10'
max-size: 1m
ports:
- published: 0
target: 3306
volumes:
- db_data:/var/lib/mysql:rw
- project_root:/var/www:ro,nocopy,cached
web:
depends_on:
cli:
condition: service_started
dns:
- 192.168.64.100
- 8.8.8.8
environment:
APACHE_BASIC_AUTH_PASS: null
APACHE_BASIC_AUTH_USER: null
APACHE_DOCUMENTROOT: /var/www/docroot
APACHE_FCGI_HOST_PORT: cli:9000
hostname: web
image: docksal/apache:2.4-2.3
labels:
io.docksal.cert-name: none
io.docksal.permanent: "false"
io.docksal.project-root: /Users/me/Projects/d8
io.docksal.virtual-host: d8.docksal,*.d8.docksal,d8.docksal.*
logging:
options:
max-file: '10'
max-size: 1m
volumes:
- project_root:/var/www:ro,nocopy,cached
version: '2.1'
volumes:
cli_home: {}
db_data: {}
docksal_ssh_agent:
external: true
name: docksal_ssh_agent
project_root:
driver: local
driver_opts:
device: :/Users/me/Projects/d8
o: addr=192.168.64.1,vers=3,nolock,noacl,nocto,noatime,nodiratime,actimeo=1
type: nfs
---------------------
Output of fin sysinfo:
fin sysinfo output
COMPOSE_PROJECT_NAME_SAFE: d8
COMPOSE_FILE:
/Users/me/.docksal/stacks/volumes-nfs.yml
/Users/me/.docksal/stacks/stack-default.yml
/Users/me/Projects/d8/.docksal/docksal.yml
ENV_FILE:
/Users/me/Projects/d8/.docksal/docksal.env
PROJECT_ROOT: /Users/me/Projects/d8
DOCROOT: docroot
VIRTUAL_HOST: d8.docksal
VIRTUAL_HOST_ALIASES: *.d8.docksal
IP: 192.168.64.100
MYSQL: 192.168.64.100:32769
services:
cli:
dns:
- 192.168.64.100
- 8.8.8.8
environment:
BLACKFIRE_CLIENT_ID: null
BLACKFIRE_CLIENT_TOKEN: null
COMPOSER_ALLOW_XDEBUG: '0'
COMPOSER_DISABLE_XDEBUG_WARN: '0'
DOCROOT: docroot
DRUSH_ALLOW_XDEBUG: '0'
DRUSH_OPTIONS_URI: d8.docksal
GIT_USER_EMAIL:
GIT_USER_NAME:
HOST_GID: '20'
HOST_UID: '502'
MYSQL_DATABASE: default
MYSQL_HOST: db
MYSQL_PASSWORD: user
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: user
PHP_IDE_CONFIG: null
SECRET_ACAPI_EMAIL: null
SECRET_ACAPI_KEY: null
SECRET_ACQUIACLI_KEY: null
SECRET_ACQUIACLI_SECRET: null
SECRET_PLATFORMSH_CLI_TOKEN: null
SECRET_SSH_PRIVATE_KEY: null
SECRET_TERMINUS_TOKEN: null
SSH_AUTH_SOCK: /.ssh-agent/proxy-socket
VIRTUAL_HOST: d8.docksal
XDEBUG_CONFIG: remote_connect_back=0 remote_host=192.168.64.1
XDEBUG_ENABLED: '0'
hostname: cli
image: docksal/cli:2.12-php7.4
labels:
io.docksal.shell: bash
io.docksal.user: docker
logging:
options:
max-file: '10'
max-size: 1m
volumes:
- docksal_ssh_agent:/.ssh-agent:ro
- cli_home:/home/docker:rw
- /tmp/.docksal/d8:/tmp/.docksal/d8:ro
- project_root:/var/www:rw,nocopy,cached
db:
dns:
- 192.168.64.100
- 8.8.8.8
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: null
MYSQL_DATABASE: default
MYSQL_INITDB_SKIP_TZINFO: null
MYSQL_ONETIME_PASSWORD: null
MYSQL_PASSWORD: user
MYSQL_RANDOM_ROOT_PASSWORD: null
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: user
hostname: db
image: docksal/mysql:5.6-1.5
logging:
options:
max-file: '10'
max-size: 1m
ports:
- published: 0
target: 3306
volumes:
- db_data:/var/lib/mysql:rw
- project_root:/var/www:ro,nocopy,cached
web:
depends_on:
cli:
condition: service_started
dns:
- 192.168.64.100
- 8.8.8.8
environment:
APACHE_BASIC_AUTH_PASS: null
APACHE_BASIC_AUTH_USER: null
APACHE_DOCUMENTROOT: /var/www/docroot
APACHE_FCGI_HOST_PORT: cli:9000
hostname: web
image: docksal/apache:2.4-2.3
labels:
io.docksal.cert-name: none
io.docksal.permanent: "false"
io.docksal.project-root: /Users/me/Projects/d8
io.docksal.virtual-host: d8.docksal,.d8.docksal,d8.docksal.
logging:
options:
max-file: '10'
max-size: 1m
volumes:
- project_root:/var/www:ro,nocopy,cached
version: '2.1'
volumes:
cli_home: {}
db_data: {}
docksal_ssh_agent:
external: true
name: docksal_ssh_agent
project_root:
driver: local
driver_opts:
device: :/Users/me/Projects/d8
o: addr=192.168.64.1,vers=3,nolock,noacl,nocto,noatime,nodiratime,actimeo=1
type: nfs
```
Hi @mdyoung3 we are just waiting for this PR to get finished up and reviewed and it will be added as a standard.
For the time being what you could do is in your projects .docksal/docksal.yml
If you add the following:
services:
cli:
environment:
- COMPOSER_DEFAULT_VERSION
Run fin restart cli it should work.
@sean-e-dietrich Thanks for the tip. I'll give it a shot the next time I update (I rolled back to v1.14.1).
Most helpful comment
Hi @mdyoung3 we are just waiting for this PR to get finished up and reviewed and it will be added as a standard.
For the time being what you could do is in your projects
.docksal/docksal.ymlIf you add the following:
Run
fin restart cliit should work.