laminas / laminas-component-installer

Composer plugin for injecting modules and configuration providers into application configuration
https://docs.laminas.dev/laminas-component-installer/
BSD 3-Clause "New" or "Revised" License
27 stars 12 forks source link

`Undefined array key 2` during component installation #73

Open boesing opened 11 months ago

boesing commented 11 months ago

Bug Report

Q A
Version(s) 3.3.0

Summary

When installing all my dependencies, I get Undefined array key 2 after selecting [2] config/config.php

Current behavior

Undefined array key 2

How to reproduce

Can reproduce this locally, but it happens when having a mezzio project with laminas-cache and laminas-cache-storage-adapter-redis.


  Please select which config file you wish to inject 'Laminas\Cache\Storage\Adapter\Redis\ConfigProvider' into:
  [0] Do not inject
  [1] config/development.config.php.dist
  [2] config/config.php
  Make your selection (default is 1):2

  Remember this option for other packages of the same type? (Y/n)
    Installing Laminas\Cache\Storage\Adapter\Redis\ConfigProvider from package laminas/laminas-cache-storage-adapter-redis

  Please select which config file you wish to inject 'Laminas\Cache\Storage\Adapter\Redis' into:
  [0] Do not inject
  [1] config/development.config.php.dist
  [2] config/config.php
  Make your selection (default is 1):2

  Remember this option for other packages of the same type? (Y/n)Y
    Installing Laminas\Cache\Storage\Adapter\Redis from package laminas/laminas-cache-storage-adapter-redis

In AbstractInjector.php line 189:

  Undefined array key 2  

I am using composer v2.6.3

Expected behavior

No error occurs.

boesing commented 11 months ago

This most probably relates to #68 Nah, have the same issue with 3.2 and 3.1 and 3.0, so its not related...