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

Update system requirements helper script overhauled to make it easier to use, read and update. Updated requirements for Magento 2.4. #1242

Merged
292 changes: 230 additions & 62 deletions compose/bin/check-dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -7,72 +7,240 @@ YELLOW='\033[0;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color

# Declare arrays for storing common dependencies and Magento versions
declare -a common_dependencies
declare -a magento_versions=("2.4.2-p2" "2.4.3-p3" "2.4.4" "2.4.4-p1" "2.4.4-p2" "2.4.4-p3" "2.4.4-p4" "2.4.4-p5" "2.4.4-p6" "2.4.4-p7" "2.4.4-p8" "2.4.4-p9" "2.4.5" "2.4.5-p1" "2.4.5-p2" "2.4.5-p3" "2.4.5-p4" "2.4.5-p5" "2.4.5-p6" "2.4.5-p7" "2.4.5-p8" "2.4.6" "2.4.6-p1" "2.4.6-p2" "2.4.6-p3" "2.4.6-p4" "2.4.6-p5" "2.4.6-p6" "2.4.7" "2.4.7-p1")
# Function to display the script header
show_header() {
echo -e "${GREEN}============================================${NC}"
echo -e "${GREEN} Magento 2 System Requirements Checker${NC}"
echo -e "${GREEN}============================================${NC}"
echo
}

