ソースを参照

Merge branch 'master' into develop

Vincent GUFFON 4 年 前
コミット
639224ea52

+ 3 - 10
.env

@@ -14,7 +14,7 @@
 # https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
 
 ###> symfony/framework-bundle ###
-APP_ENV=dev
+APP_ENV=prod
 APP_SECRET=6a76497c8658bb23e2236f97a2627df3
 #TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
 #TRUSTED_HOSTS='^(localhost|example\.com)$'
@@ -26,11 +26,11 @@ APP_SECRET=6a76497c8658bb23e2236f97a2627df3
 # For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
 # For a PostgreSQL database, use: "postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=11&charset=utf8"
 # IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
-DATABASE_URL=mysql://root:mysql660@db:3306/opentalent?serverVersion=5.7
+#DATABASE_URL=mysql://root:mysql660@db:3306/opentalent?serverVersion=5.7
 ###< doctrine/doctrine-bundle ###
 
 ###> nelmio/cors-bundle ###
-CORS_ALLOW_ORIGIN=^https?://(localhost|127\.0\.0\.1)(:[0-9]+)|local.admin.opentalent.fr|local.admin2.opentalent.fr?$
+#CORS_ALLOW_ORIGIN=^https?://(localhost|127\.0\.0\.1)(:[0-9]+)|local.admin.opentalent.fr|local.admin2.opentalent.fr?$
 ###< nelmio/cors-bundle ###
 
 ###> lexik/jwt-authentication-bundle ###
@@ -39,13 +39,6 @@ JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
 JWT_PASSPHRASE=opentalent
 ###< lexik/jwt-authentication-bundle ###
 
-###> BlackFire configuration ###
-BLACKFIRE_CLIENT_ID=988fcba8-552d-48df-a9c2-035c76535b69
-BLACKFIRE_CLIENT_TOKEN=8cfbeb263d044da9678dc2612531504da3790c308da7448e35724a5da91c136f
-BLACKFIRE_SERVER_ID=1171e53b-459b-41da-a292-80ff68cee8c2
-BLACKFIRE_SERVER_TOKEN=dbd1cfbea015fe83cccfc189a36ca3c16f3a1b43b94f50032a15e41e53548e8b
-###< BlackFire configuration ###
-
 ###> opentalent config folder ###
 OPENTALENT_CONFIG=/config/opentalent
 ###< opentalent config folder ###

+ 7 - 1
.gitignore

@@ -1,3 +1,6 @@
+###> phpdocs ###
+/.idea/
+###< phpdocs ###
 
 ###> symfony/framework-bundle ###
 /.env.local
@@ -21,4 +24,7 @@
 
 ###> phpdocs ###
 src/.phpdoc/
-###< phpdocs ###
+###< phpdocs ###
+/.project
+
+symfony.lock

+ 4 - 0
bin/console

@@ -38,6 +38,10 @@ if ($_SERVER['APP_DEBUG']) {
     }
 }
 
+// Prevent doctrine:schema:update to be executed during the progressive migration
+if (in_array($input->getFirstArgument(), ["d:s:u", "doctrine:schema:update"])) {
+    throw new \InvalidArgumentException("<!> schema:update should not be used here for the time of the progressive migration");
+}
 $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
 $application = new Application($kernel);
 $application->run($input);

+ 18 - 18
composer.json

@@ -25,29 +25,29 @@
         "nelmio/cors-bundle": "^2.1",
         "odolbeau/phone-number-bundle": "^3.1",
         "phpdocumentor/reflection-docblock": "^5.2",
-        "symfony/asset": "5.2.*",
-        "symfony/console": "5.2.*",
-        "symfony/dotenv": "5.2.*",
-        "symfony/expression-language": "5.2.*",
+        "symfony/asset": "5.3.*",
+        "symfony/console": "5.3.*",
+        "symfony/dotenv": "5.3.*",
+        "symfony/expression-language": "5.3.*",
         "symfony/flex": "^1.3.1",
