소스 검색

update symfony

olinox14 2 달 전
부모
커밋
a4875ad37b

+ 6 - 0
api/.env.test

@@ -0,0 +1,6 @@
+# define your env variables for the test env here
+KERNEL_CLASS='App\Kernel'
+APP_SECRET='$ecretf0rt3st'
+SYMFONY_DEPRECATIONS_HELPER=999999
+PANTHER_APP_ENV=panther
+PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots

+ 5 - 0
api/.gitignore

@@ -8,3 +8,8 @@
 /var/
 /vendor/
 ###< symfony/framework-bundle ###
+
+###> phpunit/phpunit ###
+/phpunit.xml
+.phpunit.result.cache
+###< phpunit/phpunit ###

+ 115 - 87
api/composer.json

@@ -1,90 +1,118 @@
 {
-    "type": "project",
-    "license": "proprietary",
-    "minimum-stability": "stable",
-    "prefer-stable": true,
-    "require": {
-        "php": ">=8.2",
-        "ext-ctype": "*",
-        "ext-iconv": "*",
-        "api-platform/core": "^4.0",
-        "doctrine/doctrine-bundle": "^2.13",
-        "doctrine/doctrine-migrations-bundle": "^3.4",
-        "doctrine/orm": "^3.3",
-        "nelmio/cors-bundle": "^2.2",
-        "phpdocumentor/reflection-docblock": "^5.3",
-        "phpstan/phpdoc-parser": "^1.16",
-        "symfony/asset": "7.2.*",
-        "symfony/console": "7.2.*",
-        "symfony/doctrine-messenger": "7.2.*",
-        "symfony/dotenv": "7.2.*",
-        "symfony/error-handler": "7.2.*",
-        "symfony/expression-language": "7.2.*",
-        "symfony/flex": "^1.3.1",
-        "symfony/framework-bundle": "7.2.*",
-        "symfony/http-client": "7.2.*",
-        "symfony/intl": "7.2.*",
-        "symfony/lock": "7.2.*",
-        "symfony/mailer": "7.2.*",
-        "symfony/mercure": "^0.6.1",
-        "symfony/mercure-bundle": "^0.3.4",
-        "symfony/messenger": "7.2.*",
-        "symfony/monolog-bundle": "^3.7",
-        "symfony/property-access": "7.2.*",
-        "symfony/property-info": "7.2.*",
-        "symfony/runtime": "7.2.*",
-        "symfony/security-bundle": "7.2.*",
-        "symfony/serializer": "7.2.*",
-        "symfony/translation": "7.2.*",
-        "symfony/twig-bundle": "7.2.*",
-        "symfony/uid": "7.2.*",
-        "symfony/validator": "7.2.*",
-        "symfony/yaml": "7.2.*"
-    },
-    "config": {
-        "allow-plugins": {
-            "composer/package-versions-deprecated": true,
-            "symfony/flex": true,
-            "symfony/runtime": true
-        },
-        "optimize-autoloader": true,
-        "preferred-install": {
-            "*": "dist"
-        },
-        "sort-packages": true
-    },
-    "autoload": {
-        "psr-4": {
-            "App\\": "src/"
-        }
-    },
-    "replace": {
-        "symfony/polyfill-ctype": "*",
-        "symfony/polyfill-iconv": "*",
-        "symfony/polyfill-php72": "*",
-        "symfony/polyfill-php73": "*",
-        "symfony/polyfill-php74": "*",
-        "symfony/polyfill-php80": "*"
-    },
-    "scripts": {
-        "auto-scripts": {
-            "cache:clear": "symfony-cmd",
-            "assets:install %PUBLIC_DIR%": "symfony-cmd"
-        },
-        "post-install-cmd": [
-            "@auto-scripts"
-        ],
-        "post-update-cmd": [
-            "@auto-scripts"
-        ]
-    },
-    "conflict": {
-        "symfony/symfony": "*"
-    },
-    "extra": {
-        "symfony": {
-            "allow-contrib": false,
-            "require": "7.2.*"
-        }
+  "type": "project",
+  "license": "proprietary",
+  "minimum-stability": "stable",
+  "prefer-stable": true,
+  "require": {
+      "php": ">=8.2",
+      "ext-ctype": "*",
+      "ext-iconv": "*",
+      "api-platform/core": "^4.1",
+      "doctrine/dbal": "^3.9",
+      "doctrine/doctrine-bundle": "^2.13",
+      "doctrine/doctrine-migrations-bundle": "^3.4",
+      "doctrine/orm": "^3.3",
+      "nelmio/cors-bundle": "^2.2",
+      "phpdocumentor/reflection-docblock": "^5.3",
+      "phpstan/phpdoc-parser": "^1.16",
+      "symfony/asset": "7.3.*",
+      "symfony/console": "7.3.*",
+      "symfony/doctrine-messenger": "7.3.*",
+      "symfony/dotenv": "7.3.*",
+      "symfony/error-handler": "7.3.*",
+      "symfony/expression-language": "7.3.*",
+      "symfony/flex": "^1.3.1",
+      "symfony/framework-bundle": "7.3.*",
+      "symfony/http-client": "7.3.*",
+      "symfony/intl": "7.3.*",
+      "symfony/lock": "7.3.*",
+      "symfony/mailer": "7.3.*",
+      "symfony/mercure": "^0.6.1",
+      "symfony/mercure-bundle": "^0.3.4",
+      "symfony/messenger": "7.3.*",
+      "symfony/monolog-bundle": "^3.7",
+      "symfony/property-access": "7.3.*",
+      "symfony/property-info": "7.3.*",
+      "symfony/runtime": "7.3.*",
+      "symfony/security-bundle": "7.3.*",
+      "symfony/serializer": "7.3.*",
+      "symfony/translation": "7.3.*",
+      "symfony/twig-bundle": "7.3.*",
+      "symfony/uid": "7.3.*",
+      "symfony/validator": "7.3.*",
+      "symfony/yaml": "7.3.*"
+  },
+  "require-dev": {
+    "phpstan/extension-installer": "^1.2",
+    "phpstan/phpstan": "^2.1",
+    "phpstan/phpstan-deprecation-rules": "^2.0",
+    "phpstan/phpstan-doctrine": "^2.0",
+    "phpstan/phpstan-phpunit": "^2.0",
+    "phpstan/phpstan-symfony": "^2.0",
+    "phpunit/phpunit": "^9.6",
+    "symfony/browser-kit": "7.3.*",
+    "symfony/css-selector": "7.3.*",
+    "symfony/debug-bundle": "7.3.*",
+    "symfony/maker-bundle": "^1.48",
+    "symfony/phpunit-bridge": "7.3.*",
+    "symfony/stopwatch": "7.3.*",
+    "symfony/web-profiler-bundle": "7.3.*"
+  },
+  "config": {
+      "allow-plugins": {
+          "composer/package-versions-deprecated": true,
+          "symfony/flex": true,
+          "symfony/runtime": true,
+          "phpstan/extension-installer": true
+      },
+      "optimize-autoloader": true,
+      "preferred-install": {
+          "*": "dist"
+      },
+      "sort-packages": true
+  },
+  "autoload": {
+      "psr-4": {
+          "App\\": "src/"
+      }
+  },
+  "autoload-dev": {
+    "psr-4": {
+      "App\\Tests\\": "tests/"
     }
+  },
+  "replace": {
+      "symfony/polyfill-ctype": "*",
+      "symfony/polyfill-iconv": "*",
+      "symfony/polyfill-php72": "*",
+      "symfony/polyfill-php73": "*",
+      "symfony/polyfill-php74": "*",
+      "symfony/polyfill-php80": "*"
+  },
+  "scripts": {
+      "auto-scripts": {
+          "cache:clear": "symfony-cmd",
+          "assets:install %PUBLIC_DIR%": "symfony-cmd"
+      },
+      "post-install-cmd": [
+          "@auto-scripts"
+      ],
+      "post-update-cmd": [
+          "@auto-scripts"
+      ]
+  },
+  "conflict": {
+      "symfony/symfony": "*"
+  },
+  "extra": {
+      "symfony": {
+          "allow-contrib": false,
+          "require": "7.3.*"
+      }
+  },
+  "phpstan": {
+    "includes": [
+      "extension.neon"
+    ]
+  }
 }

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 199 - 274
api/composer.lock


+ 3 - 0
api/config/bundles.php

@@ -10,4 +10,7 @@ return [
     ApiPlatform\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
     Symfony\Bundle\MercureBundle\MercureBundle::class => ['all' => true],
     Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
+    Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true],
+    Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
+    Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
 ];