# Assign common dependencies to corresponding Magento versions
common_dependencies[0]="Composer:1 Elasticsearch:7.9 OpenSearch:-- MariaDB:10.4 MySQL:8.0 PHP:7.4 RabbitMQ:3.8 Redis:6.0 Varnish:6.4 Apache:2.4 nginx:1.18 'AWS-Aurora-(MySQL)':-- 'AWS-S3':✔️ 'AWS-MQ':-- 'AWS-ElastiCache':-- 'AWS-Elasticsearch':-- 'AWS-OpenSearch':--"
common_dependencies[1]="Composer:1 Elasticsearch:7.16 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:7.4 RabbitMQ:3.8 Redis:6.0 Varnish:6.5 Apache:2.4 nginx:1.18 'AWS-Aurora-(MySQL)':5.7 'AWS-S3':✔️ 'AWS-MQ':3.8.11 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':7.9 'AWS-OpenSearch':--"
common_dependencies[2]="Composer:2.1 Elasticsearch:7.16 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:6.2 Varnish:7.0 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':5.7 'AWS-S3':✔️ 'AWS-MQ':3.8.11 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':7.9 'AWS-OpenSearch':--"
common_dependencies[3]="Composer:2.1 Elasticsearch:7.16 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:6.2 Varnish:7.0 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':5.7 'AWS-S3':✔️ 'AWS-MQ':3.8.11 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':7.9 'AWS-OpenSearch':--"
common_dependencies[4]="Composer:2.1 Elasticsearch:7.16 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:6.2 Varnish:7.0 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':5.7 'AWS-S3':✔️ 'AWS-MQ':3.8.11 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':7.9 'AWS-OpenSearch':--"
common_dependencies[5]="Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:6.2 Varnish:7.1 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
common_dependencies[6]="Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:6.2 Varnish:7.3 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
common_dependencies[7]="Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:6.2 Varnish:7.3 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
common_dependencies[8]="Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:6.2 Varnish:7.3 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
common_dependencies[9]="Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:6.2 Varnish:7.3 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
common_dependencies[10]="Composer:2.2 Elasticsearch:7.17 OpenSearch:1.3 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:7.0 Varnish:7.5 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
common_dependencies[11]="Composer:2.2 Elasticsearch:7.17 OpenSearch:1.3 MariaDB:10.5,10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:7.0 Varnish:7.5 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
common_dependencies[12]="Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:6.2 Varnish:7.0 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':7.9 'AWS-OpenSearch':1.2"
common_dependencies[13]="Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:6.2 Varnish:7.0 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':7.9 'AWS-OpenSearch':1.2"
common_dependencies[14]="Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.9 Redis:6.2 Varnish:7.1 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
common_dependencies[15]="Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.11,3.9 Redis:6.2 Varnish:7.3 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
common_dependencies[16]="Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.11,3.9 Redis:6.2 Varnish:7.3 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
common_dependencies[17]="Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.11,3.9 Redis:6.2 Varnish:7.3 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
common_dependencies[18]="Composer:2.2 Elasticsearch:7.17 OpenSearch:1.2 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.11,3.9 Redis:6.2 Varnish:7.3 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
common_dependencies[19]="Composer:2.2 Elasticsearch:7.17 OpenSearch:1.3 MariaDB:10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.12,3.11,3.9 Redis:7.0 Varnish:7.5 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
common_dependencies[20]="Composer:2.2 Elasticsearch:7.17 OpenSearch:1.3 MariaDB:10.5,10.4 MySQL:8.0 PHP:8.1 RabbitMQ:3.12,3.11 Redis:7.0 Varnish:7.5 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.13 'AWS-ElastiCache':Redis6 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
common_dependencies[21]="Composer:2.2 Elasticsearch:8.4,7.17 OpenSearch:2.5 MariaDB:10.6 MySQL:8.0 PHP:8.2,8.1 RabbitMQ:3.11,3.9 Redis:7.0 Varnish:7.1 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.16 'AWS-ElastiCache':Redis6.2 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
common_dependencies[22]="Composer:2.2 Elasticsearch:8.5,7.17 OpenSearch:2.5 MariaDB:10.6 MySQL:8.0 PHP:8.2,8.1 RabbitMQ:3.11,3.9 Redis:7.0 Varnish:7.3 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.16 'AWS-ElastiCache':Redis6.2 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
common_dependencies[23]="Composer:2.2 Elasticsearch:8.5,7.17 OpenSearch:2.5 MariaDB:10.6 MySQL:8.0 PHP:8.2,8.1 RabbitMQ:3.11,3.9 Redis:7.0 Varnish:7.3 Apache:2.4 nginx:1.22 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.16 'AWS-ElastiCache':Redis6.2 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
common_dependencies[24]="Composer:2.2 Elasticsearch:8.5,7.17 OpenSearch:2.5 MariaDB:10.6 MySQL:8.0 PHP:8.2,8.1 RabbitMQ:3.11,3.9 Redis:7.0 Varnish:7.3 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.16 'AWS-ElastiCache':Redis6.2 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
common_dependencies[25]="Composer:2.2 Elasticsearch:8.11,7.17 OpenSearch:2.5 MariaDB:10.6 MySQL:8.0 PHP:8.2,8.1 RabbitMQ:3.11,3.9 Redis:7.0 Varnish:7.3 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.16 'AWS-ElastiCache':Redis6.2 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
common_dependencies[26]="Composer:2.2 Elasticsearch:8.11,7.17 OpenSearch:2.12 MariaDB:10.6 MySQL:8.0 PHP:8.2,8.1 RabbitMQ:3.12,3.11,3.9 Redis:7.0 Varnish:7.5 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.16 'AWS-ElastiCache':Redis6.2 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
common_dependencies[27]="Composer:2.2 Elasticsearch:8.11,7.17 OpenSearch:2.12 MariaDB:10.6 MySQL:8.0 PHP:8.2,8.1 RabbitMQ:3.12 Redis:7.0 Varnish:7.5 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.9.16 'AWS-ElastiCache':Redis6.2 'AWS-Elasticsearch':-- 'AWS-OpenSearch':1.2"
common_dependencies[28]="Composer:2.7 Elasticsearch:8.11 OpenSearch:2.12 MariaDB:10.6 MySQL:8.0 PHP:8.3,8.2 RabbitMQ:3.13 Redis:7.2 Varnish:7.5 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.11.20 'AWS-ElastiCache':Redis7.0 'AWS-Elasticsearch':-- 'AWS-OpenSearch':2.11"
common_dependencies[29]="Composer:2.7 Elasticsearch:8.11 OpenSearch:2.12 MariaDB:10.6 MySQL:8.0 PHP:8.3,8.2 RabbitMQ:3.13 Redis:7.2 Varnish:7.5 Apache:2.4 nginx:1.24 'AWS-Aurora-(MySQL)':8.0 'AWS-S3':✔️ 'AWS-MQ':3.11.20 'AWS-ElastiCache':Redis7.0 'AWS-Elasticsearch':-- 'AWS-OpenSearch':2.11"
# Function to display version groups
show_version_groups() {
echo -e "${BLUE}Available Magento version groups:${NC}"
echo "1) 2.4.7.x (2.4.7, 2.4.7-p1, 2.4.7-p2, 2.4.7-p3)"
echo "2) 2.4.6.x (2.4.6 through 2.4.6-p8)"
echo "3) 2.4.5.x (2.4.5 through 2.4.5-p10)"
echo "4) 2.4.4.x (2.4.4 through 2.4.4-p11)"
echo "5) 2.4.3.x (2.4.3-p3)"
echo "6) 2.4.2.x (2.4.2-p2)"
echo
}

