Skip to content
Snippets Groups Projects
Select Git revision
  • c5a175fc0f5fcbc7f7f77cf69c9d8ff5c9adb009
  • main default protected
  • 5.5 protected
  • atlantis
  • 5.3 protected
  • 5.0 protected
  • issue-23
  • issue8-seat-logging-and-export
  • ticket-216
  • tickets-215-216-241-242
10 results

Comment.vue

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];
        }
    }