+ 5 - 0
api/config/packages/debug.yaml

@@ -0,0 +1,5 @@
+when@dev:
+    debug:
+        # Forwards VarDumper Data clones to a centralized server allowing to inspect dumps on CLI or in your browser.
+        # See the "server:dump" command to start a new server.
+        dump_destination: "tcp://%env(VAR_DUMPER_SERVER)%"

+ 3 - 0
api/config/packages/property_info.yaml

@@ -0,0 +1,3 @@
+framework:
+    property_info:
+        with_constructor_extractor: true

+ 13 - 0
api/config/packages/web_profiler.yaml

@@ -0,0 +1,13 @@
+when@dev:
+    web_profiler:
+        toolbar: true
+
+    framework:
+        profiler:
+            collect_serializer_data: true
+
+when@test:
+    framework:
+        profiler:
+            collect: false
+            collect_serializer_data: true

+ 8 - 0
api/config/routes/web_profiler.yaml

@@ -0,0 +1,8 @@
+when@dev:
+    web_profiler_wdt:
+        resource: '@WebProfilerBundle/Resources/config/routing/wdt.php'
+        prefix: /_wdt
+
+    web_profiler_profiler:
+        resource: '@WebProfilerBundle/Resources/config/routing/profiler.php'
+        prefix: /_profiler

