From b36ff0d969785fb1f0a398be47adc30cd3ca2d0a Mon Sep 17 00:00:00 2001 From: marioprudhomme Date: Thu, 30 Jul 2020 14:58:44 -0400 Subject: [PATCH 01/16] Refactor based on new core --- api/composer.json | 1 + api/composer.lock | 71 ++++++++++++++++++- .../fixtures/dev/access/role/permission.yaml | 2 - api/config/packages/doctrine.yaml | 12 ++++ api/config/tenant/loader/acl.yaml | 2 - api/src/Migration/Version0_19_0.php | 50 +++++++++++++ api/symfony.lock | 3 + 7 files changed, 134 insertions(+), 7 deletions(-) create mode 100644 api/src/Migration/Version0_19_0.php diff --git a/api/composer.json b/api/composer.json index e10666f..8c44308 100644 --- a/api/composer.json +++ b/api/composer.json @@ -18,6 +18,7 @@ "knplabs/doctrine-behaviors": "^1.5", "lexik/jwt-authentication-bundle": "^2.6", "ramsey/uuid": "^3.8", + "scienta/doctrine-json-functions": "^4.1", "sensio/framework-extra-bundle": "^5.2", "sensiolabs/security-checker": "^5.0", "symfony/console": "^4.0", diff --git a/api/composer.lock b/api/composer.lock index 7c3b3c4..5633f5c 100644 --- a/api/composer.lock +++ b/api/composer.lock @@ -1,10 +1,10 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "bf19a4e1150ddc89351e668933f71c5a", + "content-hash": "cc76cb7d67f0d82d7f881c264dd55278", "packages": [ { "name": "api-platform/api-pack", @@ -2997,6 +2997,68 @@ ], "time": "2018-07-19T23:38:55+00:00" }, + { + "name": "scienta/doctrine-json-functions", + "version": "4.1.2", + "source": { + "type": "git", + "url": "https://github.com/ScientaNL/DoctrineJsonFunctions.git", + "reference": "6cab3f93a7415dbc889da15336c7605efbfe7bd4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ScientaNL/DoctrineJsonFunctions/zipball/6cab3f93a7415dbc889da15336c7605efbfe7bd4", + "reference": "6cab3f93a7415dbc889da15336c7605efbfe7bd4", + "shasum": "" + }, + "require": { + "ext-pdo": "*", + "php": "^7.1" + }, + "require-dev": { + "doctrine/coding-standard": "^5.0", + "doctrine/orm": "~2.6", + "phpunit/phpunit": "^6.5" + }, + "suggest": { + "dunglas/doctrine-json-odm": "To serialize / deserialize objects as JSON documents." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Scienta\\DoctrineJsonFunctions\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Doctrine Json Functions Contributors", + "homepage": "https://github.com/ScientaNL/DoctrineJsonFunctions/contributors" + } + ], + "description": "A set of extensions to Doctrine 2 that add support for json query functions.", + "keywords": [ + "database", + "doctrine", + "dql", + "json", + "mariadb", + "mysql", + "orm", + "postgres", + "postgresql", + "sqlite" + ], + "time": "2020-02-07T11:05:21+00:00" + }, { "name": "sensio/framework-extra-bundle", "version": "v5.2.4", @@ -6247,6 +6309,7 @@ "code", "zf2" ], + "abandoned": "laminas/laminas-code", "time": "2018-08-13T20:36:59+00:00" }, { @@ -6301,6 +6364,7 @@ "events", "zf2" ], + "abandoned": "laminas/laminas-eventmanager", "time": "2018-04-25T15:33:34+00:00" } ], @@ -7883,5 +7947,6 @@ "php": "^7.1.3", "ext-iconv": "*" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "1.1.0" } diff --git a/api/config/fixtures/dev/access/role/permission.yaml b/api/config/fixtures/dev/access/role/permission.yaml index 2511228..beb4fd8 100644 --- a/api/config/fixtures/dev/access/role/permission.yaml +++ b/api/config/fixtures/dev/access/role/permission.yaml @@ -3,7 +3,6 @@ objects: scope: type: owner entity: BusinessUnit - entity_uuid: ~ # Any BusinessUnit key: entity attributes: [BROWSE, READ, EDIT, ADD, DELETE] @@ -11,7 +10,6 @@ objects: scope: type: owner entity: BusinessUnit - entity_uuid: ~ # Any BusinessUnit key: property attributes: [BROWSE, READ, EDIT] diff --git a/api/config/packages/doctrine.yaml b/api/config/packages/doctrine.yaml index 02aef9d..4ede26b 100644 --- a/api/config/packages/doctrine.yaml +++ b/api/config/packages/doctrine.yaml @@ -7,6 +7,18 @@ doctrine: server_version: '9.6' url: '%env(resolve:DATABASE_URL)%' orm: + dql: + string_functions: + JSON_EXTRACT_PATH: Scienta\DoctrineJsonFunctions\Query\AST\Functions\Postgresql\JsonExtractPath + JSON_GET: Scienta\DoctrineJsonFunctions\Query\AST\Functions\Postgresql\JsonGet + JSON_GET_PATH: Scienta\DoctrineJsonFunctions\Query\AST\Functions\Postgresql\JsonGetPath + JSON_GET_PATH_TEXT: Scienta\DoctrineJsonFunctions\Query\AST\Functions\Postgresql\JsonGetPathText + JSON_GET_TEXT: Scienta\DoctrineJsonFunctions\Query\AST\Functions\Postgresql\JsonGetText + JSONB_CONTAINS: Scienta\DoctrineJsonFunctions\Query\AST\Functions\Postgresql\JsonbContains + JSONB_EXISTS: Scienta\DoctrineJsonFunctions\Query\AST\Functions\Postgresql\JsonbExists + JSONB_EXISTS_ALL: Scienta\DoctrineJsonFunctions\Query\AST\Functions\Postgresql\JsonbExistsAll + JSONB_EXISTS_ANY: Scienta\DoctrineJsonFunctions\Query\AST\Functions\Postgresql\JsonbExistsAny + JSONB_IS_CONTAINED: Scienta\DoctrineJsonFunctions\Query\AST\Functions\Postgresql\JsonbIsContained auto_generate_proxy_classes: '%kernel.debug%' naming_strategy: doctrine.orm.naming_strategy.underscore auto_mapping: true diff --git a/api/config/tenant/loader/acl.yaml b/api/config/tenant/loader/acl.yaml index 6f6130c..0af652f 100644 --- a/api/config/tenant/loader/acl.yaml +++ b/api/config/tenant/loader/acl.yaml @@ -25,13 +25,11 @@ objects: - scope: type: owner entity: BusinessUnit - entity_uuid: ~ key: entity attributes: [BROWSE, READ, EDIT, ADD, DELETE] - scope: type: owner entity: BusinessUnit - entity_uuid: ~ key: property attributes: [BROWSE, READ, EDIT] - scope: diff --git a/api/src/Migration/Version0_19_0.php b/api/src/Migration/Version0_19_0.php new file mode 100644 index 0000000..0f3121f --- /dev/null +++ b/api/src/Migration/Version0_19_0.php @@ -0,0 +1,50 @@ +acl = new Acl($version); + } + + /** + * Up migration + * + * @param \Doctrine\DBAL\Schema\Schema $schema + */ + public function up(Schema $schema) + { + $this->acl->up($schema); + } + + /** + * Down migration + * + * @param \Doctrine\DBAL\Schema\Schema $schema + */ + public function down(Schema $schema) + { + $this->acl->down($schema); + } +} diff --git a/api/symfony.lock b/api/symfony.lock index e02db02..df7232f 100644 --- a/api/symfony.lock +++ b/api/symfony.lock @@ -245,6 +245,9 @@ "ramsey/uuid": { "version": "3.8.0" }, + "scienta/doctrine-json-functions": { + "version": "4.1.2" + }, "sensio/framework-extra-bundle": { "version": "5.2", "recipe": { From a234b7d69852d465582c6d9cf9868d5c4de379e0 Mon Sep 17 00:00:00 2001 From: marioprudhomme Date: Thu, 30 Jul 2020 15:34:29 -0400 Subject: [PATCH 02/16] Update api version --- api/config/packages/api_platform.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/config/packages/api_platform.yaml b/api/config/packages/api_platform.yaml index 1431a39..2be3f8a 100644 --- a/api/config/packages/api_platform.yaml +++ b/api/config/packages/api_platform.yaml @@ -5,7 +5,7 @@ api_platform: mapping: paths: ['%kernel.project_dir%/src/Entity'] title: Forms - version: 0.18.1 + version: 0.19.0 collection: pagination: page_parameter_name: _page From ebbc1233ac9a4bde354cb72475fe001a66e6fe59 Mon Sep 17 00:00:00 2001 From: marioprudhomme Date: Thu, 30 Jul 2020 15:48:50 -0400 Subject: [PATCH 03/16] Update docker image version --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2cf8970..d07cce4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,7 @@ services: - forms_database php: - image: digitalstate/forms:php-0.18.1 + image: digitalstate/forms:php-0.19.0 depends_on: - database env_file: @@ -44,7 +44,7 @@ services: - forms_php api: - image: digitalstate/forms:api-0.18.1 + image: digitalstate/forms:api-0.19.0 depends_on: - php networks: From beb9c297fa0da2b17f8caad36ea9c7741bfce40a Mon Sep 17 00:00:00 2001 From: marioprudhomme Date: Sun, 2 Aug 2020 07:12:33 -0400 Subject: [PATCH 04/16] Update digitalstate/core dependency --- api/composer.json | 2 +- api/composer.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/composer.json b/api/composer.json index 8c44308..f671f4c 100644 --- a/api/composer.json +++ b/api/composer.json @@ -11,7 +11,7 @@ "ext-iconv": "*", "api-platform/api-pack": "^1.1", "defuse/php-encryption": "^2.2", - "digitalstate/core": "0.18.0", + "digitalstate/core": "0.19.0", "doctrine/doctrine-fixtures-bundle": "^3.0", "doctrine/doctrine-migrations-bundle": "^1.3", "guzzlehttp/guzzle": "^6.3", diff --git a/api/composer.lock b/api/composer.lock index 5633f5c..70864db 100644 --- a/api/composer.lock +++ b/api/composer.lock @@ -330,16 +330,16 @@ }, { "name": "digitalstate/core", - "version": "0.18.0", + "version": "0.19.0", "source": { "type": "git", "url": "https://github.com/DigitalState/Core.git", - "reference": "c94e4b990ef1a7f1adc76b89d06d95f6a47721ec" + "reference": "7caa21bd878923e318dc5e4b214846fb11eae96c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DigitalState/Core/zipball/c94e4b990ef1a7f1adc76b89d06d95f6a47721ec", - "reference": "c94e4b990ef1a7f1adc76b89d06d95f6a47721ec", + "url": "https://api.github.com/repos/DigitalState/Core/zipball/7caa21bd878923e318dc5e4b214846fb11eae96c", + "reference": "7caa21bd878923e318dc5e4b214846fb11eae96c", "shasum": "" }, "require": { From fc7f30d56b5eb0564b0809fe84e671e6787435e1 Mon Sep 17 00:00:00 2001 From: marioprudhomme Date: Sun, 2 Aug 2020 07:57:24 -0400 Subject: [PATCH 05/16] Update digitalstate/core dependency --- api/composer.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/composer.lock b/api/composer.lock index 70864db..211b72d 100644 --- a/api/composer.lock +++ b/api/composer.lock @@ -334,12 +334,12 @@ "source": { "type": "git", "url": "https://github.com/DigitalState/Core.git", - "reference": "7caa21bd878923e318dc5e4b214846fb11eae96c" + "reference": "4c2371640e087c2490231085d8df7f9109e9bda3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DigitalState/Core/zipball/7caa21bd878923e318dc5e4b214846fb11eae96c", - "reference": "7caa21bd878923e318dc5e4b214846fb11eae96c", + "url": "https://api.github.com/repos/DigitalState/Core/zipball/4c2371640e087c2490231085d8df7f9109e9bda3", + "reference": "4c2371640e087c2490231085d8df7f9109e9bda3", "shasum": "" }, "require": { From ee6cff7508ef433e5d078de10917bdd47319337f Mon Sep 17 00:00:00 2001 From: marioprudhomme Date: Mon, 3 Aug 2020 16:40:25 -0400 Subject: [PATCH 06/16] Update to latest digitalstate/core dependency --- api/composer.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/composer.lock b/api/composer.lock index 211b72d..02ba1f1 100644 --- a/api/composer.lock +++ b/api/composer.lock @@ -334,12 +334,12 @@ "source": { "type": "git", "url": "https://github.com/DigitalState/Core.git", - "reference": "4c2371640e087c2490231085d8df7f9109e9bda3" + "reference": "f2a5b5972e56266978e44bfde920ed726357739a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DigitalState/Core/zipball/4c2371640e087c2490231085d8df7f9109e9bda3", - "reference": "4c2371640e087c2490231085d8df7f9109e9bda3", + "url": "https://api.github.com/repos/DigitalState/Core/zipball/f2a5b5972e56266978e44bfde920ed726357739a", + "reference": "f2a5b5972e56266978e44bfde920ed726357739a", "shasum": "" }, "require": { From 81cb6d4d244956b6b16168a94ce75d76643cba2b Mon Sep 17 00:00:00 2001 From: marioprudhomme Date: Wed, 5 Aug 2020 18:54:56 -0400 Subject: [PATCH 07/16] Update digitalstate/core dependency --- api/composer.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/composer.lock b/api/composer.lock index 02ba1f1..bf0edc5 100644 --- a/api/composer.lock +++ b/api/composer.lock @@ -334,12 +334,12 @@ "source": { "type": "git", "url": "https://github.com/DigitalState/Core.git", - "reference": "f2a5b5972e56266978e44bfde920ed726357739a" + "reference": "7ffdb4a9d467390862d0bd223447893e5b206df0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DigitalState/Core/zipball/f2a5b5972e56266978e44bfde920ed726357739a", - "reference": "f2a5b5972e56266978e44bfde920ed726357739a", + "url": "https://api.github.com/repos/DigitalState/Core/zipball/7ffdb4a9d467390862d0bd223447893e5b206df0", + "reference": "7ffdb4a9d467390862d0bd223447893e5b206df0", "shasum": "" }, "require": { From 2ecb8cdb2118aa8aa168a16ee2cbdfedcced410c Mon Sep 17 00:00:00 2001 From: marioprudhomme Date: Thu, 6 Aug 2020 17:42:24 -0400 Subject: [PATCH 08/16] Update to latest digitalstate/core dependency --- api/composer.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/composer.lock b/api/composer.lock index bf0edc5..99f6043 100644 --- a/api/composer.lock +++ b/api/composer.lock @@ -334,12 +334,12 @@ "source": { "type": "git", "url": "https://github.com/DigitalState/Core.git", - "reference": "7ffdb4a9d467390862d0bd223447893e5b206df0" + "reference": "ac3da6f8fd4e79933769f01253ab96d552b33776" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DigitalState/Core/zipball/7ffdb4a9d467390862d0bd223447893e5b206df0", - "reference": "7ffdb4a9d467390862d0bd223447893e5b206df0", + "url": "https://api.github.com/repos/DigitalState/Core/zipball/ac3da6f8fd4e79933769f01253ab96d552b33776", + "reference": "ac3da6f8fd4e79933769f01253ab96d552b33776", "shasum": "" }, "require": { From 6bd050efec81dd038043c825f3e6c05af4beb909 Mon Sep 17 00:00:00 2001 From: marioprudhomme Date: Sun, 9 Aug 2020 21:19:15 -0400 Subject: [PATCH 09/16] Update to latest digitalstate/core dependency --- api/composer.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/composer.lock b/api/composer.lock index 99f6043..05cb393 100644 --- a/api/composer.lock +++ b/api/composer.lock @@ -334,12 +334,12 @@ "source": { "type": "git", "url": "https://github.com/DigitalState/Core.git", - "reference": "ac3da6f8fd4e79933769f01253ab96d552b33776" + "reference": "43e1155fae8e6610964893b0fe520de8848abd3a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DigitalState/Core/zipball/ac3da6f8fd4e79933769f01253ab96d552b33776", - "reference": "ac3da6f8fd4e79933769f01253ab96d552b33776", + "url": "https://api.github.com/repos/DigitalState/Core/zipball/43e1155fae8e6610964893b0fe520de8848abd3a", + "reference": "43e1155fae8e6610964893b0fe520de8848abd3a", "shasum": "" }, "require": { From a2ad3fe546ed5ee2d02270e956860950776773be Mon Sep 17 00:00:00 2001 From: marioprudhomme Date: Sun, 30 Aug 2020 14:16:24 -0400 Subject: [PATCH 10/16] Enable write on entity created_at properties --- api/composer.lock | 6 +++--- api/config/fixtures/dev/access/anonymous/access.yaml | 1 + api/config/fixtures/dev/access/individual/access.yaml | 1 + api/config/fixtures/dev/access/organization/access.yaml | 1 + api/config/fixtures/dev/access/role/access.yaml | 1 + api/config/fixtures/dev/access/staff/access.yaml | 1 + api/config/fixtures/dev/access/system/access.yaml | 1 + api/config/fixtures/dev/config.yaml | 1 + api/config/fixtures/dev/form.yaml | 1 + api/config/fixtures/dev/metadata.yaml | 1 + api/config/fixtures/dev/system/tenant.yaml | 1 + api/config/fixtures/test/access/anonymous/access.yaml | 1 + api/config/fixtures/test/access/individual/access.yaml | 1 + api/config/fixtures/test/access/organization/access.yaml | 1 + api/config/fixtures/test/access/role/access.yaml | 1 + api/config/fixtures/test/access/staff/access.yaml | 1 + api/config/fixtures/test/access/system/access.yaml | 1 + api/config/fixtures/test/config.yaml | 1 + api/config/fixtures/test/form.yaml | 1 + api/config/fixtures/test/metadata.yaml | 1 + api/config/fixtures/test/system/tenant.yaml | 1 + api/docker/php/docker-entrypoint.sh | 4 ++-- api/features/api/access/add.feature | 2 ++ api/features/api/access/edit.feature | 6 +++--- api/features/api/config/edit.feature | 6 +++--- api/features/api/metadata/add.feature | 2 ++ api/features/api/metadata/edit.feature | 6 +++--- api/src/Entity/Form.php | 5 +++-- api/src/Fixture/Form.php | 7 +++++++ 29 files changed, 48 insertions(+), 16 deletions(-) diff --git a/api/composer.lock b/api/composer.lock index 05cb393..fc306a0 100644 --- a/api/composer.lock +++ b/api/composer.lock @@ -334,12 +334,12 @@ "source": { "type": "git", "url": "https://github.com/DigitalState/Core.git", - "reference": "43e1155fae8e6610964893b0fe520de8848abd3a" + "reference": "c762a4f7a9ed1815742564d7890f8652d65dc3d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DigitalState/Core/zipball/43e1155fae8e6610964893b0fe520de8848abd3a", - "reference": "43e1155fae8e6610964893b0fe520de8848abd3a", + "url": "https://api.github.com/repos/DigitalState/Core/zipball/c762a4f7a9ed1815742564d7890f8652d65dc3d0", + "reference": "c762a4f7a9ed1815742564d7890f8652d65dc3d0", "shasum": "" }, "require": { diff --git a/api/config/fixtures/dev/access/anonymous/access.yaml b/api/config/fixtures/dev/access/anonymous/access.yaml index 69d2036..98f9576 100644 --- a/api/config/fixtures/dev/access/anonymous/access.yaml +++ b/api/config/fixtures/dev/access/anonymous/access.yaml @@ -2,6 +2,7 @@ objects: [] prototype: uuid: ~ + created_at: ~ owner: BusinessUnit owner_uuid: c11c546e-bd01-47cf-97da-e25388357b5a # Administration assignee: Anonymous diff --git a/api/config/fixtures/dev/access/individual/access.yaml b/api/config/fixtures/dev/access/individual/access.yaml index dfe7630..3318fdd 100644 --- a/api/config/fixtures/dev/access/individual/access.yaml +++ b/api/config/fixtures/dev/access/individual/access.yaml @@ -2,6 +2,7 @@ objects: [] prototype: uuid: ~ + created_at: ~ owner: BusinessUnit owner_uuid: c11c546e-bd01-47cf-97da-e25388357b5a # Administration assignee: Individual diff --git a/api/config/fixtures/dev/access/organization/access.yaml b/api/config/fixtures/dev/access/organization/access.yaml index d49418a..23d354e 100644 --- a/api/config/fixtures/dev/access/organization/access.yaml +++ b/api/config/fixtures/dev/access/organization/access.yaml @@ -2,6 +2,7 @@ objects: [] prototype: uuid: ~ + created_at: ~ owner: BusinessUnit owner_uuid: c11c546e-bd01-47cf-97da-e25388357b5a # Administration assignee: Organization diff --git a/api/config/fixtures/dev/access/role/access.yaml b/api/config/fixtures/dev/access/role/access.yaml index d9281fc..b14e221 100644 --- a/api/config/fixtures/dev/access/role/access.yaml +++ b/api/config/fixtures/dev/access/role/access.yaml @@ -16,6 +16,7 @@ objects: prototype: uuid: ~ + created_at: ~ owner: BusinessUnit owner_uuid: c11c546e-bd01-47cf-97da-e25388357b5a # Administration assignee: Role diff --git a/api/config/fixtures/dev/access/staff/access.yaml b/api/config/fixtures/dev/access/staff/access.yaml index 3546239..0989c22 100644 --- a/api/config/fixtures/dev/access/staff/access.yaml +++ b/api/config/fixtures/dev/access/staff/access.yaml @@ -2,6 +2,7 @@ objects: [] prototype: uuid: ~ + created_at: ~ owner: BusinessUnit owner_uuid: c11c546e-bd01-47cf-97da-e25388357b5a # Administration assignee: Staff diff --git a/api/config/fixtures/dev/access/system/access.yaml b/api/config/fixtures/dev/access/system/access.yaml index 0c9100b..926ff9b 100644 --- a/api/config/fixtures/dev/access/system/access.yaml +++ b/api/config/fixtures/dev/access/system/access.yaml @@ -9,6 +9,7 @@ objects: prototype: uuid: ~ + created_at: ~ owner: System owner_uuid: ~ assignee: System diff --git a/api/config/fixtures/dev/config.yaml b/api/config/fixtures/dev/config.yaml index bf3f54c..a61da0c 100644 --- a/api/config/fixtures/dev/config.yaml +++ b/api/config/fixtures/dev/config.yaml @@ -33,6 +33,7 @@ objects: prototype: uuid: ~ + created_at: ~ owner: BusinessUnit owner_uuid: c11c546e-bd01-47cf-97da-e25388357b5a # Administration key: ~ diff --git a/api/config/fixtures/dev/form.yaml b/api/config/fixtures/dev/form.yaml index 563bba2..17085aa 100644 --- a/api/config/fixtures/dev/form.yaml +++ b/api/config/fixtures/dev/form.yaml @@ -37,6 +37,7 @@ objects: prototype: uuid: ~ + created_at: ~ owner: BusinessUnit owner_uuid: a9d68bf7-5000-49fe-8b00-33dde235b327 # Backoffice type: ~ diff --git a/api/config/fixtures/dev/metadata.yaml b/api/config/fixtures/dev/metadata.yaml index 8130c48..16c7828 100644 --- a/api/config/fixtures/dev/metadata.yaml +++ b/api/config/fixtures/dev/metadata.yaml @@ -2,6 +2,7 @@ objects: [] prototype: uuid: ~ + created_at: ~ owner: BusinessUnit owner_uuid: c11c546e-bd01-47cf-97da-e25388357b5a # Administration title: {} diff --git a/api/config/fixtures/dev/system/tenant.yaml b/api/config/fixtures/dev/system/tenant.yaml index feb4948..a0dbc08 100644 --- a/api/config/fixtures/dev/system/tenant.yaml +++ b/api/config/fixtures/dev/system/tenant.yaml @@ -3,4 +3,5 @@ objects: prototype: uuid: ~ + created_at: ~ data: {} diff --git a/api/config/fixtures/test/access/anonymous/access.yaml b/api/config/fixtures/test/access/anonymous/access.yaml index 9853624..1dcbc1c 100644 --- a/api/config/fixtures/test/access/anonymous/access.yaml +++ b/api/config/fixtures/test/access/anonymous/access.yaml @@ -19,6 +19,7 @@ objects: prototype: uuid: ~ + created_at: ~ owner: BusinessUnit owner_uuid: ~ assignee: Anonymous diff --git a/api/config/fixtures/test/access/individual/access.yaml b/api/config/fixtures/test/access/individual/access.yaml index 5ef054a..c407845 100644 --- a/api/config/fixtures/test/access/individual/access.yaml +++ b/api/config/fixtures/test/access/individual/access.yaml @@ -19,6 +19,7 @@ objects: prototype: uuid: ~ + created_at: ~ owner: BusinessUnit owner_uuid: ~ assignee: Individual diff --git a/api/config/fixtures/test/access/organization/access.yaml b/api/config/fixtures/test/access/organization/access.yaml index 21081d5..b1f2db4 100644 --- a/api/config/fixtures/test/access/organization/access.yaml +++ b/api/config/fixtures/test/access/organization/access.yaml @@ -19,6 +19,7 @@ objects: prototype: uuid: ~ + created_at: ~ owner: BusinessUnit owner_uuid: ~ assignee: Organization diff --git a/api/config/fixtures/test/access/role/access.yaml b/api/config/fixtures/test/access/role/access.yaml index fb18ad2..a70eb55 100644 --- a/api/config/fixtures/test/access/role/access.yaml +++ b/api/config/fixtures/test/access/role/access.yaml @@ -2,6 +2,7 @@ objects: [] prototype: uuid: ~ + created_at: ~ owner: BusinessUnit owner_uuid: ~ assignee: Role diff --git a/api/config/fixtures/test/access/staff/access.yaml b/api/config/fixtures/test/access/staff/access.yaml index c20e960..19ffda4 100644 --- a/api/config/fixtures/test/access/staff/access.yaml +++ b/api/config/fixtures/test/access/staff/access.yaml @@ -19,6 +19,7 @@ objects: prototype: uuid: ~ + created_at: ~ owner: BusinessUnit owner_uuid: ~ assignee: Staff diff --git a/api/config/fixtures/test/access/system/access.yaml b/api/config/fixtures/test/access/system/access.yaml index 0fe75f3..829922f 100644 --- a/api/config/fixtures/test/access/system/access.yaml +++ b/api/config/fixtures/test/access/system/access.yaml @@ -11,6 +11,7 @@ objects: prototype: uuid: ~ + created_at: ~ owner: System owner_uuid: ~ assignee: System diff --git a/api/config/fixtures/test/config.yaml b/api/config/fixtures/test/config.yaml index 8d4be6a..003b9aa 100644 --- a/api/config/fixtures/test/config.yaml +++ b/api/config/fixtures/test/config.yaml @@ -97,6 +97,7 @@ objects: prototype: uuid: ~ + created_at: ~ owner: BusinessUnit owner_uuid: ~ key: ~ diff --git a/api/config/fixtures/test/form.yaml b/api/config/fixtures/test/form.yaml index 9c8f314..e6b0479 100644 --- a/api/config/fixtures/test/form.yaml +++ b/api/config/fixtures/test/form.yaml @@ -81,6 +81,7 @@ objects: prototype: uuid: ~ + created_at: ~ owner: BusinessUnit owner_uuid: ~ type: ~ diff --git a/api/config/fixtures/test/metadata.yaml b/api/config/fixtures/test/metadata.yaml index 9c04db1..8dead2d 100644 --- a/api/config/fixtures/test/metadata.yaml +++ b/api/config/fixtures/test/metadata.yaml @@ -33,6 +33,7 @@ objects: prototype: uuid: ~ + created_at: ~ owner: BusinessUnit owner_uuid: ~ title: {} diff --git a/api/config/fixtures/test/system/tenant.yaml b/api/config/fixtures/test/system/tenant.yaml index 748d82c..77cf647 100644 --- a/api/config/fixtures/test/system/tenant.yaml +++ b/api/config/fixtures/test/system/tenant.yaml @@ -5,4 +5,5 @@ objects: prototype: uuid: ~ + created_at: ~ data: {} diff --git a/api/docker/php/docker-entrypoint.sh b/api/docker/php/docker-entrypoint.sh index 95668d2..bf12dce 100644 --- a/api/docker/php/docker-entrypoint.sh +++ b/api/docker/php/docker-entrypoint.sh @@ -8,8 +8,8 @@ fi if [ "$1" = 'php-fpm' ] || [ "$1" = 'bin/console' ]; then mkdir -p var/cache var/log - setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX var - setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var +# setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX var +# setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var if [ "$APP_ENV" != 'prod' ]; then composer install --prefer-dist --no-progress --no-suggest --no-interaction diff --git a/api/features/api/access/add.feature b/api/features/api/access/add.feature index fdae0d8..973c8be 100644 --- a/api/features/api/access/add.feature +++ b/api/features/api/access/add.feature @@ -10,6 +10,7 @@ Feature: Add accesses And I send a "POST" request to "/accesses" with body: """ { + "createdAt": "2000-01-01 12:00:00", "owner": "BusinessUnit", "ownerUuid": "325e1004-8516-4ca9-a4d3-d7505bd9a7fe", "assignee": "Anonymous", @@ -25,6 +26,7 @@ Feature: Add accesses And the JSON node "id" should be equal to the number 19 And the JSON node "uuid" should exist And the JSON node "createdAt" should exist + And the JSON node "createdAt" should be equal to the string "2000-01-01T12:00:00+00:00" And the JSON node "updatedAt" should exist And the JSON node "owner" should exist And the JSON node "owner" should be equal to the string "BusinessUnit" diff --git a/api/features/api/access/edit.feature b/api/features/api/access/edit.feature index 61bb1ec..5fe52e2 100644 --- a/api/features/api/access/edit.feature +++ b/api/features/api/access/edit.feature @@ -10,6 +10,7 @@ Feature: Edit accesses And I send a "PUT" request to "/accesses/33bb0f56-d7f9-49ef-af4f-9ea5a71adf67" with body: """ { + "createdAt": "2000-01-01 12:00:00", "owner": "System", "ownerUuid": "aa18b644-a503-49fa-8f53-10f4c1f8e3a1", "assignee": "System", @@ -20,6 +21,7 @@ Feature: Edit accesses Then the response status code should be 200 And the header "Content-Type" should be equal to "application/json; charset=utf-8" And the response should be in JSON + And the JSON node "createdAt" should be equal to the string "2000-01-01T12:00:00+00:00" And the JSON node "owner" should be equal to the string "System" And the JSON node "ownerUuid" should be equal to the string "aa18b644-a503-49fa-8f53-10f4c1f8e3a1" And the JSON node "assignee" should be equal to the string "System" @@ -32,6 +34,7 @@ Feature: Edit accesses Then the response status code should be 200 And the header "Content-Type" should be equal to "application/json; charset=utf-8" And the response should be in JSON + And the JSON node "createdAt" should be equal to the string "2000-01-01T12:00:00+00:00" And the JSON node "owner" should be equal to the string "System" And the JSON node "ownerUuid" should be equal to the string "aa18b644-a503-49fa-8f53-10f4c1f8e3a1" And the JSON node "assignee" should be equal to the string "System" @@ -46,7 +49,6 @@ Feature: Edit accesses { "id": 9999, "uuid": "1ac1b01e-4934-4b89-8a43-7d17a849be61", - "createdAt":"2000-01-01T12:00:00+00:00", "updatedAt":"2000-01-01T12:00:00+00:00", "version": 2, "tenant": "93377748-2abb-4e33-9027-5d8a5c281a41" @@ -57,7 +59,6 @@ Feature: Edit accesses And the response should be in JSON And the JSON node "id" should be equal to the number 1 And the JSON node "uuid" should be equal to the string "33bb0f56-d7f9-49ef-af4f-9ea5a71adf67" - And the JSON node "createdAt" should not contain "2000-01-01T12:00:00+00:00" And the JSON node "updatedAt" should not contain "2000-01-01T12:00:00+00:00" And the JSON node "tenant" should be equal to "b6ac25fe-3cd6-4100-a054-6bba2fc9ef18" @@ -69,7 +70,6 @@ Feature: Edit accesses And the response should be in JSON And the JSON node "id" should be equal to the number 1 And the JSON node "uuid" should be equal to the string "33bb0f56-d7f9-49ef-af4f-9ea5a71adf67" - And the JSON node "createdAt" should not contain "2000-01-01T12:00:00+00:00" And the JSON node "updatedAt" should not contain "2000-01-01T12:00:00+00:00" And the JSON node "tenant" should be equal to "b6ac25fe-3cd6-4100-a054-6bba2fc9ef18" diff --git a/api/features/api/config/edit.feature b/api/features/api/config/edit.feature index b3cf762..d42d56b 100644 --- a/api/features/api/config/edit.feature +++ b/api/features/api/config/edit.feature @@ -10,6 +10,7 @@ Feature: Edit configs And I send a "PUT" request to "/configs/45e84ac7-b6cd-4742-a668-47474c775850" with body: """ { + "createdAt": "2000-01-01 12:00:00", "value": "system2@system.ds", "version": 1 } @@ -17,6 +18,7 @@ Feature: Edit configs Then the response status code should be 200 And the header "Content-Type" should be equal to "application/json; charset=utf-8" And the response should be in JSON + And the JSON node "createdAt" should be equal to the string "2000-01-01T12:00:00+00:00" And the JSON node "value" should be equal to the string "system2@system.ds" And the JSON node "version" should be equal to the number 2 @@ -26,6 +28,7 @@ Feature: Edit configs Then the response status code should be 200 And the header "Content-Type" should be equal to "application/json; charset=utf-8" And the response should be in JSON + And the JSON node "createdAt" should be equal to the string "2000-01-01T12:00:00+00:00" And the JSON node "value" should be equal to the string "system2@system.ds" And the JSON node "version" should be equal to the number 2 @@ -37,7 +40,6 @@ Feature: Edit configs { "id": 9999, "uuid": "1ac1b01e-4934-4b89-8a43-7d17a849be61", - "createdAt":"2000-01-01T12:00:00+00:00", "updatedAt":"2000-01-01T12:00:00+00:00", "owner": "System", "ownerUuid": "5f8630dd-4739-4573-bcf6-9133416e4311", @@ -51,7 +53,6 @@ Feature: Edit configs And the response should be in JSON And the JSON node "id" should be equal to the number 1 And the JSON node "uuid" should be equal to the string "45e84ac7-b6cd-4742-a668-47474c775850" - And the JSON node "createdAt" should not contain "2000-01-01T12:00:00+00:00" And the JSON node "updatedAt" should not contain "2000-01-01T12:00:00+00:00" And the JSON node "owner" should be equal to "BusinessUnit" And the JSON node "ownerUuid" should be equal to "325e1004-8516-4ca9-a4d3-d7505bd9a7fe" @@ -66,7 +67,6 @@ Feature: Edit configs And the response should be in JSON And the JSON node "id" should be equal to the number 1 And the JSON node "uuid" should be equal to the string "45e84ac7-b6cd-4742-a668-47474c775850" - And the JSON node "createdAt" should not contain "2000-01-01T12:00:00+00:00" And the JSON node "updatedAt" should not contain "2000-01-01T12:00:00+00:00" And the JSON node "owner" should be equal to "BusinessUnit" And the JSON node "ownerUuid" should be equal to "325e1004-8516-4ca9-a4d3-d7505bd9a7fe" diff --git a/api/features/api/metadata/add.feature b/api/features/api/metadata/add.feature index b5fc857..f67bf2c 100644 --- a/api/features/api/metadata/add.feature +++ b/api/features/api/metadata/add.feature @@ -10,6 +10,7 @@ Feature: Add metadata And I send a "POST" request to "/metadata" with body: """ { + "createdAt": "2000-01-01 12:00:00", "owner": "BusinessUnit", "ownerUuid": "325e1004-8516-4ca9-a4d3-d7505bd9a7fe", "title": { @@ -31,6 +32,7 @@ Feature: Add metadata And the JSON node "id" should be equal to the number 3 And the JSON node "uuid" should exist And the JSON node "createdAt" should exist + And the JSON node "createdAt" should be equal to the string "2000-01-01T12:00:00+00:00" And the JSON node "updatedAt" should exist And the JSON node "deletedAt" should exist And the JSON node "owner" should exist diff --git a/api/features/api/metadata/edit.feature b/api/features/api/metadata/edit.feature index 2e75b59..7891ed3 100644 --- a/api/features/api/metadata/edit.feature +++ b/api/features/api/metadata/edit.feature @@ -10,6 +10,7 @@ Feature: Edit metadata And I send a "PUT" request to "/metadata/a6494d01-3906-4f42-bbce-4fc60067a795" with body: """ { + "createdAt": "2000-01-01 12:00:00", "owner": "System", "ownerUuid": "aa18b644-a503-49fa-8f53-10f4c1f8e3a1", "title": { @@ -27,6 +28,7 @@ Feature: Edit metadata Then the response status code should be 200 And the header "Content-Type" should be equal to "application/json; charset=utf-8" And the response should be in JSON + And the JSON node "createdAt" should be equal to the string "2000-01-01T12:00:00+00:00" And the JSON node "owner" should be equal to the string "System" And the JSON node "ownerUuid" should be equal to the string "aa18b644-a503-49fa-8f53-10f4c1f8e3a1" And the JSON node "title.en" should be equal to the string "Title - edit" @@ -42,6 +44,7 @@ Feature: Edit metadata Then the response status code should be 200 And the header "Content-Type" should be equal to "application/json; charset=utf-8" And the response should be in JSON + And the JSON node "createdAt" should be equal to the string "2000-01-01T12:00:00+00:00" And the JSON node "owner" should be equal to the string "System" And the JSON node "ownerUuid" should be equal to the string "aa18b644-a503-49fa-8f53-10f4c1f8e3a1" And the JSON node "title.en" should be equal to the string "Title - edit" @@ -59,7 +62,6 @@ Feature: Edit metadata { "id": 9999, "uuid": "421aebbb-e62e-4b87-bced-42921456131b", - "createdAt":"2000-01-01T12:00:00+00:00", "updatedAt":"2000-01-01T12:00:00+00:00", "version": 2, "tenant": "93377748-2abb-4e33-9027-5d8a5c281a41" @@ -70,7 +72,6 @@ Feature: Edit metadata And the response should be in JSON And the JSON node "id" should be equal to the number 1 And the JSON node "uuid" should be equal to the string "a6494d01-3906-4f42-bbce-4fc60067a795" - And the JSON node "createdAt" should not contain "2000-01-01T12:00:00+00:00" And the JSON node "updatedAt" should not contain "2000-01-01T12:00:00+00:00" And the JSON node "tenant" should be equal to "b6ac25fe-3cd6-4100-a054-6bba2fc9ef18" @@ -82,7 +83,6 @@ Feature: Edit metadata And the response should be in JSON And the JSON node "id" should be equal to the number 1 And the JSON node "uuid" should be equal to the string "a6494d01-3906-4f42-bbce-4fc60067a795" - And the JSON node "createdAt" should not contain "2000-01-01T12:00:00+00:00" And the JSON node "updatedAt" should not contain "2000-01-01T12:00:00+00:00" And the JSON node "tenant" should be equal to "b6ac25fe-3cd6-4100-a054-6bba2fc9ef18" diff --git a/api/src/Entity/Form.php b/api/src/Entity/Form.php index 1ee4481..5fcce6d 100644 --- a/api/src/Entity/Form.php +++ b/api/src/Entity/Form.php @@ -94,8 +94,9 @@ class Form implements Identifiable, Uuidentifiable, Ownable, Translatable, Local /** * @var \DateTime - * @ApiProperty(writable=false) - * @Serializer\Groups({"form_output"}) + * @ApiProperty + * @Serializer\Groups({"form_output", "form_input"}) + * @Assert\DateTime */ protected $createdAt; diff --git a/api/src/Fixture/Form.php b/api/src/Fixture/Form.php index 4d02104..d6ca95c 100644 --- a/api/src/Fixture/Form.php +++ b/api/src/Fixture/Form.php @@ -3,6 +3,7 @@ namespace App\Fixture; use App\Entity\Form as FormEntity; +use DateTime; use Doctrine\Common\Persistence\ObjectManager; use Ds\Component\Api\Api\Api; use Ds\Component\Config\Service\ConfigService; @@ -71,6 +72,12 @@ public function load(ObjectManager $manager) ->setType($object->type) ->setTenant($object->tenant); + if (null !== $object->created_at) { + $date = new DateTime; + $date->setTimestamp($object->created_at); + $form->setCreatedAt($date); + } + switch ($object->type) { case FormEntity::TYPE_FORMIO: $config = $object->config; From 24a4aa4acd7e61cb3c3b0410fe07c5679532bac5 Mon Sep 17 00:00:00 2001 From: marioprudhomme Date: Sun, 30 Aug 2020 15:21:50 -0400 Subject: [PATCH 11/16] Enable write on entity created_at properties --- api/features/api/system/tenant/add.feature | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/features/api/system/tenant/add.feature b/api/features/api/system/tenant/add.feature index ae37de8..5fe9bc2 100644 --- a/api/features/api/system/tenant/add.feature +++ b/api/features/api/system/tenant/add.feature @@ -10,6 +10,7 @@ Feature: Add tenant And I send a "POST" request to "/system/tenants" with body: """ { + "createdAt": "2000-01-01 12:00:00", "uuid": "3b0f1019-e9b6-458d-b9ad-fd60c079ee7b", "data": { "user": { @@ -70,6 +71,7 @@ Feature: Add tenant And the JSON node "uuid" should exist And the JSON node "uuid" should be equal to "3b0f1019-e9b6-458d-b9ad-fd60c079ee7b" And the JSON node "createdAt" should exist + And the JSON node "createdAt" should be equal to the string "2000-01-01T12:00:00+00:00" And the JSON node "updatedAt" should exist And the JSON node "version" should exist And the JSON node "version" should be equal to the number 1 From c83c4caccb90202a005a13d6d1079dac605faaf7 Mon Sep 17 00:00:00 2001 From: marioprudhomme Date: Mon, 31 Aug 2020 06:42:59 -0400 Subject: [PATCH 12/16] Fix var directory permissions --- api/docker/php/docker-entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/docker/php/docker-entrypoint.sh b/api/docker/php/docker-entrypoint.sh index bf12dce..95668d2 100644 --- a/api/docker/php/docker-entrypoint.sh +++ b/api/docker/php/docker-entrypoint.sh @@ -8,8 +8,8 @@ fi if [ "$1" = 'php-fpm' ] || [ "$1" = 'bin/console' ]; then mkdir -p var/cache var/log -# setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX var -# setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var + setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX var + setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var if [ "$APP_ENV" != 'prod' ]; then composer install --prefer-dist --no-progress --no-suggest --no-interaction From 9cbec7e7480a888eb442e0bbc25cad4954794edd Mon Sep 17 00:00:00 2001 From: marioprudhomme Date: Sat, 12 Sep 2020 08:56:48 -0400 Subject: [PATCH 13/16] Add graffiti form scenario --- api/config/fixtures/dev/form.yaml | 36 ++++++++ .../components/graffiti-report-review.json | 88 +++++++++++++++++++ .../formio/components/graffiti-report.json | 53 +++++++++++ 3 files changed, 177 insertions(+) create mode 100644 api/config/fixtures/dev/forms/formio/components/graffiti-report-review.json create mode 100644 api/config/fixtures/dev/forms/formio/components/graffiti-report.json diff --git a/api/config/fixtures/dev/form.yaml b/api/config/fixtures/dev/form.yaml index 17085aa..de89bd6 100644 --- a/api/config/fixtures/dev/form.yaml +++ b/api/config/fixtures/dev/form.yaml @@ -35,6 +35,42 @@ objects: en: Description ... fr: Description ... + - uuid: aa6433d9-01b9-4d65-94b7-279eed5f9397 + type: formio + config: + title: Graffiti Report + display: form + type: form + name: graffiti-report + path: graffiti-report + tags: [graffiti] + components: forms/formio/components/graffiti-report.json + submissionAccess: forms/formio/submission_access/anonymous.json + title: + en: Graffiti Report + fr: Signaler un graffiti + description: + en: Description ... + fr: Description ... + + - uuid: 6fc8ae28-16a8-4582-be5e-25b296862d76 + type: formio + config: + title: Graffiti Report Review + display: form + type: form + name: graffiti-report-review + path: graffiti-report-review + tags: [graffiti] + components: forms/formio/components/graffiti-report-review.json + submissionAccess: forms/formio/submission_access/anonymous.json + title: + en: Graffiti Report Review + fr: Examen du signalement d'un graffiti + description: + en: Description ... + fr: Description ... + prototype: uuid: ~ created_at: ~ diff --git a/api/config/fixtures/dev/forms/formio/components/graffiti-report-review.json b/api/config/fixtures/dev/forms/formio/components/graffiti-report-review.json new file mode 100644 index 0000000..5676628 --- /dev/null +++ b/api/config/fixtures/dev/forms/formio/components/graffiti-report-review.json @@ -0,0 +1,88 @@ +[ + { + "properties": {}, + "tags": [], + "labelPosition": "top", + "hideLabel": false, + "type": "textfield", + "conditional": { + "eq": "", + "when": null, + "show": "" + }, + "validate": { + "customPrivate": false, + "custom": "", + "pattern": "", + "maxLength": "", + "minLength": "", + "required": false + }, + "clearOnHide": true, + "hidden": false, + "persistent": true, + "unique": false, + "protected": false, + "defaultValue": "", + "multiple": false, + "suffix": "", + "prefix": "", + "placeholder": "", + "key": "description", + "label": "Description", + "inputMask": "", + "inputType": "text", + "tableView": true, + "input": true + }, + { + "conditional": { + "eq": "", + "when": null, + "show": "" + }, + "optionsLabelPosition": "right", + "labelPosition": "top", + "hideLabel": false, + "type": "selectboxes", + "validate": { + "required": true + }, + "clearOnHide": true, + "hidden": false, + "persistent": true, + "protected": false, + "inline": false, + "values": [ + { + "shortcut": "", + "label": "yes", + "value": "yes" + }, + { + "shortcut": "", + "label": "no", + "value": "no" + } + ], + "key": "approved", + "label": "Approved", + "tableView": true, + "input": true + }, + { + "hideLabel": false, + "type": "button", + "theme": "primary", + "disableOnInvalid": false, + "action": "submit", + "block": false, + "rightIcon": "", + "leftIcon": "", + "size": "md", + "key": "submit", + "tableView": false, + "label": "Submit", + "input": true + } +] \ No newline at end of file diff --git a/api/config/fixtures/dev/forms/formio/components/graffiti-report.json b/api/config/fixtures/dev/forms/formio/components/graffiti-report.json new file mode 100644 index 0000000..4f663d6 --- /dev/null +++ b/api/config/fixtures/dev/forms/formio/components/graffiti-report.json @@ -0,0 +1,53 @@ +[ + { + "input": true, + "tableView": true, + "inputType": "text", + "inputMask": "", + "label": "Description", + "key": "description", + "placeholder": "", + "prefix": "", + "suffix": "", + "multiple": false, + "defaultValue": "", + "protected": false, + "unique": false, + "persistent": true, + "hidden": false, + "clearOnHide": true, + "validate": { + "required": true, + "minLength": "", + "maxLength": "", + "pattern": "", + "custom": "", + "customPrivate": false + }, + "conditional": { + "show": "", + "when": null, + "eq": "" + }, + "type": "textfield", + "hideLabel": false, + "labelPosition": "top", + "tags": [], + "properties": {} + }, + { + "input": true, + "label": "Submit", + "tableView": false, + "key": "submit", + "size": "md", + "leftIcon": "", + "rightIcon": "", + "block": false, + "action": "submit", + "disableOnInvalid": false, + "theme": "primary", + "type": "button", + "hideLabel": false + } +] \ No newline at end of file From c1f9a9452496c4655f57208cdd03f6d41cfcfd11 Mon Sep 17 00:00:00 2001 From: marioprudhomme Date: Wed, 16 Sep 2020 19:44:29 -0400 Subject: [PATCH 14/16] Update composer dependencies --- api/composer.json | 1 + api/composer.lock | 145 +++++++++++++++++++++++----------------------- 2 files changed, 74 insertions(+), 72 deletions(-) diff --git a/api/composer.json b/api/composer.json index f671f4c..8c0c3a9 100644 --- a/api/composer.json +++ b/api/composer.json @@ -15,6 +15,7 @@ "doctrine/doctrine-fixtures-bundle": "^3.0", "doctrine/doctrine-migrations-bundle": "^1.3", "guzzlehttp/guzzle": "^6.3", + "justinrainbow/json-schema": "^5.0", "knplabs/doctrine-behaviors": "^1.5", "lexik/jwt-authentication-bundle": "^2.6", "ramsey/uuid": "^3.8", diff --git a/api/composer.lock b/api/composer.lock index fc306a0..f2d476b 100644 --- a/api/composer.lock +++ b/api/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "cc76cb7d67f0d82d7f881c264dd55278", + "content-hash": "7267a4ed82d14def2435bb6e19ce484c", "packages": [ { "name": "api-platform/api-pack", @@ -334,12 +334,12 @@ "source": { "type": "git", "url": "https://github.com/DigitalState/Core.git", - "reference": "c762a4f7a9ed1815742564d7890f8652d65dc3d0" + "reference": "ddd320c3aacb7c5e7bdb962b5d2715abcb1dd9d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DigitalState/Core/zipball/c762a4f7a9ed1815742564d7890f8652d65dc3d0", - "reference": "c762a4f7a9ed1815742564d7890f8652d65dc3d0", + "url": "https://api.github.com/repos/DigitalState/Core/zipball/ddd320c3aacb7c5e7bdb962b5d2715abcb1dd9d2", + "reference": "ddd320c3aacb7c5e7bdb962b5d2715abcb1dd9d2", "shasum": "" }, "require": { @@ -1947,6 +1947,72 @@ ], "time": "2014-01-12T16:20:24+00:00" }, + { + "name": "justinrainbow/json-schema", + "version": "5.2.10", + "source": { + "type": "git", + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b", + "reference": "2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", + "json-schema/json-schema-test-suite": "1.2.0", + "phpunit/phpunit": "^4.8.35" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "time": "2020-05-27T16:41:55+00:00" + }, { "name": "knplabs/doctrine-behaviors", "version": "1.6.0", @@ -7000,6 +7066,7 @@ ], "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", "homepage": "https://github.com/container-interop/container-interop", + "abandoned": "psr/container", "time": "2017-02-14T19:40:03+00:00" }, { @@ -7007,12 +7074,12 @@ "version": "0.9.1", "source": { "type": "git", - "url": "https://github.com/njh/easyrdf.git", + "url": "https://github.com/easyrdf/easyrdf.git", "reference": "acd09dfe0555fbcfa254291e433c45fdd4652566" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/njh/easyrdf/zipball/acd09dfe0555fbcfa254291e433c45fdd4652566", + "url": "https://api.github.com/repos/easyrdf/easyrdf/zipball/acd09dfe0555fbcfa254291e433c45fdd4652566", "reference": "acd09dfe0555fbcfa254291e433c45fdd4652566", "shasum": "" }, @@ -7160,72 +7227,6 @@ "description": "A tool to automatically fix PHP code style", "time": "2019-01-04T18:29:47+00:00" }, - { - "name": "justinrainbow/json-schema", - "version": "5.2.8", - "source": { - "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "dcb6e1006bb5fd1e392b4daa68932880f37550d4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/dcb6e1006bb5fd1e392b4daa68932880f37550d4", - "reference": "dcb6e1006bb5fd1e392b4daa68932880f37550d4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "~2.2.20", - "json-schema/json-schema-test-suite": "1.2.0", - "phpunit/phpunit": "^4.8.35" - }, - "bin": [ - "bin/validate-json" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "JsonSchema\\": "src/JsonSchema/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bruno Prieto Reis", - "email": "bruno.p.reis@gmail.com" - }, - { - "name": "Justin Rainbow", - "email": "justin.rainbow@gmail.com" - }, - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - }, - { - "name": "Robert Schönthal", - "email": "seroscho@googlemail.com" - } - ], - "description": "A library to validate a json schema.", - "homepage": "https://github.com/justinrainbow/json-schema", - "keywords": [ - "json", - "schema" - ], - "time": "2019-01-14T23:55:14+00:00" - }, { "name": "league/html-to-markdown", "version": "4.8.1", From 1f855142c5b5ccefd82af43a4e01738c245a571c Mon Sep 17 00:00:00 2001 From: marioprudhomme Date: Sat, 31 Oct 2020 17:01:40 -0400 Subject: [PATCH 15/16] Set composer version in dockerfile --- api/Dockerfile-php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/Dockerfile-php b/api/Dockerfile-php index e316e63..18474ad 100644 --- a/api/Dockerfile-php +++ b/api/Dockerfile-php @@ -46,7 +46,7 @@ RUN set -eux; \ \ apk del .build-deps -COPY --from=composer:latest /usr/bin/composer /usr/bin/composer +COPY --from=composer:1.10.16 /usr/bin/composer /usr/bin/composer COPY docker/php/php.ini /usr/local/etc/php/php.ini # https://getcomposer.org/doc/03-cli.md#composer-allow-superuser From f82c227534f71f121c0632330c6200acab278139 Mon Sep 17 00:00:00 2001 From: marioprudhomme Date: Tue, 2 Feb 2021 19:13:54 -0500 Subject: [PATCH 16/16] Remove deprecated dependency checker service --- .travis.yml | 1 - api/composer.json | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5b9cc6a..4fce1a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,6 @@ before_install: script: - docker-compose -f docker-compose.yml -f docker-compose.test.yml up -d - while true; do output=`docker-compose exec -T php pidof php-fpm | cat`; if [[ ! -z "${output}" ]]; then break; fi; sleep 1; done; - - docker-compose -f docker-compose.yml -f docker-compose.test.yml exec php php bin/console security:check - docker-compose -f docker-compose.yml -f docker-compose.test.yml exec php php bin/console doctrine:migration:migrate --no-interaction - docker-compose -f docker-compose.yml -f docker-compose.test.yml exec -e FIXTURES=test php php bin/console doctrine:fixtures:load --no-interaction - docker-compose -f docker-compose.yml -f docker-compose.test.yml exec php vendor/bin/behat diff --git a/api/composer.json b/api/composer.json index 8c0c3a9..e14e131 100644 --- a/api/composer.json +++ b/api/composer.json @@ -68,8 +68,7 @@ "auto-scripts": { "cache:clear": "symfony-cmd", "assets:install": "symfony-cmd", - "assets:install %PUBLIC_DIR%": "symfony-cmd", - "security-checker security:check": "script" + "assets:install %PUBLIC_DIR%": "symfony-cmd" }, "post-install-cmd": [ "@auto-scripts"