-        "symfony/framework-bundle": "5.2.*",
-        "symfony/http-client": "5.2.*",
-        "symfony/intl": "5.2.*",
-        "symfony/property-access": "5.2.*",
-        "symfony/property-info": "5.2.*",
-        "symfony/security-bundle": "5.2.*",
-        "symfony/serializer": "5.2.*",
-        "symfony/twig-bundle": "^5.2",
-        "symfony/validator": "5.2.*",
-        "symfony/yaml": "5.2.*",
+        "symfony/framework-bundle": "5.3.*",
+        "symfony/http-client": "5.3.*",
+        "symfony/intl": "5.3.*",
+        "symfony/property-access": "5.3.*",
+        "symfony/property-info": "5.3.*",
+        "symfony/security-bundle": "5.3.*",
+        "symfony/serializer": "5.3.*",
+        "symfony/twig-bundle": "^5.3",
+        "symfony/validator": "5.3.*",
+        "symfony/yaml": "5.3.*",
         "vincent/foselastica": "1.1",
         "webonyx/graphql-php": "^14.3"
     },
     "require-dev": {
         "symfony/maker-bundle": "^1.21",
-        "symfony/phpunit-bridge": "^5.2",
-        "symfony/stopwatch": "^5.2",
-        "symfony/web-profiler-bundle": "^5.2"
+        "symfony/phpunit-bridge": "^5.3",
+        "symfony/stopwatch": "^5.3",
+        "symfony/web-profiler-bundle": "^5.3"
     },
     "config": {
         "optimize-autoloader": true,
@@ -93,7 +93,7 @@
     "extra": {
         "symfony": {
             "allow-contrib": false,
-            "require": "5.2.*"
+            "require": "5.3.*"
         }
     }
 }

ファイルの差分が大きいため隠しています
+ 289 - 175
composer.lock


+ 1 - 2
config/packages/security.yaml

@@ -157,10 +157,9 @@ security:
             provider: access_provider
             guard:
                 authenticators:
-                    - lexik_jwt_authentication.jwt_token_authenticator
+                - lexik_jwt_authentication.jwt_token_authenticator
         main:
             anonymous: true
-
             # activate different ways to authenticate
             # https://symfony.com/doc/current/security.html#firewalls-authentication
 

+ 1 - 0
src/Doctrine/Access/AccessExtension.php

@@ -44,5 +44,6 @@ final class AccessExtension implements QueryCollectionExtensionInterface, QueryI
         $rootAlias = $queryBuilder->getRootAliases()[0];
         $queryBuilder->andWhere(sprintf('%s.organization = :current_organization', $rootAlias));
         $queryBuilder->setParameter('current_organization', $currentUser->getOrganization());
+
     }
 }

+ 10 - 0
src/Entity/Access/Access.php

@@ -150,6 +150,16 @@ class Access implements UserInterface
         return $this;
     }
 
+    /**
+     * A visual identifier that represents this user.
+     *
+     * @see string
+     */
+    public function getUserIdentifier(): string
+    {
+        return $this->getPerson()->getUsername();
+    }
+
     /**
      * @inheritDoc
      */

+ 11 - 0
src/Entity/Person/Person.php

@@ -14,6 +14,7 @@ use Symfony\Component\Security\Core\User\UserInterface;
  * Personne physique ou morale
  *
  * @ORM\Entity(repositoryClass=PersonRepository::class)
+ *
  */
 class Person implements UserInterface
 {
@@ -76,6 +77,16 @@ class Person implements UserInterface
         return (string) $this->username;
     }
 
+    /**
+     * A visual identifier that represents this user.
+     *
+     * @see string
+     */
+    public function getUserIdentifier(): string
+    {
+        return (string) $this->username;
+    }
+
     public function setUsername(string $username): self
     {
         $this->username = $username;

+ 1 - 1
src/Enum/Organization/AddressPostalOrganizationTypeEnum.php

@@ -1,5 +1,5 @@
 <?php
-namespace App\Enum\ORganization;
+namespace App\Enum\Organization;
 
 use MyCLabs\Enum\Enum;
 

+ 2 - 0
src/Repository/Access/AccessRepository.php

@@ -8,12 +8,14 @@ use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
 use Doctrine\Persistence\ManagerRegistry;
 use Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface;
 use Symfony\Component\HttpFoundation\RequestStack;
+use Symfony\Component\Security\Core\User\UserInterface;
 
 /**
  * @method Access|null find($id, $lockMode = null, $lockVersion = null)
  * @method Access|null findOneBy(array $criteria, array $orderBy = null)
  * @method Access[]    findAll()
  * @method Access[]    findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
+ * @method null loadUserByIdentifier(string $identifier)
  */
 final class AccessRepository extends ServiceEntityRepository implements UserLoaderInterface
 {

+ 9 - 0
symfony.lock

@@ -49,6 +49,9 @@
     "doctrine/dbal": {
         "version": "2.10.4"
     },
+    "doctrine/deprecations": {
+        "version": "v0.5.3"
+    },
     "doctrine/doctrine-bundle": {
         "version": "2.0",
         "recipe": {
@@ -316,6 +319,9 @@
     "symfony/orm-pack": {
         "version": "v2.0.0"
     },
+    "symfony/password-hasher": {
+        "version": "v5.3.0"
+    },
     "symfony/phpunit-bridge": {
         "version": "5.1",
         "recipe": {
@@ -352,6 +358,9 @@
     "symfony/polyfill-php80": {
         "version": "v1.18.1"
     },
+    "symfony/polyfill-php81": {
+        "version": "v1.23.0"
+    },
     "symfony/profiler-pack": {
         "version": "v1.0.5"
     },

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません