Bläddra i källkod

various fixes for test env

Olivier Massot 2 år sedan
förälder
incheckning
cc64bd0cfa

+ 2 - 2
config/bundles.php

@@ -3,7 +3,7 @@
 return [
     Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
     Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
-    Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'docker' => true, 'staging' => true],
+    Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'docker' => true, 'test' => true, 'staging' => true],
     Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
     Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
     Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
@@ -17,7 +17,7 @@ return [
     Knp\Bundle\SnappyBundle\KnpSnappyBundle::class => ['all' => true],
     Knp\Bundle\GaufretteBundle\KnpGaufretteBundle::class => ['all' => true],
     Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
-    Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'docker' => true, 'staging' => true],
+    Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'docker' => true, 'test' => true, 'staging' => true],
     Symfony\Bundle\MercureBundle\MercureBundle::class => ['all' => true],
     Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
     Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle::class => ['dev' => true, 'staging' => true],

+ 1 - 1
config/packages/hautelook_alice.yaml

@@ -2,4 +2,4 @@ when@dev: &dev
     hautelook_alice:
         fixtures_path: fixtures
 
-when@test: *dev
+when@staging: *dev

+ 0 - 8
config/packages/test/security.yaml

@@ -1,8 +0,0 @@
-# override in api/config/packages/test/security.yaml for test env
-# improve the test suite speed
-security:
-  password_hashers:
-    App\Entity\Person\Person:
-      algorithm: md5
-      encode_as_base64: false
-      iterations: 0

+ 0 - 13
config/services.yaml

@@ -24,19 +24,6 @@ services:
         parent: cache.system
         tags: [ cache.pool ]
 
-    # May have to be removed soon when api-platform removes these services
-    # see vendor/api-platform/core/src/Symfony/Bundle/Resources/config/metadata/property.xml:41
-    api_platform.cache.metadata.identifier:
-        parent: cache.adapter.array
-        tags: [ cache.pool ]
-    api_platform.metadata.property.identifier_metadata_factory.cached:
-        class: ApiPlatform\Metadata\Property\Factory\CachedPropertyMetadataFactory
-        decorates: api_platform.metadata.property.identifier_metadata_factory
-        decoration_priority: 99
-        arguments:
-            - '@api_platform.cache.metadata.identifier'
-            - '@api_platform.metadata.property.identifier_metadata_factory.cached.inner'
-
     ########### End Speeds up api-platform cache build substantially ###########
 
     # default configuration for services in *this* file

+ 14 - 0
public/.htaccess

@@ -0,0 +1,14 @@
+<IfModule mod_rewrite.c>
+    Options -MultiViews
+    RewriteEngine On
+    RewriteCond %{SERVER_PORT} 80
+    RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
+    RewriteCond %{REQUEST_FILENAME} !-f
+    RewriteRule ^(.*)$ index.php [QSA,L]
+</IfModule>
+
+<IfModule !mod_rewrite.c>
+    <IfModule mod_alias.c>
+        RedirectMatch 302 ^/$ /index.php/
+    </IfModule>
+</IfModule>