+ 38 - 0
api/phpunit.xml.dist

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
+<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
+         backupGlobals="false"
+         colors="true"
+         bootstrap="tests/bootstrap.php"
+         convertDeprecationsToExceptions="false"
+>
+    <php>
+        <ini name="display_errors" value="1" />
+        <ini name="error_reporting" value="-1" />
+        <server name="APP_ENV" value="test" force="true" />
+        <server name="SHELL_VERBOSITY" value="-1" />
+        <server name="SYMFONY_PHPUNIT_REMOVE" value="" />
+        <server name="SYMFONY_PHPUNIT_VERSION" value="9.5" />
+    </php>
+
+    <testsuites>
+        <testsuite name="Project Test Suite">
+            <directory>tests</directory>
+        </testsuite>
+    </testsuites>
+
+    <coverage processUncoveredFiles="true">
+        <include>
+            <directory suffix=".php">src</directory>
+        </include>
+    </coverage>
+
+    <listeners>
+        <listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
+    </listeners>
+
+    <extensions>
+    </extensions>
+</phpunit>

+ 87 - 0
api/symfony.lock

@@ -13,6 +13,15 @@
             "src/ApiResource/.gitignore"
         ]
     },
+    "doctrine/deprecations": {
+        "version": "1.1",
+        "recipe": {
+            "repo": "github.com/symfony/recipes",
+            "branch": "main",
+            "version": "1.0",
+            "ref": "87424683adc81d7dc305eefec1fced883084aab9"
+        }
+    },
     "doctrine/doctrine-bundle": {
         "version": "2.13",
         "recipe": {
@@ -52,6 +61,29 @@
             "config/packages/nelmio_cors.yaml"
         ]
     },
+    "phpstan/phpstan": {
+        "version": "2.1",
+        "recipe": {
+            "repo": "github.com/symfony/recipes-contrib",
+            "branch": "main",
+            "version": "1.0",
+            "ref": "5e490cc197fb6bb1ae22e5abbc531ddc633b6767"
+        }
+    },
+    "phpunit/phpunit": {
+        "version": "9.6",
+        "recipe": {
+            "repo": "github.com/symfony/recipes",
+            "branch": "main",
+            "version": "9.6",
+            "ref": "6a9341aa97d441627f8bd424ae85dc04c944f8b4"
+        },
+        "files": [
+            ".env.test",
+            "phpunit.xml.dist",
+            "tests/bootstrap.php"
+        ]
+    },
     "symfony/console": {
         "version": "6.4",
         "recipe": {
@@ -64,6 +96,18 @@
             "bin/console"
         ]
     },
+    "symfony/debug-bundle": {
+        "version": "7.3",
+        "recipe": {
+            "repo": "github.com/symfony/recipes",
+            "branch": "main",
+            "version": "5.3",
+            "ref": "5aa8aa48234c8eb6dbdd7b3cd5d791485d2cec4b"
+        },
+        "files": [
+            "config/packages/debug.yaml"
+        ]
+    },
     "symfony/flex": {
         "version": "1.21",
         "recipe": {
@@ -119,6 +163,15 @@
             "config/packages/mailer.yaml"
         ]
     },
+    "symfony/maker-bundle": {
+        "version": "1.64",
+        "recipe": {
+            "repo": "github.com/symfony/recipes",
+            "branch": "main",
+            "version": "1.0",
+            "ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f"
+        }
+    },
     "symfony/mercure-bundle": {
         "version": "0.3",
         "recipe": {
@@ -155,6 +208,27 @@
             "config/packages/monolog.yaml"
         ]
     },
+    "symfony/phpunit-bridge": {
+        "version": "7.3",
+        "recipe": {
+            "repo": "github.com/symfony/recipes",
+            "branch": "main",
+            "version": "7.3",
+            "ref": "dc13fec96bd527bd399c3c01f0aab915c67fd544"
+        }
+    },
+    "symfony/property-info": {
+        "version": "7.3",
+        "recipe": {
+            "repo": "github.com/symfony/recipes",
+            "branch": "main",
+            "version": "7.3",
+            "ref": "dae70df71978ae9226ae915ffd5fad817f5ca1f7"
+        },
+        "files": [
+            "config/packages/property_info.yaml"
+        ]
+    },
     "symfony/routing": {
         "version": "6.4",
         "recipe": {
@@ -230,5 +304,18 @@
         "files": [
             "config/packages/validator.yaml"
         ]
+    },
+    "symfony/web-profiler-bundle": {
+        "version": "7.3",
+        "recipe": {
+            "repo": "github.com/symfony/recipes",
+            "branch": "main",
+            "version": "7.3",
+            "ref": "a363460c1b0b4a4d0242f2ce1a843ca0f6ac9026"
+        },
+        "files": [
+            "config/packages/web_profiler.yaml",
+            "config/routes/web_profiler.yaml"
+        ]
     }
 }

+ 9 - 0
api/tests/bootstrap.php

@@ -0,0 +1,9 @@
+<?php
+
+use Symfony\Component\Dotenv\Dotenv;
+
+require dirname(__DIR__).'/vendor/autoload.php';
+
+if (method_exists(Dotenv::class, 'bootEnv')) {
+    (new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
+}

+ 0 - 61
specs/variant_space.md

@@ -1,61 +0,0 @@
-# Concept
-
-On pourrait faire une première version sur terre, avec des technologies présentes. Le scénario serait basé sur un monde 
-post-nucléaire, en 2043 par ex. Les humains émergent de leurs abris progressivement, l'hiver nucléaire est passé, 
-certaines zones correspondant aux anciennes grandes villes restent invivables et les anciennes frontières ont 
-cessé d'exister, mais des villes renaissent.
-
-# Idées de noms
-
-Avec un scénario conquête spatiale :
-
-* constellation
-* new stars
-* new worlds
-* far space
-
-## Factions
-
-Fédération : la plus puissante et répandue, mais avec plus de réglementation et de limites politiques
-Empire : pendant totalitaire de la fédération, tyrannique et guerrier
-Hyperspace Inc. : entreprise privée, orientée rentabilité, plus de souplesse mais tout de même soumise aux réglementations
-Pirates : pirates de l'espace, liberté complète, mais combattue par tous
-
-Les factions donnent des missions et des instructions
-Elles fournissent aussi un soutien militaire, en échange de points d'influence
-
-## Zones d'installation spatiales
-
-Une zone de l'espace devient accessible dès lors qu'un joueur a construit un portail spatial dans le secteur.
-Les zones les moins fréquentées sont plus favorables aux pirates.
-
-## Planètes
-
-Différents types de planètes colonisables :
-
-* habitables
-* non-habitables mais terraformables
-* rocheuses non-terraformables (taille, température...)
-* gazeuses
-* lunes
-
-On peut envisager un coefficient d'habitabilité global.
-
-## Construction des colonies
-
-### Principe général
-
-On part d'un module de départ (vaisseau)
-
-On peut construire sur plusieurs niveaux (5m chacun?), pour commencer de -2 à +2 par exemple
-Les niveaux plus élevés ou plus profonds sont plus chers, et peuvent avoir des impacts sur la qualité de vie, comme 
-dans le cas d'une canalisation suspendue.
-
-## Galaxie
-
-Les seuls systèmes non colonisables sont le système solaire et ses plus proches voisins.
-Les factions démarrent avec quelques milliers de systèmes (pas forcément voisins) dans leur territoire. 
-Ces systèmes abritent différents types de planètes colonisables de différents types.
-
-Quand un nouveau joueur rejoint une faction, il peut choisir le type de planète à coloniser, selon ce qui est disponible
-dans l'espace de la faction choisie.

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.