# Function to print available Magento versions
print_magento_versions() {
echo "Available Magento 2 versions:"
for version in "${magento_versions[@]}"; do
echo "$version"
done
# Function to display requirements for a specific version group
show_requirements() {
local version_group=$1
echo -e "${GREEN}System Requirements for Magento ${version_group}:${NC}"
echo -e "${YELLOW}Required Components:${NC}"

case $version_group in
"2.4.7.x")
echo "• PHP: 8.3, 8.2"
echo "• Composer: 2.7"
echo "• Database:"
echo " - MySQL: 8.0"
echo " - MariaDB: 10.6"
echo "• Search: "
echo " - Elasticsearch: 8.11"
echo " - OpenSearch: 2.12"
echo "• Cache/Session:"
echo " - Redis: 7.2"
echo "• Message Queue:"
echo " - RabbitMQ: 3.13"
echo "• Web Server:"
echo " - Apache: 2.4"
echo " - Nginx: 1.24"
echo "• Varnish: 7.5"
echo -e "${BLUE}Supported AWS Services:${NC}"
echo "• Aurora (MySQL): 8.0"
echo "• S3: ✔️"
echo "• MQ: 3.11.20"
echo "• ElastiCache: Redis7.0"
echo "• OpenSearch: 2.11"
;;
"2.4.6.x")
echo "• PHP: 8.2, 8.1"
echo "• Composer: 2.2"
echo "• Database:"
echo " - MySQL: 8.0"
echo " - MariaDB: 10.6"
echo "• Search: "
echo " - Elasticsearch: 8.11, 7.17"
echo " - OpenSearch: 2.12"
echo "• Cache/Session:"
echo " - Redis: 7.0"
echo "• Message Queue:"
echo " - RabbitMQ: 3.13"
echo "• Web Server:"
echo " - Apache: 2.4"
echo " - Nginx: 1.24"
echo "• Varnish: 7.5"
echo -e "${BLUE}Supported AWS Services:${NC}"
echo "• Aurora (MySQL): 8.0"
echo "• S3: ✔️"
echo "• MQ: 3.9.16"
echo "• ElastiCache: Redis6.2"
echo "• OpenSearch: 1.2"
;;
"2.4.5.x")
echo "• PHP: 8.1"
echo "• Composer: 2.2"
echo "• Database:"
echo " - MySQL: 8.0"
echo " - MariaDB: 10.4"
echo "• Search: "
echo " - Elasticsearch: 7.17"
echo " - OpenSearch: 1.2"
echo "• Cache/Session:"
echo " - Redis: 6.2"
echo "• Message Queue:"
echo " - RabbitMQ: 3.11, 3.9"
echo "• Web Server:"
echo " - Apache: 2.4"
echo " - Nginx: 1.24"
echo "• Varnish: 7.3"
echo -e "${BLUE}Supported AWS Services:${NC}"
echo "• Aurora (MySQL): 8.0"
echo "• S3: ✔️"
echo "• MQ: 3.9.13"
echo "• ElastiCache: Redis6"
echo "• OpenSearch: 1.2"
;;
"2.4.4.x")
echo "• PHP: 8.1"
echo "• Composer: 2.2"
echo "• Database:"
echo " - MySQL: 8.0"
echo " - MariaDB: 10.4"
echo "• Search: "
echo " - Elasticsearch: 7.17"
echo " - OpenSearch: 1.2"
echo "• Cache/Session:"
echo " - Redis: 6.2"
echo "• Message Queue:"
echo " - RabbitMQ: 3.9"
echo "• Web Server:"
echo " - Apache: 2.4"
echo " - Nginx: 1.24"
echo "• Varnish: 7.3"
echo -e "${YELLOW}NOTE: Supports MySQL 8.0.0 through 8.0.28 only${NC}"
echo -e "${BLUE}Supported AWS Services:${NC}"
echo "• Aurora (MySQL): 8.0"
echo "• S3: ✔️"
echo "• MQ: 3.9.13"
echo "• ElastiCache: Redis6"
echo "• OpenSearch: 1.2"
;;
"2.4.3.x")
echo "• PHP: 7.4"
echo "• Composer: 1"
echo "• Database:"
echo " - MySQL: 8.0"
echo " - MariaDB: 10.4"
echo "• Search: "
echo " - Elasticsearch: 7.16"
echo " - OpenSearch: 1.2"
echo "• Cache/Session:"
echo " - Redis: 6.0"
echo "• Message Queue:"
echo " - RabbitMQ: 3.8"
echo "• Web Server:"
echo " - Apache: 2.4"
echo " - Nginx: 1.18"
echo "• Varnish: 6.5"
echo -e "${BLUE}Supported AWS Services:${NC}"
echo "• Aurora (MySQL): 5.7"
echo "• S3: ✔️"
echo "• MQ: 3.8.11"
echo "• ElastiCache: Redis6"
echo "• Elasticsearch: 7.9"
;;
"2.4.2.x")
echo "• PHP: 7.4"
echo "• Composer: 1"
echo "• Database:"
echo " - MySQL: 8.0"
echo " - MariaDB: 10.4"
echo "• Search: "
echo " - Elasticsearch: 7.9"
echo "• Cache/Session:"
echo " - Redis: 6.0"
echo "• Message Queue:"
echo " - RabbitMQ: 3.8"
echo "• Web Server:"
echo " - Apache: 2.4"
echo " - Nginx: 1.18"
echo "• Varnish: 6.4"
echo -e "${BLUE}Supported AWS Services:${NC}"
echo "• S3: ✔️"
echo "• Elasticsearch: 7.9"
;;
*)
echo -e "${RED}Version group not found${NC}"
;;
esac
}

