Skip to content
Snippets Groups Projects
Select Git revision
  • 8637ff16d63f028b9ac5ef73b625dba7a2bf38ea
  • main default protected
  • step-01354-5.5
  • biest-504
  • issue-3215
  • step-03209-bald-rapunzel
  • tic-3123
  • tic-2720-remove-less-compilation-in-plugins
  • step-1800
  • tic-2532
  • biest-561
  • tic-3225
  • 5.3
  • 5.4
  • step-2472
  • step-2660
  • step-1559
  • tic-3094
  • biest-3206
  • biest-3207
  • 5.0
  • v5.3.1
  • v5.2.3
  • v5.1.4
  • v5.0.6
  • v5.3
  • v5.2.2
  • v5.1.3
  • v5.0.5
  • v5.2.1
  • v5.1.2
  • v5.0.4
  • v5.2
  • v5.1.1
  • v5.0.3
  • v5.1
  • v5.0.2
  • v5.0.1
  • v5.0
39 results

LinkButton.class.php

Blame
  • Forked from Stud.IP / Stud.IP
    Source project has a limited visibility.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    SupportedPHPVersions.php 832 B
    <?php
    namespace Studip\Dockerized;
    
    final class SupportedPHPVersions
    {
        private const CONFIGURATION = [
            '7.2' => [8072, 8872],
            '7.3' => [8073, 8873],
            '7.4' => [8074, 8874],
            '8.0' => [8080, 8880],
            '8.1' => [8081, 8881],
            '8.2' => [8082, 8882],
            '8.3' => [8083, 8883],
        ];
    
        private const DEFAULT = ['7.4', '8.1', '8.3'];
    
        public static function getVersions(): array
        {
            return array_keys(self::CONFIGURATION);
        }
    
        public static function getDefaultVersions(): array
        {
            return self::DEFAULT;
        }
    
        public static function mapPort(string $version): int
        {
            if (!isset(self::CONFIGURATION[$version])) {
                throw new \Exception('Unsupported php version');
            }
            return self::CONFIGURATION[$version];
        }
    }