# Function to print dependencies for a given Magento version
print_dependencies() {
local version=$1
local index
for (( index=0; index<${#magento_versions[@]}; index++ )); do
if [[ "${magento_versions[$index]}" == "$version" ]]; then
echo -e "${GREEN}Recommended software dependencies:${NC}"
local dependencies=${common_dependencies[$index]}
IFS=' ' read -ra deps <<< "$dependencies"
for dep in "${deps[@]}"; do
echo " • $dep"
done
return
fi
done
# If the provided Magento version is not recognized, prompt the user to choose a valid version
echo -e "${RED}Magento version not recognized. Please choose a valid version from the list below:${NC}"
print_magento_versions
echo -e "${BLUE}Additional info about system requirements of Magento in the DevDocs at ${YELLOW}https://experienceleague.adobe.com/en/docs/commerce-operations/installation-guide/system-requirements"
# Function to show additional information
show_additional_info() {
echo -e "${BLUE}Additional Information:${NC}"
echo "• Full system requirements documentation: https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/system-requirements.html"
echo "• Magento DevDocs: https://developer.adobe.com/commerce/docs/"
echo "• Security Best Practices: https://experienceleague.adobe.com/docs/commerce-operations/implementation-playbook/best-practices/security/overview.html"
}

# Prompt the user to enter a Magento version and print its dependencies
read -r -p "Enter the Magento 2 version you'd like to check dependencies on: " magento_version
# Main script execution
clear
show_header

print_dependencies "$magento_version"
while true; do
show_version_groups
echo -e "${YELLOW}Options:${NC}"
echo "1-6) Select version group"
echo "i) Additional Information"
echo "q) Quit"
echo
read -r -p "Enter your choice: " choice

case $choice in
q|Q)
echo -e "${GREEN}Thank you for using the Magento System Requirements Checker!${NC}"
exit 0
;;
i|I)
clear
show_additional_info
;;
1)
clear
show_requirements "2.4.7.x"
;;
2)
clear
show_requirements "2.4.6.x"
;;
3)
clear
show_requirements "2.4.5.x"
;;
4)
clear
show_requirements "2.4.4.x"
;;
5)
clear
show_requirements "2.4.3.x"
;;
6)
clear
show_requirements "2.4.2.x"
;;
*)
echo -e "${RED}Invalid choice. Please try again.${NC}"
;;
esac

echo
read -r -p "Press Enter to continue..."
clear
done