diff --git a/.env.test b/.env.test
new file mode 100644
index 0000000..9e7162f
--- /dev/null
+++ b/.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
diff --git a/.gitignore b/.gitignore
index 19d00a8..2574338 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,13 @@
###> lexik/jwt-authentication-bundle ###
/config/jwt/*.pem
###< lexik/jwt-authentication-bundle ###
+
+###> symfony/phpunit-bridge ###
+.phpunit.result.cache
+/phpunit.xml
+###< symfony/phpunit-bridge ###
+
+###> phpunit/phpunit ###
+/phpunit.xml
+.phpunit.result.cache
+###< phpunit/phpunit ###
diff --git a/README.md b/README.md
index df93e13..4aeaad1 100644
--- a/README.md
+++ b/README.md
@@ -5,6 +5,14 @@
ogCore es el servicio central de OpenGnsys, diseñado para proporcionar funcionalidades a través de una API RESTful. Esta herramienta utiliza tecnología PHP, aprovechando el framework Symfony y el ORM Doctrine para gestionar la base de datos.
A continuación, se detallan los pasos necesarios para desplegar el proyecto en un entorno de desarrollo.
+## Versiones y tecnologías utilizadas
+
+- PHP 8.3
+- Symfony 6.4
+- Doctrine 2.19
+- API Platform 3.2
+- MariaDB 10.11
+
## Requisitos
Antes de comenzar, asegúrate de tener los siguientes requisitos:
@@ -39,14 +47,14 @@ Y deberiamos ver algo parecido a :
```sh
docker exec ogcore-php composer install
-docker exec ogcore-php symfony console lexik:jwt:generate-keypair --overwrite
+docker exec ogcore-php php bin/console lexik:jwt:generate-keypair --overwrite
```
Comprobamos, que el contenedor de Nginx, tiene el puerto 8080 levantado correctamente, asi que tan solo tendremos que
acceder a la siguiente URL:
```sh
-http://127.0.0.1:8080/api/docs
+http://127.0.0.1:8080/docs
```
Si todo ha ido bien, deberiamos ver la documentación de la API de ogCore.
@@ -55,9 +63,45 @@ Para poder actualizar la base de datos:
Para inicializar la base de datos:
```sh
-docker exec ogcore-php symfony console doctrine:migrations:migrate --no-interaction
+docker exec ogcore-php php bin/console doctrine:migrations:migrate --no-interaction
```
```sh
-docker exec ogcore-php symfony console doctrine:fixtures:load --no-interaction
+docker exec ogcore-php php bin/console doctrine:fixtures:load --no-interaction
+docker exec ogcore-php php bin/console app:load-default-user-groups
+```
+
+## UX Api Platform
+
+Api Platform proporciona una interfaz de usuario para interactuar con la API de ogCore. Para acceder a la interfaz de usuario, accede a la siguiente URL:
+
+```sh
+http://127.0.0.1:8080/docs
+```
+
+Para poder autenticarte, necesitas un token JWT. Para obtenerlo, accedemos al endpoint de autenticación "auth/login":
+
+
+
+Obtenemos el token y lo introducimos en la interfaz de usuario de Api Platform de la siguiente manera:
+
+
+
+Ahora, ya podemos interactuar con la API de ogCore. Para comprobar que todo está correcto, podemos fijarnos en los headers de las llamadas Curl, y ver que el token JWT se ha introducido correctamente.
+
+## Test
+
+Para ejecutar los test, ejecutamos el siguiente comando:
+
+```sh
+docker compose exec php bin/phpunit
+```
+
+## Reiniciar base de datos
+
+Es posible que en momentos de desarrollo, sea necesario volver a cargar la base de datos y actualizar los esquemas de la misma, para ello, ejecutamos el siguiente comando:
+
+```sh
+docker exec ogcore-php php bin/console doctrine:database:drop --force
+docker exec ogcore-php php bin/console doctrine:database:create
```
diff --git a/bin/phpunit b/bin/phpunit
new file mode 100755
index 0000000..692bacc
--- /dev/null
+++ b/bin/phpunit
@@ -0,0 +1,23 @@
+#!/usr/bin/env php
+= 80000) {
+ require dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit';
+ } else {
+ define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php');
+ require PHPUNIT_COMPOSER_INSTALL;
+ PHPUnit\TextUI\Command::main();
+ }
+} else {
+ if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
+ echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
+ exit(1);
+ }
+
+ require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
+}
diff --git a/composer.json b/composer.json
index d3ac35b..4a2dab4 100644
--- a/composer.json
+++ b/composer.json
@@ -11,12 +11,14 @@
"doctrine/dbal": "^3",
"doctrine/doctrine-bundle": "^2.12",
"doctrine/doctrine-migrations-bundle": "^3.3",
- "doctrine/orm": "^3.1",
+ "doctrine/orm": "^2.19.5",
"gesdinet/jwt-refresh-token-bundle": "^1.3",
"lexik/jwt-authentication-bundle": "^3.0",
"nelmio/cors-bundle": "^2.4",
"phpdocumentor/reflection-docblock": "^5.4",
"phpstan/phpdoc-parser": "^1.29",
+ "ramsey/uuid-doctrine": "^2.0",
+ "stof/doctrine-extensions-bundle": "^1.10",
"symfony/asset": "6.4.*",
"symfony/console": "6.4.*",
"symfony/dotenv": "6.4.*",
@@ -81,8 +83,14 @@
}
},
"require-dev": {
+ "dama/doctrine-test-bundle": "^8.1",
"doctrine/doctrine-fixtures-bundle": "^3.6",
+ "phpunit/phpunit": "^9.5",
+ "symfony/browser-kit": "6.4.*",
+ "symfony/css-selector": "6.4.*",
+ "symfony/http-client": "6.4.*",
"symfony/maker-bundle": "^1.59",
+ "symfony/phpunit-bridge": "^7.0",
"symfony/web-profiler-bundle": "^6.4",
"zenstruck/foundry": "^1.37"
}
diff --git a/composer.lock b/composer.lock
index d56a6e3..2b0b43f 100644
--- a/composer.lock
+++ b/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": "d621ba18aa396cb809e0ea1ea8b815d5",
+ "content-hash": "e953b0066fb773aaf6b3835086280c86",
"packages": [
{
"name": "api-platform/core",
@@ -194,6 +194,115 @@
},
"time": "2024-05-10T11:16:59+00:00"
},
+ {
+ "name": "behat/transliterator",
+ "version": "v1.5.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Behat/Transliterator.git",
+ "reference": "baac5873bac3749887d28ab68e2f74db3a4408af"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Behat/Transliterator/zipball/baac5873bac3749887d28ab68e2f74db3a4408af",
+ "reference": "baac5873bac3749887d28ab68e2f74db3a4408af",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2"
+ },
+ "require-dev": {
+ "chuyskywalker/rolling-curl": "^3.1",
+ "php-yaoi/php-yaoi": "^1.0",
+ "phpunit/phpunit": "^8.5.25 || ^9.5.19"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Behat\\Transliterator\\": "src/Behat/Transliterator"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Artistic-1.0"
+ ],
+ "description": "String transliterator",
+ "keywords": [
+ "i18n",
+ "slug",
+ "transliterator"
+ ],
+ "support": {
+ "issues": "https://github.com/Behat/Transliterator/issues",
+ "source": "https://github.com/Behat/Transliterator/tree/v1.5.0"
+ },
+ "time": "2022-03-30T09:27:43+00:00"
+ },
+ {
+ "name": "brick/math",
+ "version": "0.12.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/brick/math.git",
+ "reference": "f510c0a40911935b77b86859eb5223d58d660df1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/brick/math/zipball/f510c0a40911935b77b86859eb5223d58d660df1",
+ "reference": "f510c0a40911935b77b86859eb5223d58d660df1",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^8.1"
+ },
+ "require-dev": {
+ "php-coveralls/php-coveralls": "^2.2",
+ "phpunit/phpunit": "^10.1",
+ "vimeo/psalm": "5.16.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Brick\\Math\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Arbitrary-precision arithmetic library",
+ "keywords": [
+ "Arbitrary-precision",
+ "BigInteger",
+ "BigRational",
+ "arithmetic",
+ "bigdecimal",
+ "bignum",
+ "bignumber",
+ "brick",
+ "decimal",
+ "integer",
+ "math",
+ "mathematics",
+ "rational"
+ ],
+ "support": {
+ "issues": "https://github.com/brick/math/issues",
+ "source": "https://github.com/brick/math/tree/0.12.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/BenMorel",
+ "type": "github"
+ }
+ ],
+ "time": "2023-11-29T23:19:16+00:00"
+ },
{
"name": "doctrine/cache",
"version": "2.2.0",
@@ -373,6 +482,97 @@
],
"time": "2024-04-18T06:56:21+00:00"
},
+ {
+ "name": "doctrine/common",
+ "version": "3.4.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/common.git",
+ "reference": "0aad4b7ab7ce8c6602dfbb1e1a24581275fb9d1a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/common/zipball/0aad4b7ab7ce8c6602dfbb1e1a24581275fb9d1a",
+ "reference": "0aad4b7ab7ce8c6602dfbb1e1a24581275fb9d1a",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/persistence": "^2.0 || ^3.0",
+ "php": "^7.1 || ^8.0"
+ },
+ "require-dev": {
+ "doctrine/coding-standard": "^9.0 || ^10.0",
+ "doctrine/collections": "^1",
+ "phpstan/phpstan": "^1.4.1",
+ "phpstan/phpstan-phpunit": "^1",
+ "phpunit/phpunit": "^7.5.20 || ^8.5 || ^9.0",
+ "squizlabs/php_codesniffer": "^3.0",
+ "symfony/phpunit-bridge": "^6.1",
+ "vimeo/psalm": "^4.4"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Doctrine\\Common\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com"
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org"
+ },
+ {
+ "name": "Benjamin Eberlei",
+ "email": "kontakt@beberlei.de"
+ },
+ {
+ "name": "Jonathan Wage",
+ "email": "jonwage@gmail.com"
+ },
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com"
+ },
+ {
+ "name": "Marco Pivetta",
+ "email": "ocramius@gmail.com"
+ }
+ ],
+ "description": "PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, proxies and much more.",
+ "homepage": "https://www.doctrine-project.org/projects/common.html",
+ "keywords": [
+ "common",
+ "doctrine",
+ "php"
+ ],
+ "support": {
+ "issues": "https://github.com/doctrine/common/issues",
+ "source": "https://github.com/doctrine/common/tree/3.4.4"
+ },
+ "funding": [
+ {
+ "url": "https://www.doctrine-project.org/sponsorship.html",
+ "type": "custom"
+ },
+ {
+ "url": "https://www.patreon.com/phpdoctrine",
+ "type": "patreon"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcommon",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-04-16T13:35:33+00:00"
+ },
{
"name": "doctrine/dbal",
"version": "3.8.4",
@@ -747,16 +947,16 @@
},
{
"name": "doctrine/event-manager",
- "version": "2.0.0",
+ "version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/event-manager.git",
- "reference": "750671534e0241a7c50ea5b43f67e23eb5c96f32"
+ "reference": "b680156fa328f1dfd874fd48c7026c41570b9c6e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/event-manager/zipball/750671534e0241a7c50ea5b43f67e23eb5c96f32",
- "reference": "750671534e0241a7c50ea5b43f67e23eb5c96f32",
+ "url": "https://api.github.com/repos/doctrine/event-manager/zipball/b680156fa328f1dfd874fd48c7026c41570b9c6e",
+ "reference": "b680156fa328f1dfd874fd48c7026c41570b9c6e",
"shasum": ""
},
"require": {
@@ -766,10 +966,10 @@
"doctrine/common": "<2.9"
},
"require-dev": {
- "doctrine/coding-standard": "^10",
+ "doctrine/coding-standard": "^12",
"phpstan/phpstan": "^1.8.8",
- "phpunit/phpunit": "^9.5",
- "vimeo/psalm": "^4.28"
+ "phpunit/phpunit": "^10.5",
+ "vimeo/psalm": "^5.24"
},
"type": "library",
"autoload": {
@@ -818,7 +1018,7 @@
],
"support": {
"issues": "https://github.com/doctrine/event-manager/issues",
- "source": "https://github.com/doctrine/event-manager/tree/2.0.0"
+ "source": "https://github.com/doctrine/event-manager/tree/2.0.1"
},
"funding": [
{
@@ -834,7 +1034,7 @@
"type": "tidelift"
}
],
- "time": "2022-10-12T20:59:15+00:00"
+ "time": "2024-05-22T20:47:39+00:00"
},
{
"name": "doctrine/inflector",
@@ -1178,48 +1378,61 @@
},
{
"name": "doctrine/orm",
- "version": "3.1.3",
+ "version": "2.19.5",
"source": {
"type": "git",
"url": "https://github.com/doctrine/orm.git",
- "reference": "8ca99fdfdca3dc129ed93124e95e7f88b791a354"
+ "reference": "94986af28452da42a46a4489d1c958a2e5d710e5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/orm/zipball/8ca99fdfdca3dc129ed93124e95e7f88b791a354",
- "reference": "8ca99fdfdca3dc129ed93124e95e7f88b791a354",
+ "url": "https://api.github.com/repos/doctrine/orm/zipball/94986af28452da42a46a4489d1c958a2e5d710e5",
+ "reference": "94986af28452da42a46a4489d1c958a2e5d710e5",
"shasum": ""
},
"require": {
"composer-runtime-api": "^2",
- "doctrine/collections": "^2.2",
- "doctrine/dbal": "^3.8.2 || ^4",
+ "doctrine/cache": "^1.12.1 || ^2.1.1",
+ "doctrine/collections": "^1.5 || ^2.1",
+ "doctrine/common": "^3.0.3",
+ "doctrine/dbal": "^2.13.1 || ^3.2",
"doctrine/deprecations": "^0.5.3 || ^1",
"doctrine/event-manager": "^1.2 || ^2",
"doctrine/inflector": "^1.4 || ^2.0",
"doctrine/instantiator": "^1.3 || ^2",
- "doctrine/lexer": "^3",
- "doctrine/persistence": "^3.3.1",
+ "doctrine/lexer": "^2 || ^3",
+ "doctrine/persistence": "^2.4 || ^3",
"ext-ctype": "*",
- "php": "^8.1",
+ "php": "^7.1 || ^8.0",
"psr/cache": "^1 || ^2 || ^3",
- "symfony/console": "^5.4 || ^6.0 || ^7.0",
- "symfony/var-exporter": "^6.3.9 || ^7.0"
+ "symfony/console": "^4.2 || ^5.0 || ^6.0 || ^7.0",
+ "symfony/polyfill-php72": "^1.23",
+ "symfony/polyfill-php80": "^1.16"
+ },
+ "conflict": {
+ "doctrine/annotations": "<1.13 || >= 3.0"
},
"require-dev": {
- "doctrine/coding-standard": "^12.0",
- "phpbench/phpbench": "^1.0",
- "phpstan/phpstan": "1.10.59",
- "phpunit/phpunit": "^10.4.0",
+ "doctrine/annotations": "^1.13 || ^2",
+ "doctrine/coding-standard": "^9.0.2 || ^12.0",
+ "phpbench/phpbench": "^0.16.10 || ^1.0",
+ "phpstan/phpstan": "~1.4.10 || 1.10.59",
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6",
"psr/log": "^1 || ^2 || ^3",
"squizlabs/php_codesniffer": "3.7.2",
- "symfony/cache": "^5.4 || ^6.2 || ^7.0",
- "vimeo/psalm": "5.22.2"
+ "symfony/cache": "^4.4 || ^5.4 || ^6.4 || ^7.0",
+ "symfony/var-exporter": "^4.4 || ^5.4 || ^6.2 || ^7.0",
+ "symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0 || ^7.0",
+ "vimeo/psalm": "4.30.0 || 5.22.2"
},
"suggest": {
"ext-dom": "Provides support for XSD validation for XML mapping files",
- "symfony/cache": "Provides cache support for Setup Tool with doctrine/cache 2.0"
+ "symfony/cache": "Provides cache support for Setup Tool with doctrine/cache 2.0",
+ "symfony/yaml": "If you want to use YAML Metadata Mapping Driver"
},
+ "bin": [
+ "bin/doctrine"
+ ],
"type": "library",
"autoload": {
"psr-4": {
@@ -1260,9 +1473,9 @@
],
"support": {
"issues": "https://github.com/doctrine/orm/issues",
- "source": "https://github.com/doctrine/orm/tree/3.1.3"
+ "source": "https://github.com/doctrine/orm/tree/2.19.5"
},
- "time": "2024-04-30T07:14:13+00:00"
+ "time": "2024-04-30T06:49:54+00:00"
},
{
"name": "doctrine/persistence",
@@ -1417,6 +1630,134 @@
},
"time": "2024-05-08T08:12:09+00:00"
},
+ {
+ "name": "gedmo/doctrine-extensions",
+ "version": "v3.15.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine-extensions/DoctrineExtensions.git",
+ "reference": "2a89103f4984d8970f3855284c8c04e6e6a63c0f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine-extensions/DoctrineExtensions/zipball/2a89103f4984d8970f3855284c8c04e6e6a63c0f",
+ "reference": "2a89103f4984d8970f3855284c8c04e6e6a63c0f",
+ "shasum": ""
+ },
+ "require": {
+ "behat/transliterator": "^1.2",
+ "doctrine/collections": "^1.2 || ^2.0",
+ "doctrine/common": "^2.13 || ^3.0",
+ "doctrine/deprecations": "^1.0",
+ "doctrine/event-manager": "^1.2 || ^2.0",
+ "doctrine/persistence": "^2.2 || ^3.0",
+ "php": "^7.4 || ^8.0",
+ "psr/cache": "^1 || ^2 || ^3",
+ "psr/clock": "^1",
+ "symfony/cache": "^5.4 || ^6.0 || ^7.0"
+ },
+ "conflict": {
+ "doctrine/annotations": "<1.13 || >=3.0",
+ "doctrine/dbal": "<3.2 || >=4.0",
+ "doctrine/mongodb-odm": "<2.3 || >=3.0",
+ "doctrine/orm": "<2.14.0 || 2.16.0 || 2.16.1 || >=3.0"
+ },
+ "require-dev": {
+ "doctrine/annotations": "^1.13 || ^2.0",
+ "doctrine/cache": "^1.11 || ^2.0",
+ "doctrine/dbal": "^3.2",
+ "doctrine/doctrine-bundle": "^2.3",
+ "doctrine/mongodb-odm": "^2.3",
+ "doctrine/orm": "^2.14.0",
+ "friendsofphp/php-cs-fixer": "^3.14.0",
+ "nesbot/carbon": "^2.71 || ^3.0",
+ "phpstan/phpstan": "^1.10.2",
+ "phpstan/phpstan-doctrine": "^1.0",
+ "phpstan/phpstan-phpunit": "^1.0",
+ "phpunit/phpunit": "^9.6",
+ "rector/rector": "^0.19",
+ "symfony/console": "^5.4 || ^6.0 || ^7.0",
+ "symfony/phpunit-bridge": "^6.0 || ^7.0",
+ "symfony/yaml": "^5.4 || ^6.0 || ^7.0"
+ },
+ "suggest": {
+ "doctrine/mongodb-odm": "to use the extensions with the MongoDB ODM",
+ "doctrine/orm": "to use the extensions with the ORM"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.13-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Gedmo\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Gediminas Morkevicius",
+ "email": "gediminas.morkevicius@gmail.com"
+ },
+ {
+ "name": "Gustavo Falco",
+ "email": "comfortablynumb84@gmail.com"
+ },
+ {
+ "name": "David Buchmann",
+ "email": "david@liip.ch"
+ }
+ ],
+ "description": "Doctrine behavioral extensions",
+ "homepage": "http://gediminasm.org/",
+ "keywords": [
+ "Blameable",
+ "behaviors",
+ "doctrine",
+ "extensions",
+ "gedmo",
+ "loggable",
+ "nestedset",
+ "odm",
+ "orm",
+ "sluggable",
+ "sortable",
+ "timestampable",
+ "translatable",
+ "tree",
+ "uploadable"
+ ],
+ "support": {
+ "email": "gediminas.morkevicius@gmail.com",
+ "issues": "https://github.com/doctrine-extensions/DoctrineExtensions/issues",
+ "source": "https://github.com/doctrine-extensions/DoctrineExtensions/tree/v3.15.0",
+ "wiki": "https://github.com/Atlantic18/DoctrineExtensions/tree/main/doc"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/l3pp4rd",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/mbabker",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/phansys",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/stof",
+ "type": "github"
+ }
+ ],
+ "time": "2024-02-12T15:17:22+00:00"
+ },
{
"name": "gesdinet/jwt-refresh-token-bundle",
"version": "v1.3.0",
@@ -1866,16 +2207,16 @@
},
{
"name": "phpdocumentor/reflection-docblock",
- "version": "5.4.0",
+ "version": "5.4.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
- "reference": "298d2febfe79d03fe714eb871d5538da55205b1a"
+ "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/298d2febfe79d03fe714eb871d5538da55205b1a",
- "reference": "298d2febfe79d03fe714eb871d5538da55205b1a",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c",
+ "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c",
"shasum": ""
},
"require": {
@@ -1924,9 +2265,9 @@
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"support": {
"issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
- "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.0"
+ "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.1"
},
- "time": "2024-04-09T21:13:58+00:00"
+ "time": "2024-05-21T05:55:05+00:00"
},
{
"name": "phpdocumentor/type-resolver",
@@ -2339,6 +2680,354 @@
},
"time": "2021-07-14T16:46:02+00:00"
},
+ {
+ "name": "ramsey/collection",
+ "version": "2.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ramsey/collection.git",
+ "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5",
+ "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^8.1"
+ },
+ "require-dev": {
+ "captainhook/plugin-composer": "^5.3",
+ "ergebnis/composer-normalize": "^2.28.3",
+ "fakerphp/faker": "^1.21",
+ "hamcrest/hamcrest-php": "^2.0",
+ "jangregor/phpstan-prophecy": "^1.0",
+ "mockery/mockery": "^1.5",
+ "php-parallel-lint/php-console-highlighter": "^1.0",
+ "php-parallel-lint/php-parallel-lint": "^1.3",
+ "phpcsstandards/phpcsutils": "^1.0.0-rc1",
+ "phpspec/prophecy-phpunit": "^2.0",
+ "phpstan/extension-installer": "^1.2",
+ "phpstan/phpstan": "^1.9",
+ "phpstan/phpstan-mockery": "^1.1",
+ "phpstan/phpstan-phpunit": "^1.3",
+ "phpunit/phpunit": "^9.5",
+ "psalm/plugin-mockery": "^1.1",
+ "psalm/plugin-phpunit": "^0.18.4",
+ "ramsey/coding-standard": "^2.0.3",
+ "ramsey/conventional-commits": "^1.3",
+ "vimeo/psalm": "^5.4"
+ },
+ "type": "library",
+ "extra": {
+ "captainhook": {
+ "force-install": true
+ },
+ "ramsey/conventional-commits": {
+ "configFile": "conventional-commits.json"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Ramsey\\Collection\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ben Ramsey",
+ "email": "ben@benramsey.com",
+ "homepage": "https://benramsey.com"
+ }
+ ],
+ "description": "A PHP library for representing and manipulating collections.",
+ "keywords": [
+ "array",
+ "collection",
+ "hash",
+ "map",
+ "queue",
+ "set"
+ ],
+ "support": {
+ "issues": "https://github.com/ramsey/collection/issues",
+ "source": "https://github.com/ramsey/collection/tree/2.0.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/ramsey",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/ramsey/collection",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-12-31T21:50:55+00:00"
+ },
+ {
+ "name": "ramsey/uuid",
+ "version": "4.7.6",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ramsey/uuid.git",
+ "reference": "91039bc1faa45ba123c4328958e620d382ec7088"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ramsey/uuid/zipball/91039bc1faa45ba123c4328958e620d382ec7088",
+ "reference": "91039bc1faa45ba123c4328958e620d382ec7088",
+ "shasum": ""
+ },
+ "require": {
+ "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12",
+ "ext-json": "*",
+ "php": "^8.0",
+ "ramsey/collection": "^1.2 || ^2.0"
+ },
+ "replace": {
+ "rhumsaa/uuid": "self.version"
+ },
+ "require-dev": {
+ "captainhook/captainhook": "^5.10",
+ "captainhook/plugin-composer": "^5.3",
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
+ "doctrine/annotations": "^1.8",
+ "ergebnis/composer-normalize": "^2.15",
+ "mockery/mockery": "^1.3",
+ "paragonie/random-lib": "^2",
+ "php-mock/php-mock": "^2.2",
+ "php-mock/php-mock-mockery": "^1.3",
+ "php-parallel-lint/php-parallel-lint": "^1.1",
+ "phpbench/phpbench": "^1.0",
+ "phpstan/extension-installer": "^1.1",
+ "phpstan/phpstan": "^1.8",
+ "phpstan/phpstan-mockery": "^1.1",
+ "phpstan/phpstan-phpunit": "^1.1",
+ "phpunit/phpunit": "^8.5 || ^9",
+ "ramsey/composer-repl": "^1.4",
+ "slevomat/coding-standard": "^8.4",
+ "squizlabs/php_codesniffer": "^3.5",
+ "vimeo/psalm": "^4.9"
+ },
+ "suggest": {
+ "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.",
+ "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.",
+ "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.",
+ "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter",
+ "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type."
+ },
+ "type": "library",
+ "extra": {
+ "captainhook": {
+ "force-install": true
+ }
+ },
+ "autoload": {
+ "files": [
+ "src/functions.php"
+ ],
+ "psr-4": {
+ "Ramsey\\Uuid\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).",
+ "keywords": [
+ "guid",
+ "identifier",
+ "uuid"
+ ],
+ "support": {
+ "issues": "https://github.com/ramsey/uuid/issues",
+ "source": "https://github.com/ramsey/uuid/tree/4.7.6"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/ramsey",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/ramsey/uuid",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-04-27T21:32:50+00:00"
+ },
+ {
+ "name": "ramsey/uuid-doctrine",
+ "version": "2.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ramsey/uuid-doctrine.git",
+ "reference": "b002676be0e5e342d857c47f1b68e24de6841d08"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ramsey/uuid-doctrine/zipball/b002676be0e5e342d857c47f1b68e24de6841d08",
+ "reference": "b002676be0e5e342d857c47f1b68e24de6841d08",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/dbal": "^2.8 || ^3.0",
+ "php": "^7.4 || ^8.0",
+ "ramsey/uuid": "^3.9.7 || ^4.0"
+ },
+ "require-dev": {
+ "captainhook/plugin-composer": "^5.3",
+ "doctrine/orm": "^2.5",
+ "ergebnis/composer-normalize": "^2.28.3",
+ "mockery/mockery": "^1.5",
+ "php-parallel-lint/php-console-highlighter": "^1.0",
+ "php-parallel-lint/php-parallel-lint": "^1.3",
+ "phpcsstandards/phpcsutils": "^1.0.0-alpha4",
+ "phpstan/extension-installer": "^1.2",
+ "phpstan/phpstan": "^1.9",
+ "phpstan/phpstan-mockery": "^1.1",
+ "phpstan/phpstan-phpunit": "^1.3",
+ "phpunit/phpunit": "^9.5",
+ "psalm/plugin-mockery": "^1.1",
+ "psalm/plugin-phpunit": "^0.18.4",
+ "ramsey/coding-standard": "^2.0.3",
+ "ramsey/conventional-commits": "^1.3",
+ "vimeo/psalm": "^5.4"
+ },
+ "type": "library",
+ "extra": {
+ "captainhook": {
+ "force-install": true
+ },
+ "ramsey/conventional-commits": {
+ "configFile": "conventional-commits.json"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Ramsey\\Uuid\\Doctrine\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ben Ramsey",
+ "email": "ben@benramsey.com",
+ "homepage": "https://benramsey.com"
+ }
+ ],
+ "description": "Use ramsey/uuid as a Doctrine field type.",
+ "keywords": [
+ "database",
+ "doctrine",
+ "guid",
+ "identifier",
+ "uuid"
+ ],
+ "support": {
+ "issues": "https://github.com/ramsey/uuid-doctrine/issues",
+ "source": "https://github.com/ramsey/uuid-doctrine/tree/2.0.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/ramsey",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/ramsey/uuid-doctrine",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-12-20T23:38:28+00:00"
+ },
+ {
+ "name": "stof/doctrine-extensions-bundle",
+ "version": "v1.11.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/stof/StofDoctrineExtensionsBundle.git",
+ "reference": "9f7023e4c8a1c00a5627d41c1027a3f89e477630"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/stof/StofDoctrineExtensionsBundle/zipball/9f7023e4c8a1c00a5627d41c1027a3f89e477630",
+ "reference": "9f7023e4c8a1c00a5627d41c1027a3f89e477630",
+ "shasum": ""
+ },
+ "require": {
+ "gedmo/doctrine-extensions": "^3.15.0",
+ "php": "^7.4 || ^8.0",
+ "symfony/cache": "^5.4 || ^6.0 || ^7.0",
+ "symfony/config": "^5.4 || ^6.0 || ^7.0",
+ "symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0",
+ "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0",
+ "symfony/http-kernel": "^5.4 || ^6.0 || ^7.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^1.10",
+ "phpstan/phpstan-deprecation-rules": "^1.1",
+ "phpstan/phpstan-phpunit": "^1.3",
+ "phpstan/phpstan-strict-rules": "^1.5",
+ "phpstan/phpstan-symfony": "^1.3",
+ "symfony/mime": "^5.4 || ^6.0 || ^7.0",
+ "symfony/phpunit-bridge": "^v6.4.1 || ^7.0.1",
+ "symfony/security-core": "^5.4 || ^6.0 || ^7.0"
+ },
+ "suggest": {
+ "doctrine/doctrine-bundle": "to use the ORM extensions",
+ "doctrine/mongodb-odm-bundle": "to use the MongoDB ODM extensions",
+ "symfony/mime": "To use the Mime component integration for Uploadable"
+ },
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Stof\\DoctrineExtensionsBundle\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Christophe Coevoet",
+ "email": "stof@notk.org"
+ }
+ ],
+ "description": "Integration of the gedmo/doctrine-extensions with Symfony",
+ "homepage": "https://github.com/stof/StofDoctrineExtensionsBundle",
+ "keywords": [
+ "behaviors",
+ "doctrine2",
+ "extensions",
+ "gedmo",
+ "loggable",
+ "nestedset",
+ "sluggable",
+ "sortable",
+ "timestampable",
+ "translatable",
+ "tree"
+ ],
+ "support": {
+ "issues": "https://github.com/stof/StofDoctrineExtensionsBundle/issues",
+ "source": "https://github.com/stof/StofDoctrineExtensionsBundle/tree/v1.11.0"
+ },
+ "time": "2024-02-13T14:43:20+00:00"
+ },
{
"name": "symfony/asset",
"version": "v6.4.7",
@@ -6120,16 +6809,16 @@
},
{
"name": "twig/twig",
- "version": "v3.10.2",
+ "version": "v3.10.3",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
- "reference": "7aaed0b8311a557cc8c4047a71fd03153a00e755"
+ "reference": "67f29781ffafa520b0bbfbd8384674b42db04572"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/twigphp/Twig/zipball/7aaed0b8311a557cc8c4047a71fd03153a00e755",
- "reference": "7aaed0b8311a557cc8c4047a71fd03153a00e755",
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/67f29781ffafa520b0bbfbd8384674b42db04572",
+ "reference": "67f29781ffafa520b0bbfbd8384674b42db04572",
"shasum": ""
},
"require": {
@@ -6183,7 +6872,7 @@
],
"support": {
"issues": "https://github.com/twigphp/Twig/issues",
- "source": "https://github.com/twigphp/Twig/tree/v3.10.2"
+ "source": "https://github.com/twigphp/Twig/tree/v3.10.3"
},
"funding": [
{
@@ -6195,7 +6884,7 @@
"type": "tidelift"
}
],
- "time": "2024-05-14T06:04:16+00:00"
+ "time": "2024-05-16T10:04:27+00:00"
},
{
"name": "webmozart/assert",
@@ -6313,6 +7002,73 @@
}
],
"packages-dev": [
+ {
+ "name": "dama/doctrine-test-bundle",
+ "version": "v8.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/dmaicher/doctrine-test-bundle.git",
+ "reference": "21b4dd73546991c7df34ba92ecbf305a1ae5a0ee"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/dmaicher/doctrine-test-bundle/zipball/21b4dd73546991c7df34ba92ecbf305a1ae5a0ee",
+ "reference": "21b4dd73546991c7df34ba92ecbf305a1ae5a0ee",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/dbal": "^3.3 || ^4.0",
+ "doctrine/doctrine-bundle": "^2.2.2",
+ "php": "^7.4 || ^8.0",
+ "psr/cache": "^1.0 || ^2.0 || ^3.0",
+ "symfony/cache": "^5.4 || ^6.3 || ^7.0",
+ "symfony/framework-bundle": "^5.4 || ^6.3 || ^7.0"
+ },
+ "require-dev": {
+ "behat/behat": "^3.0",
+ "friendsofphp/php-cs-fixer": "^3.27",
+ "phpstan/phpstan": "^1.2",
+ "phpunit/phpunit": "^8.0 || ^9.0 || ^10.0 || ^11.0",
+ "symfony/phpunit-bridge": "^6.3",
+ "symfony/process": "^5.4 || ^6.3 || ^7.0",
+ "symfony/yaml": "^5.4 || ^6.3 || ^7.0"
+ },
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "8.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "DAMA\\DoctrineTestBundle\\": "src/DAMA/DoctrineTestBundle"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "David Maicher",
+ "email": "mail@dmaicher.de"
+ }
+ ],
+ "description": "Symfony bundle to isolate doctrine database tests and improve test performance",
+ "keywords": [
+ "doctrine",
+ "isolation",
+ "performance",
+ "symfony",
+ "testing",
+ "tests"
+ ],
+ "support": {
+ "issues": "https://github.com/dmaicher/doctrine-test-bundle/issues",
+ "source": "https://github.com/dmaicher/doctrine-test-bundle/tree/v8.1.0"
+ },
+ "time": "2024-05-21T18:06:21+00:00"
+ },
{
"name": "doctrine/data-fixtures",
"version": "1.7.0",
@@ -6547,6 +7303,132 @@
},
"time": "2024-01-02T13:46:09+00:00"
},
+ {
+ "name": "masterminds/html5",
+ "version": "2.9.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Masterminds/html5-php.git",
+ "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f5ac2c0b0a2eefca70b2ce32a5809992227e75a6",
+ "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.7-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Masterminds\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Matt Butcher",
+ "email": "technosophos@gmail.com"
+ },
+ {
+ "name": "Matt Farina",
+ "email": "matt@mattfarina.com"
+ },
+ {
+ "name": "Asmir Mustafic",
+ "email": "goetas@gmail.com"
+ }
+ ],
+ "description": "An HTML5 parser and serializer.",
+ "homepage": "http://masterminds.github.io/html5-php",
+ "keywords": [
+ "HTML5",
+ "dom",
+ "html",
+ "parser",
+ "querypath",
+ "serializer",
+ "xml"
+ ],
+ "support": {
+ "issues": "https://github.com/Masterminds/html5-php/issues",
+ "source": "https://github.com/Masterminds/html5-php/tree/2.9.0"
+ },
+ "time": "2024-03-31T07:05:07+00:00"
+ },
+ {
+ "name": "myclabs/deep-copy",
+ "version": "1.11.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/myclabs/DeepCopy.git",
+ "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
+ "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1 || ^8.0"
+ },
+ "conflict": {
+ "doctrine/collections": "<1.6.8",
+ "doctrine/common": "<2.13.3 || >=3,<3.2.2"
+ },
+ "require-dev": {
+ "doctrine/collections": "^1.6.8",
+ "doctrine/common": "^2.13.3 || ^3.2.2",
+ "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
+ },
+ "type": "library",
+ "autoload": {
+ "files": [
+ "src/DeepCopy/deep_copy.php"
+ ],
+ "psr-4": {
+ "DeepCopy\\": "src/DeepCopy/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Create deep copies (clones) of your objects",
+ "keywords": [
+ "clone",
+ "copy",
+ "duplicate",
+ "object",
+ "object graph"
+ ],
+ "support": {
+ "issues": "https://github.com/myclabs/DeepCopy/issues",
+ "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1"
+ },
+ "funding": [
+ {
+ "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2023-03-08T13:26:56+00:00"
+ },
{
"name": "nikic/php-parser",
"version": "v5.0.2",
@@ -6605,6 +7487,1880 @@
},
"time": "2024-03-05T20:51:40+00:00"
},
+ {
+ "name": "phar-io/manifest",
+ "version": "2.0.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phar-io/manifest.git",
+ "reference": "54750ef60c58e43759730615a392c31c80e23176"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176",
+ "reference": "54750ef60c58e43759730615a392c31c80e23176",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-libxml": "*",
+ "ext-phar": "*",
+ "ext-xmlwriter": "*",
+ "phar-io/version": "^3.0.1",
+ "php": "^7.2 || ^8.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Heuer",
+ "email": "sebastian@phpeople.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "Developer"
+ }
+ ],
+ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
+ "support": {
+ "issues": "https://github.com/phar-io/manifest/issues",
+ "source": "https://github.com/phar-io/manifest/tree/2.0.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/theseer",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-03T12:33:53+00:00"
+ },
+ {
+ "name": "phar-io/version",
+ "version": "3.2.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phar-io/version.git",
+ "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
+ "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2 || ^8.0"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Heuer",
+ "email": "sebastian@phpeople.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "Developer"
+ }
+ ],
+ "description": "Library for handling version information and constraints",
+ "support": {
+ "issues": "https://github.com/phar-io/version/issues",
+ "source": "https://github.com/phar-io/version/tree/3.2.1"
+ },
+ "time": "2022-02-21T01:04:05+00:00"
+ },
+ {
+ "name": "phpunit/php-code-coverage",
+ "version": "9.2.31",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
+ "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965",
+ "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-libxml": "*",
+ "ext-xmlwriter": "*",
+ "nikic/php-parser": "^4.18 || ^5.0",
+ "php": ">=7.3",
+ "phpunit/php-file-iterator": "^3.0.3",
+ "phpunit/php-text-template": "^2.0.2",
+ "sebastian/code-unit-reverse-lookup": "^2.0.2",
+ "sebastian/complexity": "^2.0",
+ "sebastian/environment": "^5.1.2",
+ "sebastian/lines-of-code": "^1.0.3",
+ "sebastian/version": "^3.0.1",
+ "theseer/tokenizer": "^1.2.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "suggest": {
+ "ext-pcov": "PHP extension that provides line coverage",
+ "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "9.2-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
+ "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
+ "keywords": [
+ "coverage",
+ "testing",
+ "xunit"
+ ],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
+ "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-02T06:37:42+00:00"
+ },
+ {
+ "name": "phpunit/php-file-iterator",
+ "version": "3.0.6",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
+ "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
+ "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "FilterIterator implementation that filters files based on a list of suffixes.",
+ "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
+ "keywords": [
+ "filesystem",
+ "iterator"
+ ],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
+ "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2021-12-02T12:48:52+00:00"
+ },
+ {
+ "name": "phpunit/php-invoker",
+ "version": "3.1.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-invoker.git",
+ "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
+ "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "ext-pcntl": "*",
+ "phpunit/phpunit": "^9.3"
+ },
+ "suggest": {
+ "ext-pcntl": "*"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.1-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Invoke callables with a timeout",
+ "homepage": "https://github.com/sebastianbergmann/php-invoker/",
+ "keywords": [
+ "process"
+ ],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-invoker/issues",
+ "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-09-28T05:58:55+00:00"
+ },
+ {
+ "name": "phpunit/php-text-template",
+ "version": "2.0.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-text-template.git",
+ "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
+ "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Simple template engine.",
+ "homepage": "https://github.com/sebastianbergmann/php-text-template/",
+ "keywords": [
+ "template"
+ ],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-text-template/issues",
+ "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-10-26T05:33:50+00:00"
+ },
+ {
+ "name": "phpunit/php-timer",
+ "version": "5.0.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/php-timer.git",
+ "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
+ "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Utility class for timing",
+ "homepage": "https://github.com/sebastianbergmann/php-timer/",
+ "keywords": [
+ "timer"
+ ],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-timer/issues",
+ "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-10-26T13:16:10+00:00"
+ },
+ {
+ "name": "phpunit/phpunit",
+ "version": "9.6.19",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/phpunit.git",
+ "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1a54a473501ef4cdeaae4e06891674114d79db8",
+ "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/instantiator": "^1.3.1 || ^2",
+ "ext-dom": "*",
+ "ext-json": "*",
+ "ext-libxml": "*",
+ "ext-mbstring": "*",
+ "ext-xml": "*",
+ "ext-xmlwriter": "*",
+ "myclabs/deep-copy": "^1.10.1",
+ "phar-io/manifest": "^2.0.3",
+ "phar-io/version": "^3.0.2",
+ "php": ">=7.3",
+ "phpunit/php-code-coverage": "^9.2.28",
+ "phpunit/php-file-iterator": "^3.0.5",
+ "phpunit/php-invoker": "^3.1.1",
+ "phpunit/php-text-template": "^2.0.3",
+ "phpunit/php-timer": "^5.0.2",
+ "sebastian/cli-parser": "^1.0.1",
+ "sebastian/code-unit": "^1.0.6",
+ "sebastian/comparator": "^4.0.8",
+ "sebastian/diff": "^4.0.3",
+ "sebastian/environment": "^5.1.3",
+ "sebastian/exporter": "^4.0.5",
+ "sebastian/global-state": "^5.0.1",
+ "sebastian/object-enumerator": "^4.0.3",
+ "sebastian/resource-operations": "^3.0.3",
+ "sebastian/type": "^3.2",
+ "sebastian/version": "^3.0.2"
+ },
+ "suggest": {
+ "ext-soap": "To be able to generate mocks based on WSDL files",
+ "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage"
+ },
+ "bin": [
+ "phpunit"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "9.6-dev"
+ }
+ },
+ "autoload": {
+ "files": [
+ "src/Framework/Assert/Functions.php"
+ ],
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "The PHP Unit Testing framework.",
+ "homepage": "https://phpunit.de/",
+ "keywords": [
+ "phpunit",
+ "testing",
+ "xunit"
+ ],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/phpunit/issues",
+ "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.19"
+ },
+ "funding": [
+ {
+ "url": "https://phpunit.de/sponsors.html",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-04-05T04:35:58+00:00"
+ },
+ {
+ "name": "sebastian/cli-parser",
+ "version": "1.0.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/cli-parser.git",
+ "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b",
+ "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library for parsing CLI options",
+ "homepage": "https://github.com/sebastianbergmann/cli-parser",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/cli-parser/issues",
+ "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-02T06:27:43+00:00"
+ },
+ {
+ "name": "sebastian/code-unit",
+ "version": "1.0.8",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/code-unit.git",
+ "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120",
+ "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Collection of value objects that represent the PHP code units",
+ "homepage": "https://github.com/sebastianbergmann/code-unit",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/code-unit/issues",
+ "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-10-26T13:08:54+00:00"
+ },
+ {
+ "name": "sebastian/code-unit-reverse-lookup",
+ "version": "2.0.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
+ "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
+ "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Looks up which function or method a line of code belongs to",
+ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues",
+ "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-09-28T05:30:19+00:00"
+ },
+ {
+ "name": "sebastian/comparator",
+ "version": "4.0.8",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/comparator.git",
+ "reference": "fa0f136dd2334583309d32b62544682ee972b51a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a",
+ "reference": "fa0f136dd2334583309d32b62544682ee972b51a",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3",
+ "sebastian/diff": "^4.0",
+ "sebastian/exporter": "^4.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Jeff Welch",
+ "email": "whatthejeff@gmail.com"
+ },
+ {
+ "name": "Volker Dusch",
+ "email": "github@wallbash.com"
+ },
+ {
+ "name": "Bernhard Schussek",
+ "email": "bschussek@2bepublished.at"
+ }
+ ],
+ "description": "Provides the functionality to compare PHP values for equality",
+ "homepage": "https://github.com/sebastianbergmann/comparator",
+ "keywords": [
+ "comparator",
+ "compare",
+ "equality"
+ ],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/comparator/issues",
+ "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2022-09-14T12:41:17+00:00"
+ },
+ {
+ "name": "sebastian/complexity",
+ "version": "2.0.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/complexity.git",
+ "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a",
+ "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a",
+ "shasum": ""
+ },
+ "require": {
+ "nikic/php-parser": "^4.18 || ^5.0",
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library for calculating the complexity of PHP code units",
+ "homepage": "https://github.com/sebastianbergmann/complexity",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/complexity/issues",
+ "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2023-12-22T06:19:30+00:00"
+ },
+ {
+ "name": "sebastian/diff",
+ "version": "4.0.6",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/diff.git",
+ "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc",
+ "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3",
+ "symfony/process": "^4.2 || ^5"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Kore Nordmann",
+ "email": "mail@kore-nordmann.de"
+ }
+ ],
+ "description": "Diff implementation",
+ "homepage": "https://github.com/sebastianbergmann/diff",
+ "keywords": [
+ "diff",
+ "udiff",
+ "unidiff",
+ "unified diff"
+ ],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/diff/issues",
+ "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-02T06:30:58+00:00"
+ },
+ {
+ "name": "sebastian/environment",
+ "version": "5.1.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/environment.git",
+ "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed",
+ "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "suggest": {
+ "ext-posix": "*"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.1-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Provides functionality to handle HHVM/PHP environments",
+ "homepage": "http://www.github.com/sebastianbergmann/environment",
+ "keywords": [
+ "Xdebug",
+ "environment",
+ "hhvm"
+ ],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/environment/issues",
+ "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2023-02-03T06:03:51+00:00"
+ },
+ {
+ "name": "sebastian/exporter",
+ "version": "4.0.6",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/exporter.git",
+ "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72",
+ "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3",
+ "sebastian/recursion-context": "^4.0"
+ },
+ "require-dev": {
+ "ext-mbstring": "*",
+ "phpunit/phpunit": "^9.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Jeff Welch",
+ "email": "whatthejeff@gmail.com"
+ },
+ {
+ "name": "Volker Dusch",
+ "email": "github@wallbash.com"
+ },
+ {
+ "name": "Adam Harvey",
+ "email": "aharvey@php.net"
+ },
+ {
+ "name": "Bernhard Schussek",
+ "email": "bschussek@gmail.com"
+ }
+ ],
+ "description": "Provides the functionality to export PHP variables for visualization",
+ "homepage": "https://www.github.com/sebastianbergmann/exporter",
+ "keywords": [
+ "export",
+ "exporter"
+ ],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/exporter/issues",
+ "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-02T06:33:00+00:00"
+ },
+ {
+ "name": "sebastian/global-state",
+ "version": "5.0.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/global-state.git",
+ "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9",
+ "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3",
+ "sebastian/object-reflector": "^2.0",
+ "sebastian/recursion-context": "^4.0"
+ },
+ "require-dev": {
+ "ext-dom": "*",
+ "phpunit/phpunit": "^9.3"
+ },
+ "suggest": {
+ "ext-uopz": "*"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Snapshotting of global state",
+ "homepage": "http://www.github.com/sebastianbergmann/global-state",
+ "keywords": [
+ "global state"
+ ],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/global-state/issues",
+ "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-02T06:35:11+00:00"
+ },
+ {
+ "name": "sebastian/lines-of-code",
+ "version": "1.0.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/lines-of-code.git",
+ "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5",
+ "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5",
+ "shasum": ""
+ },
+ "require": {
+ "nikic/php-parser": "^4.18 || ^5.0",
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library for counting the lines of code in PHP source code",
+ "homepage": "https://github.com/sebastianbergmann/lines-of-code",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/lines-of-code/issues",
+ "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2023-12-22T06:20:34+00:00"
+ },
+ {
+ "name": "sebastian/object-enumerator",
+ "version": "4.0.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/object-enumerator.git",
+ "reference": "5c9eeac41b290a3712d88851518825ad78f45c71"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71",
+ "reference": "5c9eeac41b290a3712d88851518825ad78f45c71",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3",
+ "sebastian/object-reflector": "^2.0",
+ "sebastian/recursion-context": "^4.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Traverses array structures and object graphs to enumerate all referenced objects",
+ "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/object-enumerator/issues",
+ "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-10-26T13:12:34+00:00"
+ },
+ {
+ "name": "sebastian/object-reflector",
+ "version": "2.0.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/object-reflector.git",
+ "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
+ "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Allows reflection of object attributes, including inherited and non-public ones",
+ "homepage": "https://github.com/sebastianbergmann/object-reflector/",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/object-reflector/issues",
+ "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-10-26T13:14:26+00:00"
+ },
+ {
+ "name": "sebastian/recursion-context",
+ "version": "4.0.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/recursion-context.git",
+ "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1",
+ "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Jeff Welch",
+ "email": "whatthejeff@gmail.com"
+ },
+ {
+ "name": "Adam Harvey",
+ "email": "aharvey@php.net"
+ }
+ ],
+ "description": "Provides functionality to recursively process PHP variables",
+ "homepage": "https://github.com/sebastianbergmann/recursion-context",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/recursion-context/issues",
+ "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2023-02-03T06:07:39+00:00"
+ },
+ {
+ "name": "sebastian/resource-operations",
+ "version": "3.0.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/resource-operations.git",
+ "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e",
+ "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Provides a list of PHP built-in functions that operate on resources",
+ "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
+ "support": {
+ "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-14T16:00:52+00:00"
+ },
+ {
+ "name": "sebastian/type",
+ "version": "3.2.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/type.git",
+ "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
+ "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.5"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.2-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Collection of value objects that represent the types of the PHP type system",
+ "homepage": "https://github.com/sebastianbergmann/type",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/type/issues",
+ "source": "https://github.com/sebastianbergmann/type/tree/3.2.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2023-02-03T06:13:03+00:00"
+ },
+ {
+ "name": "sebastian/version",
+ "version": "3.0.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/version.git",
+ "reference": "c6c1022351a901512170118436c764e473f6de8c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c",
+ "reference": "c6c1022351a901512170118436c764e473f6de8c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library that helps with managing the version number of Git-hosted PHP projects",
+ "homepage": "https://github.com/sebastianbergmann/version",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/version/issues",
+ "source": "https://github.com/sebastianbergmann/version/tree/3.0.2"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-09-28T06:39:44+00:00"
+ },
+ {
+ "name": "symfony/browser-kit",
+ "version": "v6.4.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/browser-kit.git",
+ "reference": "c276856598f70e96f75403fc04841cec1dc56e74"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/browser-kit/zipball/c276856598f70e96f75403fc04841cec1dc56e74",
+ "reference": "c276856598f70e96f75403fc04841cec1dc56e74",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.1",
+ "symfony/dom-crawler": "^5.4|^6.0|^7.0"
+ },
+ "require-dev": {
+ "symfony/css-selector": "^5.4|^6.0|^7.0",
+ "symfony/http-client": "^5.4|^6.0|^7.0",
+ "symfony/mime": "^5.4|^6.0|^7.0",
+ "symfony/process": "^5.4|^6.0|^7.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\BrowserKit\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/browser-kit/tree/v6.4.7"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-04-18T09:22:46+00:00"
+ },
+ {
+ "name": "symfony/css-selector",
+ "version": "v6.4.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/css-selector.git",
+ "reference": "1c5d5c2103c3762aff27a27e1e2409e30a79083b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/1c5d5c2103c3762aff27a27e1e2409e30a79083b",
+ "reference": "1c5d5c2103c3762aff27a27e1e2409e30a79083b",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.1"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\CssSelector\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Jean-François Simon",
+ "email": "jeanfrancois.simon@sensiolabs.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Converts CSS selectors to XPath expressions",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/css-selector/tree/v6.4.7"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-04-18T09:22:46+00:00"
+ },
+ {
+ "name": "symfony/dom-crawler",
+ "version": "v6.4.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/dom-crawler.git",
+ "reference": "2088c5da700b1e7a8689fffc10dda6c1f643deea"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/2088c5da700b1e7a8689fffc10dda6c1f643deea",
+ "reference": "2088c5da700b1e7a8689fffc10dda6c1f643deea",
+ "shasum": ""
+ },
+ "require": {
+ "masterminds/html5": "^2.6",
+ "php": ">=8.1",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-mbstring": "~1.0"
+ },
+ "require-dev": {
+ "symfony/css-selector": "^5.4|^6.0|^7.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\DomCrawler\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Eases DOM navigation for HTML and XML documents",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/dom-crawler/tree/v6.4.7"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-04-18T09:22:46+00:00"
+ },
+ {
+ "name": "symfony/http-client",
+ "version": "v6.4.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/http-client.git",
+ "reference": "3683d8107cf1efdd24795cc5f7482be1eded34ac"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/http-client/zipball/3683d8107cf1efdd24795cc5f7482be1eded34ac",
+ "reference": "3683d8107cf1efdd24795cc5f7482be1eded34ac",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.1",
+ "psr/log": "^1|^2|^3",
+ "symfony/deprecation-contracts": "^2.5|^3",
+ "symfony/http-client-contracts": "^3.4.1",
+ "symfony/service-contracts": "^2.5|^3"
+ },
+ "conflict": {
+ "php-http/discovery": "<1.15",
+ "symfony/http-foundation": "<6.3"
+ },
+ "provide": {
+ "php-http/async-client-implementation": "*",
+ "php-http/client-implementation": "*",
+ "psr/http-client-implementation": "1.0",
+ "symfony/http-client-implementation": "3.0"
+ },
+ "require-dev": {
+ "amphp/amp": "^2.5",
+ "amphp/http-client": "^4.2.1",
+ "amphp/http-tunnel": "^1.0",
+ "amphp/socket": "^1.1",
+ "guzzlehttp/promises": "^1.4|^2.0",
+ "nyholm/psr7": "^1.0",
+ "php-http/httplug": "^1.0|^2.0",
+ "psr/http-client": "^1.0",
+ "symfony/dependency-injection": "^5.4|^6.0|^7.0",
+ "symfony/http-kernel": "^5.4|^6.0|^7.0",
+ "symfony/messenger": "^5.4|^6.0|^7.0",
+ "symfony/process": "^5.4|^6.0|^7.0",
+ "symfony/stopwatch": "^5.4|^6.0|^7.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\HttpClient\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "http"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/http-client/tree/v6.4.7"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-04-18T09:22:46+00:00"
+ },
+ {
+ "name": "symfony/http-client-contracts",
+ "version": "v3.5.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/http-client-contracts.git",
+ "reference": "20414d96f391677bf80078aa55baece78b82647d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/20414d96f391677bf80078aa55baece78b82647d",
+ "reference": "20414d96f391677bf80078aa55baece78b82647d",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.5-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Contracts\\HttpClient\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Test/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Generic abstractions related to HTTP clients",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "abstractions",
+ "contracts",
+ "decoupling",
+ "interfaces",
+ "interoperability",
+ "standards"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/http-client-contracts/tree/v3.5.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-04-18T09:32:20+00:00"
+ },
{
"name": "symfony/maker-bundle",
"version": "v1.59.1",
@@ -6697,6 +9453,87 @@
],
"time": "2024-05-06T03:59:59+00:00"
},
+ {
+ "name": "symfony/phpunit-bridge",
+ "version": "v7.0.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/phpunit-bridge.git",
+ "reference": "0a0b90ba08b9a03e09ad49f8d613bdf3eca3a7a9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/0a0b90ba08b9a03e09ad49f8d613bdf3eca3a7a9",
+ "reference": "0a0b90ba08b9a03e09ad49f8d613bdf3eca3a7a9",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5"
+ },
+ "conflict": {
+ "phpunit/phpunit": "<7.5|9.1.2"
+ },
+ "require-dev": {
+ "symfony/deprecation-contracts": "^2.5|^3.0",
+ "symfony/error-handler": "^5.4|^6.4|^7.0",
+ "symfony/polyfill-php81": "^1.27"
+ },
+ "bin": [
+ "bin/simple-phpunit"
+ ],
+ "type": "symfony-bridge",
+ "extra": {
+ "thanks": {
+ "name": "phpunit/phpunit",
+ "url": "https://github.com/sebastianbergmann/phpunit"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Bridge\\PhpUnit\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Provides utilities for PHPUnit, especially user deprecation notices management",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/phpunit-bridge/tree/v7.0.7"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-04-18T09:29:19+00:00"
+ },
{
"name": "symfony/web-profiler-bundle",
"version": "v6.4.7",
@@ -6779,6 +9616,56 @@
],
"time": "2024-04-18T09:22:46+00:00"
},
+ {
+ "name": "theseer/tokenizer",
+ "version": "1.2.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/theseer/tokenizer.git",
+ "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2",
+ "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-tokenizer": "*",
+ "ext-xmlwriter": "*",
+ "php": "^7.2 || ^8.0"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
+ }
+ ],
+ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
+ "support": {
+ "issues": "https://github.com/theseer/tokenizer/issues",
+ "source": "https://github.com/theseer/tokenizer/tree/1.2.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/theseer",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-03T12:36:25+00:00"
+ },
{
"name": "zenstruck/assert",
"version": "v1.5.0",
diff --git a/config/api_platform/OrganizationalUnit.yaml b/config/api_platform/OrganizationalUnit.yaml
new file mode 100644
index 0000000..577b80a
--- /dev/null
+++ b/config/api_platform/OrganizationalUnit.yaml
@@ -0,0 +1,27 @@
+resources:
+ App\Entity\OrganizationalUnit:
+ processor: App\State\Processor\OrganizationalUnitProcessor
+ input: App\Dto\Input\OrganizationalUnitInput
+ output: App\Dto\Output\OrganizationalUnitOutput
+ normalization_context:
+ groups: ['default', 'organizational-unit:read']
+ denormalization_context:
+ groups: ['organizational-unit:write']
+ operations:
+ ApiPlatform\Metadata\GetCollection:
+ provider: App\State\Provider\OrganizationalUnitProvider
+ ApiPlatform\Metadata\Get:
+ provider: App\State\Provider\OrganizationalUnitProvider
+ ApiPlatform\Metadata\Put:
+ provider: App\State\Provider\OrganizationalUnitProvider
+ ApiPlatform\Metadata\Patch:
+ provider: App\State\Provider\OrganizationalUnitProvider
+ ApiPlatform\Metadata\Post: ~
+ ApiPlatform\Metadata\Delete: ~
+
+properties:
+ App\Entity\OrganizationalUnit:
+ id:
+ identifier: false
+ uuid:
+ identifier: true
\ No newline at end of file
diff --git a/config/api_platform/User.yaml b/config/api_platform/User.yaml
new file mode 100644
index 0000000..efe4597
--- /dev/null
+++ b/config/api_platform/User.yaml
@@ -0,0 +1,35 @@
+resources:
+ App\Entity\User:
+ security: 'is_granted("ROLE_SUPER_ADMIN")'
+ input: App\Dto\Input\UserInput
+ output: App\Dto\Output\UserOutput
+ processor: App\State\Processor\UserProcessor
+ normalization_context:
+ groups: ['default', 'user:read']
+ denormalization_context:
+ groups: ['user:write']
+
+ operations:
+ ApiPlatform\Metadata\GetCollection:
+ provider: App\State\Provider\UserProvider
+ filters:
+ - 'api_platform.filter.user.order'
+ - 'api_platform.filter.user.search'
+ - 'api_platform.filter.user.boolean'
+ ApiPlatform\Metadata\Get:
+ provider: App\State\Provider\UserProvider
+ ApiPlatform\Metadata\Put:
+ provider: App\State\Provider\UserProvider
+ ApiPlatform\Metadata\Patch:
+ provider: App\State\Provider\UserProvider
+ ApiPlatform\Metadata\Post:
+ validationContext:
+ groups: [ 'default', 'user:post' ]
+ ApiPlatform\Metadata\Delete: ~
+
+properties:
+ App\Entity\User:
+ id:
+ identifier: false
+ uuid:
+ identifier: true
\ No newline at end of file
diff --git a/config/api_platform/UserGroup.yaml b/config/api_platform/UserGroup.yaml
new file mode 100644
index 0000000..0f2a80b
--- /dev/null
+++ b/config/api_platform/UserGroup.yaml
@@ -0,0 +1,32 @@
+resources:
+ App\Entity\UserGroup:
+ security: 'is_granted("ROLE_SUPER_ADMIN")'
+ processor: App\State\Processor\UserGroupProcessor
+ input: App\Dto\Input\UserGroupInput
+ output: App\Dto\Output\UserGroupOutput
+ normalization_context:
+ groups: ['default', 'user-group:read']
+ denormalization_context:
+ groups: ['user-group:write']
+ operations:
+ ApiPlatform\Metadata\GetCollection:
+ provider: App\State\Provider\UserGroupProvider
+ filters:
+ - 'api_platform.filter.user_group.order'
+ - 'api_platform.filter.user_group.search'
+ - 'api_platform.filter.user_group.boolean'
+ ApiPlatform\Metadata\Get:
+ provider: App\State\Provider\UserGroupProvider
+ ApiPlatform\Metadata\Put:
+ provider: App\State\Provider\UserGroupProvider
+ ApiPlatform\Metadata\Patch:
+ provider: App\State\Provider\UserGroupProvider
+ ApiPlatform\Metadata\Post: ~
+ ApiPlatform\Metadata\Delete: ~
+
+properties:
+ App\Entity\UserGroup:
+ id:
+ identifier: false
+ uuid:
+ identifier: true
\ No newline at end of file
diff --git a/config/bundles.php b/config/bundles.php
index 3f4a386..826d993 100644
--- a/config/bundles.php
+++ b/config/bundles.php
@@ -14,4 +14,6 @@ return [
Zenstruck\Foundry\ZenstruckFoundryBundle::class => ['dev' => true, 'test' => true],
Gesdinet\JWTRefreshTokenBundle\GesdinetJWTRefreshTokenBundle::class => ['all' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
+ Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true],
+ DAMA\DoctrineTestBundle\DAMADoctrineTestBundle::class => ['test' => true],
];
diff --git a/config/packages/api_platform.yaml b/config/packages/api_platform.yaml
index fe1e993..ee2c7ec 100644
--- a/config/packages/api_platform.yaml
+++ b/config/packages/api_platform.yaml
@@ -2,14 +2,28 @@ api_platform:
title: 'OgCore API'
description: 'API Documentation for OgCore'
version: 1.0.0
+ path_segment_name_generator: 'api_platform.path_segment_name_generator.dash'
formats:
- jsonld: ['application/ld+json']
+ jsonld: ['application/ld+json', 'application/json']
+ patch_formats:
+ jsonld: ['application/ld+json', 'application/json']
+ mapping:
+ paths: ['%kernel.project_dir%/config/api_platform', '%kernel.project_dir%/src/Dto']
+ defaults:
+ pagination_client_items_per_page: true
+ denormalization_context:
+ allow_extra_attributes: false
+ cache_headers:
+ vary: [ 'Content-Type', 'Authorization', 'Origin' ]
+ extra_properties:
+ standard_put: true
+ rfc_7807_compliant_errors: true
+ event_listeners_backward_compatibility_layer: false
+ keep_legacy_inflector: true
docs_formats:
jsonld: ['application/ld+json']
jsonopenapi: ['application/vnd.openapi+json']
html: ['text/html']
- keep_legacy_inflector: false
- use_symfony_listeners: true
swagger:
versions: [3]
api_keys:
diff --git a/config/packages/dama_doctrine_test_bundle.yaml b/config/packages/dama_doctrine_test_bundle.yaml
new file mode 100644
index 0000000..3482cba
--- /dev/null
+++ b/config/packages/dama_doctrine_test_bundle.yaml
@@ -0,0 +1,5 @@
+when@test:
+ dama_doctrine_test:
+ enable_static_connection: true
+ enable_static_meta_data_cache: true
+ enable_static_query_cache: true
diff --git a/config/packages/doctrine.yaml b/config/packages/doctrine.yaml
index 75ec9e8..b247cd0 100644
--- a/config/packages/doctrine.yaml
+++ b/config/packages/doctrine.yaml
@@ -1,13 +1,10 @@
doctrine:
dbal:
url: '%env(resolve:DATABASE_URL)%'
-
- # IMPORTANT: You MUST configure your server version,
- # either here or in the DATABASE_URL env var (see .env file)
- #server_version: '16'
-
profiling_collect_backtrace: '%kernel.debug%'
use_savepoints: true
+ mapping_types:
+ enum: string
orm:
auto_generate_proxy_classes: true
enable_lazy_ghost_objects: true
diff --git a/config/packages/ramsey_uuid_doctrine.yaml b/config/packages/ramsey_uuid_doctrine.yaml
new file mode 100644
index 0000000..cfc3036
--- /dev/null
+++ b/config/packages/ramsey_uuid_doctrine.yaml
@@ -0,0 +1,4 @@
+doctrine:
+ dbal:
+ types:
+ uuid: 'Ramsey\Uuid\Doctrine\UuidType'
diff --git a/config/packages/security.yaml b/config/packages/security.yaml
index 978777f..cf97c8d 100644
--- a/config/packages/security.yaml
+++ b/config/packages/security.yaml
@@ -27,7 +27,7 @@ security:
access_control:
- { path: ^/$, roles: PUBLIC_ACCESS } # Allows accessing the Swagger UI
- - { path: ^/api/docs, roles: PUBLIC_ACCESS } # Allows accessing the Swagger UI docs
+ - { path: ^/docs, roles: PUBLIC_ACCESS } # Allows accessing the Swagger UI docs
- { path: ^/auth/login, roles: PUBLIC_ACCESS }
- { path: ^/auth/refresh, roles: PUBLIC_ACCESS }
- { path: ^/, roles: IS_AUTHENTICATED_FULLY }
diff --git a/config/packages/stof_doctrine_extensions.yaml b/config/packages/stof_doctrine_extensions.yaml
new file mode 100644
index 0000000..c478c2c
--- /dev/null
+++ b/config/packages/stof_doctrine_extensions.yaml
@@ -0,0 +1,8 @@
+stof_doctrine_extensions:
+ default_locale: es_ES
+ orm:
+ default:
+ timestampable: true
+ blameable: true
+ tree: true
+ sluggable: true
\ No newline at end of file
diff --git a/config/routes/api_platform.yaml b/config/routes/api_platform.yaml
index 38f11cb..350d2a8 100644
--- a/config/routes/api_platform.yaml
+++ b/config/routes/api_platform.yaml
@@ -1,4 +1,3 @@
api_platform:
resource: .
type: api_platform
- prefix: /api
diff --git a/config/services.yaml b/config/services.yaml
index 9650227..7e12544 100644
--- a/config/services.yaml
+++ b/config/services.yaml
@@ -24,3 +24,18 @@ services:
decorates: 'api_platform.openapi.factory'
arguments: [ '@App\OpenApi\OpenApiFactory.inner' ]
autoconfigure: false
+
+ App\State\Provider\UserProvider:
+ bind:
+ $collectionProvider: '@api_platform.doctrine.orm.state.collection_provider'
+ $itemProvider: '@api_platform.doctrine.orm.state.item_provider'
+
+ App\State\Provider\UserGroupProvider:
+ bind:
+ $collectionProvider: '@api_platform.doctrine.orm.state.collection_provider'
+ $itemProvider: '@api_platform.doctrine.orm.state.item_provider'
+
+ App\State\Provider\OrganizationalUnitProvider:
+ bind:
+ $collectionProvider: '@api_platform.doctrine.orm.state.collection_provider'
+ $itemProvider: '@api_platform.doctrine.orm.state.item_provider'
\ No newline at end of file
diff --git a/config/services/api_platform.yaml b/config/services/api_platform.yaml
new file mode 100644
index 0000000..8049096
--- /dev/null
+++ b/config/services/api_platform.yaml
@@ -0,0 +1,40 @@
+services:
+ api_platform.filter.user.order:
+ parent: 'api_platform.doctrine.orm.order_filter'
+ arguments:
+ $properties: { 'id' : ~, 'username': ~ }
+ $orderParameterName: 'order'
+ tags:
+ - ['api_platform.filter' ]
+
+ api_platform.filter.user.search:
+ parent: 'api_platform.doctrine.orm.search_filter'
+ arguments: [ { 'id': 'exact', 'username': 'partial' }]
+ tags:
+ - ['api_platform.filter' ]
+
+ api_platform.filter.user.boolean:
+ parent: 'api_platform.doctrine.orm.boolean_filter'
+ arguments: [ { 'enabled': ~ } ]
+ tags:
+ - [ 'api_platform.filter' ]
+
+ api_platform.filter.user_group.order:
+ parent: 'api_platform.doctrine.orm.order_filter'
+ arguments:
+ $properties: { 'id': ~, 'name': ~ }
+ $orderParameterName: 'order'
+ tags:
+ - [ 'api_platform.filter' ]
+
+ api_platform.filter.user_group.search:
+ parent: 'api_platform.doctrine.orm.search_filter'
+ arguments: [ { 'id': 'exact', 'name': 'partial' } ]
+ tags:
+ - [ 'api_platform.filter' ]
+
+ api_platform.filter.user_group.boolean:
+ parent: 'api_platform.doctrine.orm.boolean_filter'
+ arguments: [ { 'enabled': ~ } ]
+ tags:
+ - [ 'api_platform.filter' ]
\ No newline at end of file
diff --git a/docker/Dockerfile-php b/docker/Dockerfile-php
index 02a3f56..0ce2698 100644
--- a/docker/Dockerfile-php
+++ b/docker/Dockerfile-php
@@ -18,8 +18,3 @@ RUN apk add --no-cache bash git jq moreutils openssh rsync yq
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions
RUN install-php-extensions sockets
-
-# Install Symfony binary
-RUN apk add --no-cache bash \
- && curl -1sLf 'https://dl.cloudsmith.io/public/symfony/stable/setup.alpine.sh' | bash \
- && apk add symfony-cli
diff --git a/migrations/Version20240517085550.php b/migrations/Version20240517085550.php
deleted file mode 100644
index bec091e..0000000
--- a/migrations/Version20240517085550.php
+++ /dev/null
@@ -1,31 +0,0 @@
-addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, username VARCHAR(180) NOT NULL, roles JSON NOT NULL COMMENT \'(DC2Type:json)\', password VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_IDENTIFIER_USERNAME (username), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
- }
-
- public function down(Schema $schema): void
- {
- // this down() migration is auto-generated, please modify it to your needs
- $this->addSql('DROP TABLE user');
- }
-}
diff --git a/migrations/Version20240517101651.php b/migrations/Version20240517101651.php
deleted file mode 100644
index 66bf841..0000000
--- a/migrations/Version20240517101651.php
+++ /dev/null
@@ -1,31 +0,0 @@
-addSql('CREATE TABLE refresh_tokens (id INT AUTO_INCREMENT NOT NULL, refresh_token VARCHAR(128) NOT NULL, username VARCHAR(255) NOT NULL, valid DATETIME NOT NULL, UNIQUE INDEX UNIQ_9BACE7E1C74F2195 (refresh_token), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
- }
-
- public function down(Schema $schema): void
- {
- // this down() migration is auto-generated, please modify it to your needs
- $this->addSql('DROP TABLE refresh_tokens');
- }
-}
diff --git a/migrations/Version20240528093352.php b/migrations/Version20240528093352.php
new file mode 100644
index 0000000..60ec26a
--- /dev/null
+++ b/migrations/Version20240528093352.php
@@ -0,0 +1,67 @@
+addSql('CREATE TABLE aulas (idaula INT AUTO_INCREMENT NOT NULL, nombreaula VARCHAR(255) NOT NULL, idcentro INT NOT NULL, urlfoto VARCHAR(255) NOT NULL, cagnon TINYINT(1) NOT NULL, pizarra TINYINT(1) NOT NULL, grupoid INT NOT NULL, ubicacion VARCHAR(255) NOT NULL, comentarios VARCHAR(255) NOT NULL, puestos INT NOT NULL, horaresevini TINYINT(1) NOT NULL, horaresevfin TINYINT(1) NOT NULL, modomul TINYINT(1) NOT NULL, ipmul VARCHAR(255) NOT NULL, pormul VARCHAR(255) NOT NULL, velmul VARCHAR(255) NOT NULL, router VARCHAR(255) NOT NULL, netmask VARCHAR(255) NOT NULL, dns VARCHAR(255) NOT NULL, proxy VARCHAR(255) NOT NULL, ntp VARCHAR(255) NOT NULL, modp2p VARCHAR(255) NOT NULL, timep2p VARCHAR(255) NOT NULL, validacion TINYINT(1) NOT NULL, paginalogin VARCHAR(255) NOT NULL, paginavalidacion VARCHAR(255) NOT NULL, inremotepc VARCHAR(255) NOT NULL, oglivedir VARCHAR(255) NOT NULL, PRIMARY KEY(idaula)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
+ $this->addSql('CREATE TABLE centros (idcentro INT AUTO_INCREMENT NOT NULL, nombrecentro VARCHAR(255) NOT NULL, identidad INT NOT NULL, comentarios VARCHAR(255) DEFAULT NULL, directorio VARCHAR(255) DEFAULT NULL, PRIMARY KEY(idcentro)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
+ $this->addSql('CREATE TABLE client (id INT AUTO_INCREMENT NOT NULL, organizational_unit_id INT DEFAULT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, serial_number VARCHAR(255) DEFAULT NULL, netiface VARCHAR(255) DEFAULT NULL, net_driver VARCHAR(255) DEFAULT NULL, mac VARCHAR(255) DEFAULT NULL, ip VARCHAR(255) DEFAULT NULL, status VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_C7440455D17F50A6 (uuid), INDEX IDX_C7440455FB84408A (organizational_unit_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
+ $this->addSql('CREATE TABLE gruposordenadores (idgrupo INT AUTO_INCREMENT NOT NULL, nombregrupoordenador VARCHAR(255) NOT NULL, idaula VARCHAR(255) NOT NULL, grupoid VARCHAR(255) NOT NULL, comentarios VARCHAR(255) NOT NULL, PRIMARY KEY(idgrupo)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
+ $this->addSql('CREATE TABLE network_settings (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, proxy VARCHAR(255) DEFAULT NULL, dns VARCHAR(255) DEFAULT NULL, netmask VARCHAR(255) DEFAULT NULL, router VARCHAR(255) DEFAULT NULL, ntp VARCHAR(255) DEFAULT NULL, p2p_time INT DEFAULT NULL, p2p_mode VARCHAR(255) DEFAULT NULL, mcast_ip VARCHAR(255) DEFAULT NULL, mcast_speed INT NOT NULL, mcast_mode VARCHAR(255) DEFAULT NULL, mcast_port INT DEFAULT NULL, UNIQUE INDEX UNIQ_48869B54D17F50A6 (uuid), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
+ $this->addSql('CREATE TABLE ordenadores (idordenador INT AUTO_INCREMENT NOT NULL, PRIMARY KEY(idordenador)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
+ $this->addSql('CREATE TABLE organizational_unit (id INT AUTO_INCREMENT NOT NULL, parent_id INT DEFAULT NULL, network_settings_id INT DEFAULT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, description VARCHAR(255) DEFAULT NULL, comments VARCHAR(255) DEFAULT NULL, path VARCHAR(255) DEFAULT NULL, level INT DEFAULT NULL, slug VARCHAR(255) DEFAULT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_749AEB2DD17F50A6 (uuid), INDEX IDX_749AEB2D727ACA70 (parent_id), INDEX IDX_749AEB2D9B9A36D0 (network_settings_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
+ $this->addSql('CREATE TABLE refresh_tokens (id INT AUTO_INCREMENT NOT NULL, refresh_token VARCHAR(128) NOT NULL, username VARCHAR(255) NOT NULL, valid DATETIME NOT NULL, UNIQUE INDEX UNIQ_9BACE7E1C74F2195 (refresh_token), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
+ $this->addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, username VARCHAR(180) NOT NULL, roles JSON NOT NULL COMMENT \'(DC2Type:json)\', password VARCHAR(255) NOT NULL, enabled TINYINT(1) NOT NULL, UNIQUE INDEX UNIQ_8D93D649D17F50A6 (uuid), UNIQUE INDEX UNIQ_IDENTIFIER_USERNAME (username), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
+ $this->addSql('CREATE TABLE user_organizational_unit (user_id INT NOT NULL, organizational_unit_id INT NOT NULL, INDEX IDX_5E59845FA76ED395 (user_id), INDEX IDX_5E59845FFB84408A (organizational_unit_id), PRIMARY KEY(user_id, organizational_unit_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
+ $this->addSql('CREATE TABLE user_group (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, permissions JSON NOT NULL COMMENT \'(DC2Type:json)\', name VARCHAR(255) NOT NULL, enabled TINYINT(1) NOT NULL, UNIQUE INDEX UNIQ_8F02BF9DD17F50A6 (uuid), UNIQUE INDEX UNIQ_IDENTIFIER_NAME (name), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
+ $this->addSql('CREATE TABLE user_group_user (user_group_id INT NOT NULL, user_id INT NOT NULL, INDEX IDX_3AE4BD51ED93D47 (user_group_id), INDEX IDX_3AE4BD5A76ED395 (user_id), PRIMARY KEY(user_group_id, user_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
+ $this->addSql('ALTER TABLE client ADD CONSTRAINT FK_C7440455FB84408A FOREIGN KEY (organizational_unit_id) REFERENCES organizational_unit (id)');
+ $this->addSql('ALTER TABLE organizational_unit ADD CONSTRAINT FK_749AEB2D727ACA70 FOREIGN KEY (parent_id) REFERENCES organizational_unit (id)');
+ $this->addSql('ALTER TABLE organizational_unit ADD CONSTRAINT FK_749AEB2D9B9A36D0 FOREIGN KEY (network_settings_id) REFERENCES network_settings (id)');
+ $this->addSql('ALTER TABLE user_organizational_unit ADD CONSTRAINT FK_5E59845FA76ED395 FOREIGN KEY (user_id) REFERENCES user (id) ON DELETE CASCADE');
+ $this->addSql('ALTER TABLE user_organizational_unit ADD CONSTRAINT FK_5E59845FFB84408A FOREIGN KEY (organizational_unit_id) REFERENCES organizational_unit (id) ON DELETE CASCADE');
+ $this->addSql('ALTER TABLE user_group_user ADD CONSTRAINT FK_3AE4BD51ED93D47 FOREIGN KEY (user_group_id) REFERENCES user_group (id) ON DELETE CASCADE');
+ $this->addSql('ALTER TABLE user_group_user ADD CONSTRAINT FK_3AE4BD5A76ED395 FOREIGN KEY (user_id) REFERENCES user (id) ON DELETE CASCADE');
+ }
+
+ public function down(Schema $schema): void
+ {
+ // this down() migration is auto-generated, please modify it to your needs
+ $this->addSql('ALTER TABLE client DROP FOREIGN KEY FK_C7440455FB84408A');
+ $this->addSql('ALTER TABLE organizational_unit DROP FOREIGN KEY FK_749AEB2D727ACA70');
+ $this->addSql('ALTER TABLE organizational_unit DROP FOREIGN KEY FK_749AEB2D9B9A36D0');
+ $this->addSql('ALTER TABLE user_organizational_unit DROP FOREIGN KEY FK_5E59845FA76ED395');
+ $this->addSql('ALTER TABLE user_organizational_unit DROP FOREIGN KEY FK_5E59845FFB84408A');
+ $this->addSql('ALTER TABLE user_group_user DROP FOREIGN KEY FK_3AE4BD51ED93D47');
+ $this->addSql('ALTER TABLE user_group_user DROP FOREIGN KEY FK_3AE4BD5A76ED395');
+ $this->addSql('DROP TABLE aulas');
+ $this->addSql('DROP TABLE centros');
+ $this->addSql('DROP TABLE client');
+ $this->addSql('DROP TABLE gruposordenadores');
+ $this->addSql('DROP TABLE network_settings');
+ $this->addSql('DROP TABLE ordenadores');
+ $this->addSql('DROP TABLE organizational_unit');
+ $this->addSql('DROP TABLE refresh_tokens');
+ $this->addSql('DROP TABLE user');
+ $this->addSql('DROP TABLE user_organizational_unit');
+ $this->addSql('DROP TABLE user_group');
+ $this->addSql('DROP TABLE user_group_user');
+ }
+}
diff --git a/migrations/Version20240529131520.php b/migrations/Version20240529131520.php
new file mode 100644
index 0000000..b596cab
--- /dev/null
+++ b/migrations/Version20240529131520.php
@@ -0,0 +1,34 @@
+addSql('ALTER TABLE organizational_unit DROP FOREIGN KEY FK_749AEB2D727ACA70');
+ $this->addSql('ALTER TABLE organizational_unit ADD CONSTRAINT FK_749AEB2D727ACA70 FOREIGN KEY (parent_id) REFERENCES organizational_unit (id) ON DELETE SET NULL');
+ }
+
+ public function down(Schema $schema): void
+ {
+ // this down() migration is auto-generated, please modify it to your needs
+ $this->addSql('ALTER TABLE organizational_unit DROP FOREIGN KEY FK_749AEB2D727ACA70');
+ $this->addSql('ALTER TABLE organizational_unit ADD CONSTRAINT FK_749AEB2D727ACA70 FOREIGN KEY (parent_id) REFERENCES organizational_unit (id)');
+ }
+}
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
new file mode 100644
index 0000000..f6da34e
--- /dev/null
+++ b/phpunit.xml.dist
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ tests
+
+
+
+
+
+ src
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Command/LoadDefaultUserGroupsCommand.php b/src/Command/LoadDefaultUserGroupsCommand.php
new file mode 100644
index 0000000..51bc6fe
--- /dev/null
+++ b/src/Command/LoadDefaultUserGroupsCommand.php
@@ -0,0 +1,59 @@
+ 'Super Admin',
+ 'permissions' => [UserGroupPermissions::ROLE_SUPER_ADMIN],
+ 'enabled' => true
+ ],
+ [
+ 'name' => 'Administrador de aulas',
+ 'permissions' => [UserGroupPermissions::ROLE_ORGANIZATIONAL_UNIT_ADMIN],
+ 'enabled' => true
+ ],
+ [
+ 'name' => 'Operador de aulas',
+ 'permissions' => [UserGroupPermissions::ROLE_ORGANIZATIONAL_UNIT_OPERATOR],
+ 'enabled' => true
+ ],
+ [
+ 'name' => 'Usuario básico de aulas',
+ 'permissions' => [UserGroupPermissions::ROLE_ORGANIZATIONAL_UNIT_MINIMAL],
+ 'enabled' => true
+ ],
+ ];
+
+ foreach ($userGroups as $userGroup) {
+ $entity = new UserGroup();
+ $entity->setName($userGroup['name']);
+ $entity->setPermissions($userGroup['permissions']);
+ $entity->setEnabled($userGroup['enabled']);
+
+ $this->entityManager->persist($entity);
+ }
+
+ $this->entityManager->flush();
+
+ return 1;
+ }
+}
\ No newline at end of file
diff --git a/src/Command/Migration/MigrateOrganizationalUnitCommand.php b/src/Command/Migration/MigrateOrganizationalUnitCommand.php
new file mode 100644
index 0000000..a595626
--- /dev/null
+++ b/src/Command/Migration/MigrateOrganizationalUnitCommand.php
@@ -0,0 +1,152 @@
+entityManagerSlave->getRepository(Centros::class)->findAll();
+ $rooms = $this->entityManagerSlave->getRepository(Aulas::class)->findAll();
+ $pcGroups = $this->entityManagerSlave->getRepository(Gruposordenadores::class)->findAll();
+ $pcs = $this->entityManagerSlave->getRepository(Ordenadores::class)->findAll();
+
+ $organizationalUnitRepository = $this->entityManager->getRepository(OrganizationalUnit::class);
+ $clientRepository = $this->entityManager->getRepository(Client::class);
+
+ /** Centros **/
+ $output->writeln("CENTROS TOTAL: ". count($centers));
+ foreach ($centers as $center){
+ $centerOrganizationalUnit = null;
+ $centerOrganizationalUnit = $organizationalUnitRepository->findOneBy(['migrationId' => $center->getIdcentro()]);
+ if(!$centerOrganizationalUnit){
+ $centerOrganizationalUnit = new OrganizationalUnit();
+ $centerOrganizationalUnit->setMigrationId($center->getIdcentro());
+ $centerOrganizationalUnit->setName($center->getNombrecentro());
+ $centerOrganizationalUnit->setComments($center->getComentarios());
+ $this->entityManager->persist($centerOrganizationalUnit);
+ }
+ }
+ $this->entityManager->flush();
+
+ /** Aulas **/
+ $output->writeln("AULAS TOTAL: ". count($rooms));
+ foreach ($rooms as $room){
+ $roomOrganizationalUnit = null;
+ $roomOrganizationalUnit = $organizationalUnitRepository->findOneBy(['migrationId' => $room->getIdaula()]);
+ if(!$roomOrganizationalUnit){
+ $roomOrganizationalUnit = new OrganizationalUnit();
+ $roomOrganizationalUnit->setMigrationId($room->getIdaula());
+ $roomOrganizationalUnit->setName($room->getNombreaula());
+ $roomOrganizationalUnitParent = $organizationalUnitRepository->findOneBy(['migrationId' => $room->getIdcentro()]);
+ $roomOrganizationalUnit->setParent($roomOrganizationalUnitParent);
+ $this->entityManager->persist($roomOrganizationalUnit);
+ }
+
+ $networkSettings = $roomOrganizationalUnit->getNetworkSettings();
+ if(!$networkSettings){
+ $networkSettings = new NetworkSettings();
+ $roomOrganizationalUnit->setNetworkSettings($networkSettings);
+ $this->entityManager->persist($networkSettings);
+ }
+ $networkSettings->setProxy($room->getProxy());
+ $networkSettings->setDns($room->getDns());
+ $networkSettings->setNetmask($room->getNetmask());
+ $networkSettings->setRouter($room->getRouter());
+ $networkSettings->setNtp($room->getNtp());
+ $networkSettings->setP2pTime($room->getTimep2p());
+ $networkSettings->setP2pMode($room->getModp2p());
+ $networkSettings->setMcastIp($room->getIpmul());
+ $networkSettings->setMcastSpeed($room->getVelmul());
+ $networkSettings->setMcastPort($room->getPormul());
+ $networkSettings->setMcastMode($room->getModomul());
+ }
+
+ $this->entityManager->flush();
+
+ /** Grupo Ordenador **/
+ $output->writeln("GRUPOS ORDENADORES ". count($rooms));
+ foreach ($pcGroups as $group){
+ $groupPcOrganizationalUnit = null;
+ $migrateParentId = ($group->getGrupoid() == 0) ? $group->getIdaula() : $group->getGrupoid();
+ $groupPcOrganizationalUnit = $organizationalUnitRepository->findOneBy(['migrationId' => $group->getIdgrupo()]);
+ if(!$groupPcOrganizationalUnit){
+ $groupPcOrganizationalUnit = new OrganizationalUnit();
+ $groupPcOrganizationalUnit->setMigrationId($group->getIdgrupo());
+ $groupPcOrganizationalUnit->setName($group->getNombregrupoordenador());
+ $groupPcOrganizationalUnit->setComments($group->getComentarios());
+ $groupPcOrganizationalUnitParent = $organizationalUnitRepository->findOneBy(['migrationId' => $migrateParentId]);
+ $groupPcOrganizationalUnit->setParent($groupPcOrganizationalUnitParent);
+ $this->entityManager->persist($groupPcOrganizationalUnit);
+ }
+ }
+ $this->entityManager->flush();
+
+ /** Ordenadores **/
+ foreach ($pcs as $pc){
+ $newClient = $clientRepository->findOneBy(['migrationId' => $pc->getIdordenador()]);
+ if(!$newClient){
+ $newClient = new Client();
+ $newClient->setMigrationId($pc->getIdordenador());
+ $this->entityManager->persist($newClient);
+ }
+ $newClient->setName($pc->getNombreordenador());
+ $newClient->setSerialNumber($pc->getNumserie());
+ $newClient->setNetiface($pc->getNetiface());
+ $newClient->setNetdriver($pc->getNetdriver());
+ $newClient->setMac($pc->getMac());
+ $newClient->setIp($pc->getIp());
+ //$client->setStatus();
+ //$newClient->setCache($pc->getCache());
+ //$newClient->setIdproautoexec($pc->getIdproautoexec());
+ //$newClient->setOglive($pc->getOglivedir());
+
+ // Netboot
+
+ //$migrationId = ""
+
+ // HardwareProfile
+ //$hardwareProfile = $hardwareProfileRepository->findOneBy(['migrationId' => $pc->getIdperfilhard()]);
+ //$newClient->setHardwareProfile($hardwareProfile);
+
+ // Menu
+ //$menu = $menuRepository->findOneBy(['migrationId' => $pc->getIdmenu()]);
+ //$newClient->setMenu($menu);
+
+ // Repository
+ //$repository = $repositoryRepository->findOneBy(['migrationId' => $pc->getIdrepositorio()]);
+ //$newClient->setRepository($repository);
+
+ // OrganizationalUnit
+ $migrationId = $pc->getGrupoid() == 0 ? $pc->getIdaula() : $pc->getGrupoid();
+ $organizationalUnit = $organizationalUnitRepository->findOneBy(['migrationId' => $migrationId]);
+ $newClient->setOrganizationalUnit($organizationalUnit);
+
+ }
+ $this->entityManager->flush();
+
+ return 1;
+ }
+}
\ No newline at end of file
diff --git a/src/DataFixtures/AppFixtures.php b/src/DataFixtures/AppFixtures.php
index 8a74d9b..f2b8986 100644
--- a/src/DataFixtures/AppFixtures.php
+++ b/src/DataFixtures/AppFixtures.php
@@ -2,7 +2,10 @@
namespace App\DataFixtures;
+use App\Entity\OrganizationalUnit;
+use App\Factory\OrganizationalUnitFactory;
use App\Factory\UserFactory;
+use App\Model\UserGroupPermissions;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Persistence\ObjectManager;
@@ -10,8 +13,22 @@ class AppFixtures extends Fixture
{
CONST ADMIN_USER = 'ogadmin';
+ /**
+ * @throws \Exception
+ */
public function load(ObjectManager $manager): void
{
- UserFactory::createOne(['username' => self::ADMIN_USER]);
+ UserFactory::createOne(['username' => self::ADMIN_USER, 'roles'=> [UserGroupPermissions::ROLE_SUPER_ADMIN]]);
+ $rootUnit = OrganizationalUnitFactory::createOne(['name' => 'Centro de Computación', 'parent' => null]);
+
+ $roomUnit = OrganizationalUnitFactory::createOne([
+ 'name' => 'Aula 1',
+ 'parent' => $rootUnit
+ ]);
+
+ OrganizationalUnitFactory::createOne([
+ 'name' => 'Aula 2',
+ 'parent' => $roomUnit
+ ]);
}
}
diff --git a/src/Dto/Input/OrganizationalUnitInput.php b/src/Dto/Input/OrganizationalUnitInput.php
new file mode 100644
index 0000000..53f8d40
--- /dev/null
+++ b/src/Dto/Input/OrganizationalUnitInput.php
@@ -0,0 +1,34 @@
+name = $organizationalUnit->getName();
+ }
+
+ public function createOrUpdateEntity(?OrganizationalUnit $organizationalUnit = null): OrganizationalUnit
+ {
+ if (!$organizationalUnit) {
+ $organizationalUnit = new OrganizationalUnit();
+ }
+
+ $organizationalUnit->setName($this->name);
+
+ return $organizationalUnit;
+ }
+}
\ No newline at end of file
diff --git a/src/Dto/Input/UserGroupInput.php b/src/Dto/Input/UserGroupInput.php
new file mode 100644
index 0000000..918e1ef
--- /dev/null
+++ b/src/Dto/Input/UserGroupInput.php
@@ -0,0 +1,47 @@
+name = $userGroupGroup->getName();
+ $this->permissions = $userGroupGroup->getPermissions();
+ $this->enabled= $userGroupGroup->isEnabled();
+ }
+
+ public function createOrUpdateEntity(?UserGroup $userGroup = null): UserGroup
+ {
+ if (!$userGroup) {
+ $userGroup = new UserGroup();
+ }
+
+ $userGroup->setName($this->name);
+ $userGroup->setPermissions($this->permissions);
+ $userGroup->setEnabled($this->enabled);
+
+ return $userGroup;
+ }
+}
\ No newline at end of file
diff --git a/src/Dto/Input/UserInput.php b/src/Dto/Input/UserInput.php
new file mode 100644
index 0000000..97b1230
--- /dev/null
+++ b/src/Dto/Input/UserInput.php
@@ -0,0 +1,79 @@
+username = $user->getUsername();
+ $this->enabled= $user->isEnabled();
+ $this->userGroups = $user->getUserGroups()->toArray();
+ $this->allowedOrganizationalUnits = $user->getAllowedOrganizationalUnits()->toArray();
+ }
+
+ public function createOrUpdateEntity(?User $user = null): User
+ {
+ if (!$user) {
+ $user = new User();
+ }
+
+ $user->setUsername($this->username);
+ $user->setEnabled($this->enabled);
+
+ foreach ($this->userGroups as $userGroup) {
+ $userGroupsToAdd[] = $userGroup->getEntity();
+ }
+ $user->setUserGroups( $userGroupsToAdd ?? [] );
+
+ if ($this->password !== null) {
+ $user->setPassword($this->password);
+ }
+
+ foreach ($this->allowedOrganizationalUnits as $allowedOrganizationalUnit) {
+ $allowedOrganizationalUnitToAdd[] = $allowedOrganizationalUnit->getEntity();
+ }
+ $user->setAllowedOrganizationalUnits( $allowedOrganizationalUnitToAdd ?? [] );
+
+ return $user;
+ }
+}
\ No newline at end of file
diff --git a/src/Dto/Output/AbstractOutput.php b/src/Dto/Output/AbstractOutput.php
new file mode 100644
index 0000000..93f7e50
--- /dev/null
+++ b/src/Dto/Output/AbstractOutput.php
@@ -0,0 +1,31 @@
+id = $entity->getId();
+ $this->uuid = $entity->getUuid();
+ }
+
+ #[ApiProperty(readable: false)]
+ public function getEntity(): ?AbstractEntity
+ {
+ return $this->entity;
+ }
+}
\ No newline at end of file
diff --git a/src/Dto/Output/OrganizationalUnitOutput.php b/src/Dto/Output/OrganizationalUnitOutput.php
new file mode 100644
index 0000000..1b8bf80
--- /dev/null
+++ b/src/Dto/Output/OrganizationalUnitOutput.php
@@ -0,0 +1,29 @@
+name = $organizationalUnit->getName();
+ $this->createAt = $organizationalUnit->getCreatedAt();
+ $this->createBy = $organizationalUnit->getCreatedBy();
+ }
+}
\ No newline at end of file
diff --git a/src/Dto/Output/UserGroupOutput.php b/src/Dto/Output/UserGroupOutput.php
new file mode 100644
index 0000000..1b1308d
--- /dev/null
+++ b/src/Dto/Output/UserGroupOutput.php
@@ -0,0 +1,38 @@
+name = $userGroup->getName();
+ $this->permissions = $userGroup->getPermissions();
+ $this->enabled = $userGroup->isEnabled();
+ $this->createAt = $userGroup->getCreatedAt();
+ $this->createBy = $userGroup->getCreatedBy();
+ }
+}
\ No newline at end of file
diff --git a/src/Dto/Output/UserOutput.php b/src/Dto/Output/UserOutput.php
new file mode 100644
index 0000000..5cd4d72
--- /dev/null
+++ b/src/Dto/Output/UserOutput.php
@@ -0,0 +1,43 @@
+username = $user->getUsername();
+ $this->roles = $user->getRoles();
+ $this->enabled = $user->isEnabled();
+ $this->userGroups = $user->getUserGroups()->toArray();
+ $this->allowedOrganizationalUnits = $user->getAllowedOrganizationalUnits()->toArray();
+ $this->createAt = $user->getCreatedAt();
+ $this->createBy = $user->getCreatedBy();
+ }
+}
\ No newline at end of file
diff --git a/src/Entity/AbstractEntity.php b/src/Entity/AbstractEntity.php
new file mode 100644
index 0000000..031fc7f
--- /dev/null
+++ b/src/Entity/AbstractEntity.php
@@ -0,0 +1,55 @@
+uuid = Uuid::uuid7();
+ }
+
+ public function getId(): ?int
+ {
+ return $this->id;
+ }
+
+ public function getUuid(): UuidInterface
+ {
+ return $this->uuid;
+ }
+
+ public function getMigrationId(): ?string
+ {
+ return $this->migrationId;
+ }
+
+ public function setMigrationId(?string $migrationId): self
+ {
+ $this->migrationId = $migrationId;
+
+ return $this;
+ }
+}
\ No newline at end of file
diff --git a/src/Entity/Client.php b/src/Entity/Client.php
new file mode 100644
index 0000000..4fa39ea
--- /dev/null
+++ b/src/Entity/Client.php
@@ -0,0 +1,131 @@
+name;
+ }
+
+ public function setName(?string $name): static
+ {
+ $this->name = $name;
+
+ return $this;
+ }
+
+ public function getSerialNumber(): ?string
+ {
+ return $this->serialNumber;
+ }
+
+ public function setSerialNumber(?string $serialNumber): static
+ {
+ $this->serialNumber = $serialNumber;
+
+ return $this;
+ }
+
+ public function getNetiface(): ?string
+ {
+ return $this->netiface;
+ }
+
+ public function setNetiface(?string $netiface): static
+ {
+ $this->netiface = $netiface;
+
+ return $this;
+ }
+
+ public function getNetDriver(): ?string
+ {
+ return $this->netDriver;
+ }
+
+ public function setNetDriver(string $netDriver): static
+ {
+ $this->netDriver = $netDriver;
+
+ return $this;
+ }
+
+ public function getMac(): ?string
+ {
+ return $this->mac;
+ }
+
+ public function setMac(?string $mac): static
+ {
+ $this->mac = $mac;
+
+ return $this;
+ }
+
+ public function getIp(): ?string
+ {
+ return $this->ip;
+ }
+
+ public function setIp(?string $ip): static
+ {
+ $this->ip = $ip;
+
+ return $this;
+ }
+
+ public function getStatus(): ?string
+ {
+ return $this->status;
+ }
+
+ public function setStatus(?string $status): static
+ {
+ $this->status = $status;
+
+ return $this;
+ }
+
+ public function getOrganizationalUnit(): ?OrganizationalUnit
+ {
+ return $this->organizationalUnit;
+ }
+
+ public function setOrganizationalUnit(?OrganizationalUnit $organizationalUnit): static
+ {
+ $this->organizationalUnit = $organizationalUnit;
+
+ return $this;
+ }
+}
diff --git a/src/Entity/Migration/Aulas.php b/src/Entity/Migration/Aulas.php
new file mode 100644
index 0000000..d4179e3
--- /dev/null
+++ b/src/Entity/Migration/Aulas.php
@@ -0,0 +1,753 @@
+nombreaula = $nombreaula;
+
+ return $this;
+ }
+
+ /**
+ * Get nombreaula.
+ *
+ * @return string
+ */
+ public function getNombreaula()
+ {
+ return $this->nombreaula;
+ }
+
+ /**
+ * Set idcentro.
+ *
+ * @param int $idcentro
+ *
+ * @return Aulas
+ */
+ public function setIdcentro($idcentro)
+ {
+ $this->idcentro = $idcentro;
+
+ return $this;
+ }
+
+ /**
+ * Get idcentro.
+ *
+ * @return int
+ */
+ public function getIdcentro()
+ {
+ return $this->idcentro;
+ }
+
+ /**
+ * Set urlfoto.
+ *
+ * @param string|null $urlfoto
+ *
+ * @return Aulas
+ */
+ public function setUrlfoto($urlfoto = null)
+ {
+ $this->urlfoto = $urlfoto;
+
+ return $this;
+ }
+
+ /**
+ * Get urlfoto.
+ *
+ * @return string|null
+ */
+ public function getUrlfoto()
+ {
+ return $this->urlfoto;
+ }
+
+ /**
+ * Set cagnon.
+ *
+ * @param bool|null $cagnon
+ *
+ * @return Aulas
+ */
+ public function setCagnon($cagnon = null)
+ {
+ $this->cagnon = $cagnon;
+
+ return $this;
+ }
+
+ /**
+ * Get cagnon.
+ *
+ * @return bool|null
+ */
+ public function getCagnon()
+ {
+ return $this->cagnon;
+ }
+
+ /**
+ * Set pizarra.
+ *
+ * @param bool|null $pizarra
+ *
+ * @return Aulas
+ */
+ public function setPizarra($pizarra = null)
+ {
+ $this->pizarra = $pizarra;
+
+ return $this;
+ }
+
+ /**
+ * Get pizarra.
+ *
+ * @return bool|null
+ */
+ public function getPizarra()
+ {
+ return $this->pizarra;
+ }
+
+ /**
+ * Set grupoid.
+ *
+ * @param int|null $grupoid
+ *
+ * @return Aulas
+ */
+ public function setGrupoid($grupoid = null)
+ {
+ $this->grupoid = $grupoid;
+
+ return $this;
+ }
+
+ /**
+ * Get grupoid.
+ *
+ * @return int|null
+ */
+ public function getGrupoid()
+ {
+ return $this->grupoid;
+ }
+
+ /**
+ * Set ubicacion.
+ *
+ * @param string|null $ubicacion
+ *
+ * @return Aulas
+ */
+ public function setUbicacion($ubicacion = null)
+ {
+ $this->ubicacion = $ubicacion;
+
+ return $this;
+ }
+
+ /**
+ * Get ubicacion.
+ *
+ * @return string|null
+ */
+ public function getUbicacion()
+ {
+ return $this->ubicacion;
+ }
+
+ /**
+ * Set comentarios.
+ *
+ * @param string|null $comentarios
+ *
+ * @return Aulas
+ */
+ public function setComentarios($comentarios = null)
+ {
+ $this->comentarios = $comentarios;
+
+ return $this;
+ }
+
+ /**
+ * Get comentarios.
+ *
+ * @return string|null
+ */
+ public function getComentarios()
+ {
+ return $this->comentarios;
+ }
+
+ /**
+ * Set puestos.
+ *
+ * @param int|null $puestos
+ *
+ * @return Aulas
+ */
+ public function setPuestos($puestos = null)
+ {
+ $this->puestos = $puestos;
+
+ return $this;
+ }
+
+ /**
+ * Get puestos.
+ *
+ * @return int|null
+ */
+ public function getPuestos()
+ {
+ return $this->puestos;
+ }
+
+ /**
+ * Set horaresevini.
+ *
+ * @param bool|null $horaresevini
+ *
+ * @return Aulas
+ */
+ public function setHoraresevini($horaresevini = null)
+ {
+ $this->horaresevini = $horaresevini;
+
+ return $this;
+ }
+
+ /**
+ * Get horaresevini.
+ *
+ * @return bool|null
+ */
+ public function getHoraresevini()
+ {
+ return $this->horaresevini;
+ }
+
+ /**
+ * Set horaresevfin.
+ *
+ * @param bool|null $horaresevfin
+ *
+ * @return Aulas
+ */
+ public function setHoraresevfin($horaresevfin = null)
+ {
+ $this->horaresevfin = $horaresevfin;
+
+ return $this;
+ }
+
+ /**
+ * Get horaresevfin.
+ *
+ * @return bool|null
+ */
+ public function getHoraresevfin()
+ {
+ return $this->horaresevfin;
+ }
+
+ /**
+ * Set modomul.
+ *
+ * @param bool $modomul
+ *
+ * @return Aulas
+ */
+ public function setModomul($modomul)
+ {
+ $this->modomul = $modomul;
+
+ return $this;
+ }
+
+ /**
+ * Get modomul.
+ *
+ * @return bool
+ */
+ public function getModomul()
+ {
+ return $this->modomul;
+ }
+
+ /**
+ * Set ipmul.
+ *
+ * @param string $ipmul
+ *
+ * @return Aulas
+ */
+ public function setIpmul($ipmul)
+ {
+ $this->ipmul = $ipmul;
+
+ return $this;
+ }
+
+ /**
+ * Get ipmul.
+ *
+ * @return string
+ */
+ public function getIpmul()
+ {
+ return $this->ipmul;
+ }
+
+ /**
+ * Set pormul.
+ *
+ * @param int $pormul
+ *
+ * @return Aulas
+ */
+ public function setPormul($pormul)
+ {
+ $this->pormul = $pormul;
+
+ return $this;
+ }
+
+ /**
+ * Get pormul.
+ *
+ * @return int
+ */
+ public function getPormul()
+ {
+ return $this->pormul;
+ }
+
+ /**
+ * Set velmul.
+ *
+ * @param int $velmul
+ *
+ * @return Aulas
+ */
+ public function setVelmul($velmul)
+ {
+ $this->velmul = $velmul;
+
+ return $this;
+ }
+
+ /**
+ * Get velmul.
+ *
+ * @return int
+ */
+ public function getVelmul()
+ {
+ return $this->velmul;
+ }
+
+ /**
+ * Set router.
+ *
+ * @param string|null $router
+ *
+ * @return Aulas
+ */
+ public function setRouter($router = null)
+ {
+ $this->router = $router;
+
+ return $this;
+ }
+
+ /**
+ * Get router.
+ *
+ * @return string|null
+ */
+ public function getRouter()
+ {
+ return $this->router;
+ }
+
+ /**
+ * Set netmask.
+ *
+ * @param string|null $netmask
+ *
+ * @return Aulas
+ */
+ public function setNetmask($netmask = null)
+ {
+ $this->netmask = $netmask;
+
+ return $this;
+ }
+
+ /**
+ * Get netmask.
+ *
+ * @return string|null
+ */
+ public function getNetmask()
+ {
+ return $this->netmask;
+ }
+
+ /**
+ * Set dns.
+ *
+ * @param string|null $dns
+ *
+ * @return Aulas
+ */
+ public function setDns($dns = null)
+ {
+ $this->dns = $dns;
+
+ return $this;
+ }
+
+ /**
+ * Get dns.
+ *
+ * @return string|null
+ */
+ public function getDns()
+ {
+ return $this->dns;
+ }
+
+ /**
+ * Set proxy.
+ *
+ * @param string|null $proxy
+ *
+ * @return Aulas
+ */
+ public function setProxy($proxy = null)
+ {
+ $this->proxy = $proxy;
+
+ return $this;
+ }
+
+ /**
+ * Get proxy.
+ *
+ * @return string|null
+ */
+ public function getProxy()
+ {
+ return $this->proxy;
+ }
+
+ /**
+ * Set ntp.
+ *
+ * @param string|null $ntp
+ *
+ * @return Aulas
+ */
+ public function setNtp($ntp = null)
+ {
+ $this->ntp = $ntp;
+
+ return $this;
+ }
+
+ /**
+ * Get ntp.
+ *
+ * @return string|null
+ */
+ public function getNtp()
+ {
+ return $this->ntp;
+ }
+
+ /**
+ * Set modp2p.
+ *
+ * @param string|null $modp2p
+ *
+ * @return Aulas
+ */
+ public function setModp2p($modp2p = null)
+ {
+ $this->modp2p = $modp2p;
+
+ return $this;
+ }
+
+ /**
+ * Get modp2p.
+ *
+ * @return string|null
+ */
+ public function getModp2p()
+ {
+ return $this->modp2p;
+ }
+
+ /**
+ * Set timep2p.
+ *
+ * @param int $timep2p
+ *
+ * @return Aulas
+ */
+ public function setTimep2p($timep2p)
+ {
+ $this->timep2p = $timep2p;
+
+ return $this;
+ }
+
+ /**
+ * Get timep2p.
+ *
+ * @return int
+ */
+ public function getTimep2p()
+ {
+ return $this->timep2p;
+ }
+
+ /**
+ * Set validacion.
+ *
+ * @param bool|null $validacion
+ *
+ * @return Aulas
+ */
+ public function setValidacion($validacion = null)
+ {
+ $this->validacion = $validacion;
+
+ return $this;
+ }
+
+ /**
+ * Get validacion.
+ *
+ * @return bool|null
+ */
+ public function getValidacion()
+ {
+ return $this->validacion;
+ }
+
+ /**
+ * Set paginalogin.
+ *
+ * @param string|null $paginalogin
+ *
+ * @return Aulas
+ */
+ public function setPaginalogin($paginalogin = null)
+ {
+ $this->paginalogin = $paginalogin;
+
+ return $this;
+ }
+
+ /**
+ * Get paginalogin.
+ *
+ * @return string|null
+ */
+ public function getPaginalogin()
+ {
+ return $this->paginalogin;
+ }
+
+ /**
+ * Set paginavalidacion.
+ *
+ * @param string|null $paginavalidacion
+ *
+ * @return Aulas
+ */
+ public function setPaginavalidacion($paginavalidacion = null)
+ {
+ $this->paginavalidacion = $paginavalidacion;
+
+ return $this;
+ }
+
+ /**
+ * Get paginavalidacion.
+ *
+ * @return string|null
+ */
+ public function getPaginavalidacion()
+ {
+ return $this->paginavalidacion;
+ }
+
+ /**
+ * Set inremotepc.
+ *
+ * @param bool|null $inremotepc
+ *
+ * @return Aulas
+ */
+ public function setInremotepc($inremotepc = null)
+ {
+ $this->inremotepc = $inremotepc;
+
+ return $this;
+ }
+
+ /**
+ * Get inremotepc.
+ *
+ * @return bool|null
+ */
+ public function getInremotepc()
+ {
+ return $this->inremotepc;
+ }
+
+ /**
+ * Set oglivedir.
+ *
+ * @param string $oglivedir
+ *
+ * @return Aulas
+ */
+ public function setOglivedir($oglivedir)
+ {
+ $this->oglivedir = $oglivedir;
+
+ return $this;
+ }
+
+ /**
+ * Get oglivedir.
+ *
+ * @return string
+ */
+ public function getOglivedir()
+ {
+ return $this->oglivedir;
+ }
+
+ /**
+ * Get idaula.
+ *
+ * @return int
+ */
+ public function getIdaula()
+ {
+ return $this->idaula;
+ }
+}
diff --git a/src/Entity/Migration/Centros.php b/src/Entity/Migration/Centros.php
new file mode 100644
index 0000000..1978a02
--- /dev/null
+++ b/src/Entity/Migration/Centros.php
@@ -0,0 +1,133 @@
+nombrecentro = $nombrecentro;
+
+ return $this;
+ }
+
+ /**
+ * Get nombrecentro.
+ *
+ * @return string
+ */
+ public function getNombrecentro()
+ {
+ return $this->nombrecentro;
+ }
+
+ /**
+ * Set identidad.
+ *
+ * @param int|null $identidad
+ *
+ * @return Centros
+ */
+ public function setIdentidad($identidad = null)
+ {
+ $this->identidad = $identidad;
+
+ return $this;
+ }
+
+ /**
+ * Get identidad.
+ *
+ * @return int|null
+ */
+ public function getIdentidad()
+ {
+ return $this->identidad;
+ }
+
+ /**
+ * Set comentarios.
+ *
+ * @param string|null $comentarios
+ *
+ * @return Centros
+ */
+ public function setComentarios($comentarios = null)
+ {
+ $this->comentarios = $comentarios;
+
+ return $this;
+ }
+
+ /**
+ * Get comentarios.
+ *
+ * @return string|null
+ */
+ public function getComentarios()
+ {
+ return $this->comentarios;
+ }
+
+ /**
+ * Set directorio.
+ *
+ * @param string|null $directorio
+ *
+ * @return Centros
+ */
+ public function setDirectorio($directorio = null)
+ {
+ $this->directorio = $directorio;
+
+ return $this;
+ }
+
+ /**
+ * Get directorio.
+ *
+ * @return string|null
+ */
+ public function getDirectorio()
+ {
+ return $this->directorio;
+ }
+
+ /**
+ * Get idcentro.
+ *
+ * @return int
+ */
+ public function getIdcentro()
+ {
+ return $this->idcentro;
+ }
+}
diff --git a/src/Entity/Migration/Gruposordenadores.php b/src/Entity/Migration/Gruposordenadores.php
new file mode 100644
index 0000000..d2a27b4
--- /dev/null
+++ b/src/Entity/Migration/Gruposordenadores.php
@@ -0,0 +1,133 @@
+nombregrupoordenador = $nombregrupoordenador;
+
+ return $this;
+ }
+
+ /**
+ * Get nombregrupoordenador.
+ *
+ * @return string
+ */
+ public function getNombregrupoordenador()
+ {
+ return $this->nombregrupoordenador;
+ }
+
+ /**
+ * Set idaula.
+ *
+ * @param int $idaula
+ *
+ * @return Gruposordenadores
+ */
+ public function setIdaula($idaula)
+ {
+ $this->idaula = $idaula;
+
+ return $this;
+ }
+
+ /**
+ * Get idaula.
+ *
+ * @return int
+ */
+ public function getIdaula()
+ {
+ return $this->idaula;
+ }
+
+ /**
+ * Set grupoid.
+ *
+ * @param int|null $grupoid
+ *
+ * @return Gruposordenadores
+ */
+ public function setGrupoid($grupoid = null)
+ {
+ $this->grupoid = $grupoid;
+
+ return $this;
+ }
+
+ /**
+ * Get grupoid.
+ *
+ * @return int|null
+ */
+ public function getGrupoid()
+ {
+ return $this->grupoid;
+ }
+
+ /**
+ * Set comentarios.
+ *
+ * @param string|null $comentarios
+ *
+ * @return Gruposordenadores
+ */
+ public function setComentarios($comentarios = null)
+ {
+ $this->comentarios = $comentarios;
+
+ return $this;
+ }
+
+ /**
+ * Get comentarios.
+ *
+ * @return string|null
+ */
+ public function getComentarios()
+ {
+ return $this->comentarios;
+ }
+
+ /**
+ * Get idgrupo.
+ *
+ * @return int
+ */
+ public function getIdgrupo()
+ {
+ return $this->idgrupo;
+ }
+}
diff --git a/src/Entity/Migration/Ordenadores.php b/src/Entity/Migration/Ordenadores.php
new file mode 100644
index 0000000..351defe
--- /dev/null
+++ b/src/Entity/Migration/Ordenadores.php
@@ -0,0 +1,663 @@
+nombreordenador = $nombreordenador;
+
+ return $this;
+ }
+
+ /**
+ * Get nombreordenador.
+ *
+ * @return string|null
+ */
+ public function getNombreordenador()
+ {
+ return $this->nombreordenador;
+ }
+
+ /**
+ * Set numserie.
+ *
+ * @param string|null $numserie
+ *
+ * @return Ordenadores
+ */
+ public function setNumserie($numserie = null)
+ {
+ $this->numserie = $numserie;
+
+ return $this;
+ }
+
+ /**
+ * Get numserie.
+ *
+ * @return string|null
+ */
+ public function getNumserie()
+ {
+ return $this->numserie;
+ }
+
+ /**
+ * Set ip.
+ *
+ * @param string $ip
+ *
+ * @return Ordenadores
+ */
+ public function setIp($ip)
+ {
+ $this->ip = $ip;
+
+ return $this;
+ }
+
+ /**
+ * Get ip.
+ *
+ * @return string
+ */
+ public function getIp()
+ {
+ return $this->ip;
+ }
+
+ /**
+ * Set mac.
+ *
+ * @param string|null $mac
+ *
+ * @return Ordenadores
+ */
+ public function setMac($mac = null)
+ {
+ $this->mac = $mac;
+
+ return $this;
+ }
+
+ /**
+ * Get mac.
+ *
+ * @return string|null
+ */
+ public function getMac()
+ {
+ return $this->mac;
+ }
+
+ /**
+ * Set idaula.
+ *
+ * @param int|null $idaula
+ *
+ * @return Ordenadores
+ */
+ public function setIdaula($idaula = null)
+ {
+ $this->idaula = $idaula;
+
+ return $this;
+ }
+
+ /**
+ * Get idaula.
+ *
+ * @return int|null
+ */
+ public function getIdaula()
+ {
+ return $this->idaula;
+ }
+
+ /**
+ * Set idperfilhard.
+ *
+ * @param int|null $idperfilhard
+ *
+ * @return Ordenadores
+ */
+ public function setIdperfilhard($idperfilhard = null)
+ {
+ $this->idperfilhard = $idperfilhard;
+
+ return $this;
+ }
+
+ /**
+ * Get idperfilhard.
+ *
+ * @return int|null
+ */
+ public function getIdperfilhard()
+ {
+ return $this->idperfilhard;
+ }
+
+ /**
+ * Set idrepositorio.
+ *
+ * @param int|null $idrepositorio
+ *
+ * @return Ordenadores
+ */
+ public function setIdrepositorio($idrepositorio = null)
+ {
+ $this->idrepositorio = $idrepositorio;
+
+ return $this;
+ }
+
+ /**
+ * Get idrepositorio.
+ *
+ * @return int|null
+ */
+ public function getIdrepositorio()
+ {
+ return $this->idrepositorio;
+ }
+
+ /**
+ * Set grupoid.
+ *
+ * @param int|null $grupoid
+ *
+ * @return Ordenadores
+ */
+ public function setGrupoid($grupoid = null)
+ {
+ $this->grupoid = $grupoid;
+
+ return $this;
+ }
+
+ /**
+ * Get grupoid.
+ *
+ * @return int|null
+ */
+ public function getGrupoid()
+ {
+ return $this->grupoid;
+ }
+
+ /**
+ * Set idmenu.
+ *
+ * @param int|null $idmenu
+ *
+ * @return Ordenadores
+ */
+ public function setIdmenu($idmenu = null)
+ {
+ $this->idmenu = $idmenu;
+
+ return $this;
+ }
+
+ /**
+ * Get idmenu.
+ *
+ * @return int|null
+ */
+ public function getIdmenu()
+ {
+ return $this->idmenu;
+ }
+
+ /**
+ * Set cache.
+ *
+ * @param int|null $cache
+ *
+ * @return Ordenadores
+ */
+ public function setCache($cache = null)
+ {
+ $this->cache = $cache;
+
+ return $this;
+ }
+
+ /**
+ * Get cache.
+ *
+ * @return int|null
+ */
+ public function getCache()
+ {
+ return $this->cache;
+ }
+
+ /**
+ * Set router.
+ *
+ * @param string $router
+ *
+ * @return Ordenadores
+ */
+ public function setRouter($router)
+ {
+ $this->router = $router;
+
+ return $this;
+ }
+
+ /**
+ * Get router.
+ *
+ * @return string
+ */
+ public function getRouter()
+ {
+ return $this->router;
+ }
+
+ /**
+ * Set mascara.
+ *
+ * @param string $mascara
+ *
+ * @return Ordenadores
+ */
+ public function setMascara($mascara)
+ {
+ $this->mascara = $mascara;
+
+ return $this;
+ }
+
+ /**
+ * Get mascara.
+ *
+ * @return string
+ */
+ public function getMascara()
+ {
+ return $this->mascara;
+ }
+
+ /**
+ * Set idproautoexec.
+ *
+ * @param int $idproautoexec
+ *
+ * @return Ordenadores
+ */
+ public function setIdproautoexec($idproautoexec)
+ {
+ $this->idproautoexec = $idproautoexec;
+
+ return $this;
+ }
+
+ /**
+ * Get idproautoexec.
+ *
+ * @return int
+ */
+ public function getIdproautoexec()
+ {
+ return $this->idproautoexec;
+ }
+
+ /**
+ * Set arranque.
+ *
+ * @param string $arranque
+ *
+ * @return Ordenadores
+ */
+ public function setArranque($arranque)
+ {
+ $this->arranque = $arranque;
+
+ return $this;
+ }
+
+ /**
+ * Get arranque.
+ *
+ * @return string
+ */
+ public function getArranque()
+ {
+ return $this->arranque;
+ }
+
+ /**
+ * Set netiface.
+ *
+ * @param string|null $netiface
+ *
+ * @return Ordenadores
+ */
+ public function setNetiface($netiface = null)
+ {
+ $this->netiface = $netiface;
+
+ return $this;
+ }
+
+ /**
+ * Get netiface.
+ *
+ * @return string|null
+ */
+ public function getNetiface()
+ {
+ return $this->netiface;
+ }
+
+ /**
+ * Set netdriver.
+ *
+ * @param string $netdriver
+ *
+ * @return Ordenadores
+ */
+ public function setNetdriver($netdriver)
+ {
+ $this->netdriver = $netdriver;
+
+ return $this;
+ }
+
+ /**
+ * Get netdriver.
+ *
+ * @return string
+ */
+ public function getNetdriver()
+ {
+ return $this->netdriver;
+ }
+
+ /**
+ * Set fotoord.
+ *
+ * @param string $fotoord
+ *
+ * @return Ordenadores
+ */
+ public function setFotoord($fotoord)
+ {
+ $this->fotoord = $fotoord;
+
+ return $this;
+ }
+
+ /**
+ * Get fotoord.
+ *
+ * @return string
+ */
+ public function getFotoord()
+ {
+ return $this->fotoord;
+ }
+
+ /**
+ * Set validacion.
+ *
+ * @param bool|null $validacion
+ *
+ * @return Ordenadores
+ */
+ public function setValidacion($validacion = null)
+ {
+ $this->validacion = $validacion;
+
+ return $this;
+ }
+
+ /**
+ * Get validacion.
+ *
+ * @return bool|null
+ */
+ public function getValidacion()
+ {
+ return $this->validacion;
+ }
+
+ /**
+ * Set paginalogin.
+ *
+ * @param string|null $paginalogin
+ *
+ * @return Ordenadores
+ */
+ public function setPaginalogin($paginalogin = null)
+ {
+ $this->paginalogin = $paginalogin;
+
+ return $this;
+ }
+
+ /**
+ * Get paginalogin.
+ *
+ * @return string|null
+ */
+ public function getPaginalogin()
+ {
+ return $this->paginalogin;
+ }
+
+ /**
+ * Set paginavalidacion.
+ *
+ * @param string|null $paginavalidacion
+ *
+ * @return Ordenadores
+ */
+ public function setPaginavalidacion($paginavalidacion = null)
+ {
+ $this->paginavalidacion = $paginavalidacion;
+
+ return $this;
+ }
+
+ /**
+ * Get paginavalidacion.
+ *
+ * @return string|null
+ */
+ public function getPaginavalidacion()
+ {
+ return $this->paginavalidacion;
+ }
+
+ /**
+ * Set agentkey.
+ *
+ * @param string|null $agentkey
+ *
+ * @return Ordenadores
+ */
+ public function setAgentkey($agentkey = null)
+ {
+ $this->agentkey = $agentkey;
+
+ return $this;
+ }
+
+ /**
+ * Get agentkey.
+ *
+ * @return string|null
+ */
+ public function getAgentkey()
+ {
+ return $this->agentkey;
+ }
+
+ /**
+ * Set oglivedir.
+ *
+ * @param string $oglivedir
+ *
+ * @return Ordenadores
+ */
+ public function setOglivedir($oglivedir)
+ {
+ $this->oglivedir = $oglivedir;
+
+ return $this;
+ }
+
+ /**
+ * Get oglivedir.
+ *
+ * @return string
+ */
+ public function getOglivedir()
+ {
+ return $this->oglivedir;
+ }
+
+ /**
+ * Get idordenador.
+ *
+ * @return int
+ */
+ public function getIdordenador()
+ {
+ return $this->idordenador;
+ }
+}
diff --git a/src/Entity/NameableTrait.php b/src/Entity/NameableTrait.php
new file mode 100644
index 0000000..fdeadfa
--- /dev/null
+++ b/src/Entity/NameableTrait.php
@@ -0,0 +1,25 @@
+name;
+ }
+
+ public function setName(string $name): static
+ {
+ $this->name = $name;
+
+ return $this;
+ }
+
+
+}
\ No newline at end of file
diff --git a/src/Entity/NetworkSettings.php b/src/Entity/NetworkSettings.php
new file mode 100644
index 0000000..7f36461
--- /dev/null
+++ b/src/Entity/NetworkSettings.php
@@ -0,0 +1,224 @@
+
+ */
+ #[ORM\OneToMany(targetEntity: OrganizationalUnit::class, mappedBy: 'networkSettings')]
+ private Collection $organizationalUnits;
+
+ public function __construct()
+ {
+ parent::__construct();
+ $this->organizationalUnits = new ArrayCollection();
+ }
+
+ public function getId(): ?int
+ {
+ return $this->id;
+ }
+
+ public function getProxy(): ?string
+ {
+ return $this->proxy;
+ }
+
+ public function setProxy(?string $proxy): static
+ {
+ $this->proxy = $proxy;
+
+ return $this;
+ }
+
+ public function getDns(): ?string
+ {
+ return $this->dns;
+ }
+
+ public function setDns(?string $dns): static
+ {
+ $this->dns = $dns;
+
+ return $this;
+ }
+
+ public function getNetmask(): ?string
+ {
+ return $this->netmask;
+ }
+
+ public function setNetmask(?string $netmask): static
+ {
+ $this->netmask = $netmask;
+
+ return $this;
+ }
+
+ public function getRouter(): ?string
+ {
+ return $this->router;
+ }
+
+ public function setRouter(?string $router): static
+ {
+ $this->router = $router;
+
+ return $this;
+ }
+
+ public function getNtp(): ?string
+ {
+ return $this->ntp;
+ }
+
+ public function setNtp(?string $ntp): static
+ {
+ $this->ntp = $ntp;
+
+ return $this;
+ }
+
+ public function getP2pTime(): ?int
+ {
+ return $this->p2pTime;
+ }
+
+ public function setP2pTime(?int $p2pTime): static
+ {
+ $this->p2pTime = $p2pTime;
+
+ return $this;
+ }
+
+ public function getP2pMode(): ?string
+ {
+ return $this->p2pMode;
+ }
+
+ public function setP2pMode(?string $p2pMode): static
+ {
+ $this->p2pMode = $p2pMode;
+
+ return $this;
+ }
+
+ public function getMcastIp(): ?string
+ {
+ return $this->mcastIp;
+ }
+
+ public function setMcastIp(?string $mcastIp): static
+ {
+ $this->mcastIp = $mcastIp;
+
+ return $this;
+ }
+
+ public function getMcastSpeed(): ?int
+ {
+ return $this->mcastSpeed;
+ }
+
+ public function setMcastSpeed(int $mcastSpeed): static
+ {
+ $this->mcastSpeed = $mcastSpeed;
+
+ return $this;
+ }
+
+ public function getMcastMode(): ?string
+ {
+ return $this->mcastMode;
+ }
+
+ public function setMcastMode(?string $mcastMode): static
+ {
+ $this->mcastMode = $mcastMode;
+
+ return $this;
+ }
+
+ public function getMcastPort(): ?int
+ {
+ return $this->mcastPort;
+ }
+
+ public function setMcastPort(?int $mcastPort): static
+ {
+ $this->mcastPort = $mcastPort;
+
+ return $this;
+ }
+
+ /**
+ * @return Collection
+ */
+ public function getOrganizationalUnits(): Collection
+ {
+ return $this->organizationalUnits;
+ }
+
+ public function addOrganizationalUnit(OrganizationalUnit $organizationalUnit): static
+ {
+ if (!$this->organizationalUnits->contains($organizationalUnit)) {
+ $this->organizationalUnits->add($organizationalUnit);
+ $organizationalUnit->setNetworkSettings($this);
+ }
+
+ return $this;
+ }
+
+ public function removeOrganizationalUnit(OrganizationalUnit $organizationalUnit): static
+ {
+ if ($this->organizationalUnits->removeElement($organizationalUnit)) {
+ // set the owning side to null (unless already changed)
+ if ($organizationalUnit->getNetworkSettings() === $this) {
+ $organizationalUnit->setNetworkSettings(null);
+ }
+ }
+
+ return $this;
+ }
+}
diff --git a/src/Entity/OrganizationalUnit.php b/src/Entity/OrganizationalUnit.php
new file mode 100644
index 0000000..6e58c7f
--- /dev/null
+++ b/src/Entity/OrganizationalUnit.php
@@ -0,0 +1,239 @@
+
+ */
+ #[ORM\OneToMany(mappedBy: 'parent', targetEntity: self::class)]
+ private Collection $organizationalUnits;
+
+ #[ORM\ManyToOne(inversedBy: 'organizationalUnits')]
+ private ?NetworkSettings $networkSettings = null;
+
+ /**
+ * @var Collection
+ */
+ #[ORM\ManyToMany(targetEntity: User::class, mappedBy: 'allowedOrganizationalUnits')]
+ private Collection $users;
+
+ /**
+ * @var Collection
+ */
+ #[ORM\OneToMany(mappedBy: 'organizationalUnit', targetEntity: Client::class)]
+ private Collection $clients;
+
+ public function __construct()
+ {
+ parent::__construct();
+ $this->organizationalUnits = new ArrayCollection();
+ $this->users = new ArrayCollection();
+ $this->clients = new ArrayCollection();
+ }
+
+ public function getDescription(): ?string
+ {
+ return $this->description;
+ }
+
+ public function setDescription(?string $description): static
+ {
+ $this->description = $description;
+
+ return $this;
+ }
+
+ public function getComments(): ?string
+ {
+ return $this->comments;
+ }
+
+ public function setComments(?string $comments): static
+ {
+ $this->comments = $comments;
+
+ return $this;
+ }
+
+ public function getPath(): ?string
+ {
+ return $this->path;
+ }
+
+ public function setPath(?string $path): static
+ {
+ $this->path = $path;
+
+ return $this;
+ }
+
+ public function getLevel(): ?int
+ {
+ return $this->level;
+ }
+
+ public function setLevel(?int $level): static
+ {
+ $this->level = $level;
+
+ return $this;
+ }
+
+ public function getSlug(): ?string
+ {
+ return $this->slug;
+ }
+
+ public function setSlug(?string $slug): static
+ {
+ $this->slug = $slug;
+
+ return $this;
+ }
+
+ public function getParent(): ?self
+ {
+ return $this->parent;
+ }
+
+ public function setParent(?self $parent): static
+ {
+ $this->parent = $parent;
+
+ return $this;
+ }
+
+ /**
+ * @return Collection
+ */
+ public function getOrganizationalUnits(): Collection
+ {
+ return $this->organizationalUnits;
+ }
+
+ public function addOrganizationalUnit(self $organizationalUnit): static
+ {
+ if (!$this->organizationalUnits->contains($organizationalUnit)) {
+ $this->organizationalUnits->add($organizationalUnit);
+ $organizationalUnit->setParent($this);
+ }
+
+ return $this;
+ }
+
+ public function removeOrganizationalUnit(self $organizationalUnit): static
+ {
+ if ($this->organizationalUnits->removeElement($organizationalUnit)) {
+ // set the owning side to null (unless already changed)
+ if ($organizationalUnit->getParent() === $this) {
+ $organizationalUnit->setParent(null);
+ }
+ }
+
+ return $this;
+ }
+
+ public function getNetworkSettings(): ?NetworkSettings
+ {
+ return $this->networkSettings;
+ }
+
+ public function setNetworkSettings(?NetworkSettings $networkSettings): static
+ {
+ $this->networkSettings = $networkSettings;
+
+ return $this;
+ }
+
+ /**
+ * @return Collection
+ */
+ public function getUsers(): Collection
+ {
+ return $this->users;
+ }
+
+ public function addUser(User $user): static
+ {
+ if (!$this->users->contains($user)) {
+ $this->users->add($user);
+ $user->addAllowedOrganizationalUnit($this);
+ }
+
+ return $this;
+ }
+
+ public function removeUser(User $user): static
+ {
+ if ($this->users->removeElement($user)) {
+ $user->removeAllowedOrganizationalUnit($this);
+ }
+
+ return $this;
+ }
+
+ /**
+ * @return Collection
+ */
+ public function getClients(): Collection
+ {
+ return $this->clients;
+ }
+
+ public function addClient(Client $client): static
+ {
+ if (!$this->clients->contains($client)) {
+ $this->clients->add($client);
+ $client->setOrganizationalUnit($this);
+ }
+
+ return $this;
+ }
+
+ public function removeClient(Client $client): static
+ {
+ if ($this->clients->removeElement($client)) {
+ if ($client->getOrganizationalUnit() === $this) {
+ $client->setOrganizationalUnit(null);
+ }
+ }
+
+ return $this;
+ }
+}
diff --git a/src/Entity/ToggleableTrait.php b/src/Entity/ToggleableTrait.php
new file mode 100644
index 0000000..7bce1d3
--- /dev/null
+++ b/src/Entity/ToggleableTrait.php
@@ -0,0 +1,23 @@
+enabled;
+ }
+
+ public function setEnabled(bool $enabled): static
+ {
+ $this->enabled = $enabled;
+
+ return $this;
+ }
+}
diff --git a/src/Entity/User.php b/src/Entity/User.php
index 48bedd2..e7f4c6d 100644
--- a/src/Entity/User.php
+++ b/src/Entity/User.php
@@ -3,18 +3,22 @@
namespace App\Entity;
use App\Repository\UserRepository;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
+use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\UserInterface;
#[ORM\Entity(repositoryClass: UserRepository::class)]
#[ORM\UniqueConstraint(name: 'UNIQ_IDENTIFIER_USERNAME', fields: ['username'])]
-class User implements UserInterface, PasswordAuthenticatedUserInterface
+#[UniqueEntity(fields: ['username'], message: 'There is already an account with this username')]
+class User extends AbstractEntity implements UserInterface, PasswordAuthenticatedUserInterface
{
- #[ORM\Id]
- #[ORM\GeneratedValue]
- #[ORM\Column]
- private ?int $id = null;
+ use ToggleableTrait;
+
+ const ROLE_SUPER_ADMIN = 'ROLE_SUPER_ADMIN';
+ const ROLE_USER = 'ROLE_USER';
#[ORM\Column(length: 180)]
private ?string $username = null;
@@ -31,9 +35,23 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
#[ORM\Column]
private ?string $password = null;
- public function getId(): ?int
+ /**
+ * @var Collection
+ */
+ #[ORM\ManyToMany(targetEntity: UserGroup::class, mappedBy: 'users')]
+ private Collection $userGroups;
+
+ /**
+ * @var Collection
+ */
+ #[ORM\ManyToMany(targetEntity: OrganizationalUnit::class, inversedBy: 'users')]
+ private Collection $allowedOrganizationalUnits;
+
+ public function __construct()
{
- return $this->id;
+ parent::__construct();
+ $this->userGroups = new ArrayCollection();
+ $this->allowedOrganizationalUnits = new ArrayCollection();
}
public function getUsername(): ?string
@@ -66,10 +84,18 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
public function getRoles(): array
{
$roles = $this->roles;
- // guarantee every user at least has ROLE_USER
- $roles[] = 'ROLE_USER';
- return array_unique($roles);
+ if (!array_search(self::ROLE_USER, $roles, true)){
+ $roles[] = self::ROLE_USER;
+ }
+
+ foreach ($this->getUserGroups() as $userGroup) {
+ if ($userGroup->isEnabled()){
+ $roles = array_merge($roles, $userGroup->getPermissions());
+ }
+ }
+
+ return array_merge(array_unique($roles));
}
/**
@@ -105,4 +131,77 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
// If you store any temporary, sensitive data on the user, clear it here
// $this->plainPassword = null;
}
+
+ /**
+ * @return Collection
+ */
+ public function getUserGroups(): Collection
+ {
+ return $this->userGroups;
+ }
+
+ public function setUserGroups(array $userGroup): static
+ {
+ $this->userGroups->clear();
+
+ foreach ($userGroup as $group){
+ $this->addUserGroup($group);
+ }
+
+ return $this;
+ }
+
+ public function addUserGroup(UserGroup $userGroup): static
+ {
+ if (!$this->userGroups->contains($userGroup)) {
+ $this->userGroups->add($userGroup);
+ $userGroup->addUser($this);
+ }
+
+ return $this;
+ }
+
+ public function removeUserGroup(UserGroup $userGroup): static
+ {
+ if ($this->userGroups->removeElement($userGroup)) {
+ $userGroup->removeUser($this);
+ }
+
+ return $this;
+ }
+
+ /**
+ * @return Collection
+ */
+ public function getAllowedOrganizationalUnits(): Collection
+ {
+ return $this->allowedOrganizationalUnits;
+ }
+
+ public function setAllowedOrganizationalUnits(array $allowedOrganizationalUnits): static
+ {
+ $this->allowedOrganizationalUnits->clear();
+
+ foreach ($allowedOrganizationalUnits as $allowedOrganizationalUnit){
+ $this->addAllowedOrganizationalUnit($allowedOrganizationalUnit);
+ }
+
+ return $this;
+ }
+
+ public function addAllowedOrganizationalUnit(OrganizationalUnit $allowedOrganizationalUnit): static
+ {
+ if (!$this->allowedOrganizationalUnits->contains($allowedOrganizationalUnit)) {
+ $this->allowedOrganizationalUnits->add($allowedOrganizationalUnit);
+ }
+
+ return $this;
+ }
+
+ public function removeAllowedOrganizationalUnit(OrganizationalUnit $allowedOrganizationalUnit): static
+ {
+ $this->allowedOrganizationalUnits->removeElement($allowedOrganizationalUnit);
+
+ return $this;
+ }
}
diff --git a/src/Entity/UserGroup.php b/src/Entity/UserGroup.php
new file mode 100644
index 0000000..a017aa9
--- /dev/null
+++ b/src/Entity/UserGroup.php
@@ -0,0 +1,71 @@
+
+ */
+ #[ORM\ManyToMany(targetEntity: User::class, inversedBy: 'userGroups')]
+ private Collection $users;
+
+ public function __construct()
+ {
+ parent::__construct();
+
+ $this->users = new ArrayCollection();
+ }
+
+ public function getPermissions(): array
+ {
+ return $this->permissions;
+ }
+
+ public function setPermissions(array $permissions): static
+ {
+ $this->permissions = $permissions;
+
+ return $this;
+ }
+
+ /**
+ * @return Collection
+ */
+ public function getUsers(): Collection
+ {
+ return $this->users;
+ }
+
+ public function addUser(User $user): static
+ {
+ if (!$this->users->contains($user)) {
+ $this->users->add($user);
+ }
+
+ return $this;
+ }
+
+ public function removeUser(User $user): static
+ {
+ $this->users->removeElement($user);
+
+ return $this;
+ }
+}
diff --git a/src/Factory/OrganizationalUnitFactory.php b/src/Factory/OrganizationalUnitFactory.php
new file mode 100644
index 0000000..c4be743
--- /dev/null
+++ b/src/Factory/OrganizationalUnitFactory.php
@@ -0,0 +1,54 @@
+
+ */
+final class OrganizationalUnitFactory extends ModelFactory
+{
+ /**
+ * @see https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#factories-as-services
+ *
+ * @todo inject services if required
+ */
+ public function __construct()
+ {
+ parent::__construct();
+ }
+
+ /**
+ * @see https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#model-factories
+ *
+ * @todo add your default values here
+ */
+ protected function getDefaults(): array
+ {
+ return [
+ 'createdAt' => self::faker()->dateTime(),
+ 'name' => self::faker()->text(255),
+ 'updatedAt' => self::faker()->dateTime(),
+ ];
+ }
+
+ /**
+ * @see https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#initialization
+ */
+ protected function initialize(): self
+ {
+ return $this
+ // ->afterInstantiate(function(OrganizationalUnit $organizationalUnit): void {})
+ ;
+ }
+
+ protected static function getClass(): string
+ {
+ return OrganizationalUnit::class;
+ }
+}
diff --git a/src/Factory/UserFactory.php b/src/Factory/UserFactory.php
index 0e41c60..d626634 100644
--- a/src/Factory/UserFactory.php
+++ b/src/Factory/UserFactory.php
@@ -16,11 +16,6 @@ final class UserFactory extends ModelFactory
{
CONST PLAIN_PASSWORD = '12345678';
- /**
- * @see https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#factories-as-services
- *
- * @todo inject services if required
- */
public function __construct()
{
parent::__construct();
diff --git a/src/Factory/UserGroupFactory.php b/src/Factory/UserGroupFactory.php
new file mode 100644
index 0000000..30df222
--- /dev/null
+++ b/src/Factory/UserGroupFactory.php
@@ -0,0 +1,45 @@
+
+ */
+final class UserGroupFactory extends ModelFactory
+{
+ public function __construct()
+ {
+ parent::__construct();
+ }
+
+
+ protected function getDefaults(): array
+ {
+ return [
+ 'createdAt' => self::faker()->dateTime(),
+ 'permissions' => [],
+ 'updatedAt' => self::faker()->dateTime(),
+ ];
+ }
+
+ /**
+ * @see https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#initialization
+ */
+ protected function initialize(): self
+ {
+ return $this
+ // ->afterInstantiate(function(UserGroup $userGroup): void {})
+ ;
+ }
+
+ protected static function getClass(): string
+ {
+ return UserGroup::class;
+ }
+}
diff --git a/src/Model/UserGroupPermissions.php b/src/Model/UserGroupPermissions.php
new file mode 100644
index 0000000..90a3c9b
--- /dev/null
+++ b/src/Model/UserGroupPermissions.php
@@ -0,0 +1,36 @@
+ 'Super Admin',
+ self::ROLE_ORGANIZATIONAL_UNIT_ADMIN => 'Admin de aulas',
+ self::ROLE_ORGANIZATIONAL_UNIT_OPERATOR => 'Operador de aulas',
+ self::ROLE_ORGANIZATIONAL_UNIT_MINIMAL => 'Usuario básico de aulas',
+ self::ROLE_USER => 'Usuario',
+ ];
+
+ public static function getRoleNames(): array
+ {
+ return self::ROLE_NAMES;
+ }
+
+ public static function getRoleName(string $role): ?string
+ {
+ return self::ROLE_NAMES[$role] ?? null;
+ }
+
+ public static function getRoles(): array
+ {
+ return array_keys(self::ROLE_NAMES);
+ }
+}
\ No newline at end of file
diff --git a/src/Repository/.gitignore b/src/Repository/.gitignore
deleted file mode 100644
index e69de29..0000000
diff --git a/src/Repository/AbstractRepository.php b/src/Repository/AbstractRepository.php
new file mode 100644
index 0000000..ff14f0b
--- /dev/null
+++ b/src/Repository/AbstractRepository.php
@@ -0,0 +1,35 @@
+getEntityManager()->persist($entity);
+
+ if ($flush) {
+ $this->getEntityManager()->flush();
+ }
+ }
+
+ public function delete (AbstractEntity $entity, bool $flush = true): void
+ {
+ $this->getEntityManager()->remove($entity);
+
+ if ($flush) {
+ $this->getEntityManager()->flush();
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Repository/ClientRepository.php b/src/Repository/ClientRepository.php
new file mode 100644
index 0000000..81c3e7f
--- /dev/null
+++ b/src/Repository/ClientRepository.php
@@ -0,0 +1,43 @@
+
+ */
+class ClientRepository extends ServiceEntityRepository
+{
+ public function __construct(ManagerRegistry $registry)
+ {
+ parent::__construct($registry, Client::class);
+ }
+
+ // /**
+ // * @return Client[] Returns an array of Client objects
+ // */
+ // public function findByExampleField($value): array
+ // {
+ // return $this->createQueryBuilder('c')
+ // ->andWhere('c.exampleField = :val')
+ // ->setParameter('val', $value)
+ // ->orderBy('c.id', 'ASC')
+ // ->setMaxResults(10)
+ // ->getQuery()
+ // ->getResult()
+ // ;
+ // }
+
+ // public function findOneBySomeField($value): ?Client
+ // {
+ // return $this->createQueryBuilder('c')
+ // ->andWhere('c.exampleField = :val')
+ // ->setParameter('val', $value)
+ // ->getQuery()
+ // ->getOneOrNullResult()
+ // ;
+ // }
+}
diff --git a/src/Repository/NetworkSettingsRepository.php b/src/Repository/NetworkSettingsRepository.php
new file mode 100644
index 0000000..66a3251
--- /dev/null
+++ b/src/Repository/NetworkSettingsRepository.php
@@ -0,0 +1,43 @@
+
+ */
+class NetworkSettingsRepository extends ServiceEntityRepository
+{
+ public function __construct(ManagerRegistry $registry)
+ {
+ parent::__construct($registry, NetworkSettings::class);
+ }
+
+// /**
+// * @return NetworkSettings[] Returns an array of NetworkSettings objects
+// */
+// public function findByExampleField($value): array
+// {
+// return $this->createQueryBuilder('n')
+// ->andWhere('n.exampleField = :val')
+// ->setParameter('val', $value)
+// ->orderBy('n.id', 'ASC')
+// ->setMaxResults(10)
+// ->getQuery()
+// ->getResult()
+// ;
+// }
+
+// public function findOneBySomeField($value): ?NetworkSettings
+// {
+// return $this->createQueryBuilder('n')
+// ->andWhere('n.exampleField = :val')
+// ->setParameter('val', $value)
+// ->getQuery()
+// ->getOneOrNullResult()
+// ;
+// }
+}
diff --git a/src/Repository/OrganizationalUnitRepository.php b/src/Repository/OrganizationalUnitRepository.php
new file mode 100644
index 0000000..566214c
--- /dev/null
+++ b/src/Repository/OrganizationalUnitRepository.php
@@ -0,0 +1,18 @@
+
+ */
+class OrganizationalUnitRepository extends AbstractRepository
+{
+ public function __construct(ManagerRegistry $registry)
+ {
+ parent::__construct($registry, OrganizationalUnit::class);
+ }
+}
diff --git a/src/Repository/UserGroupRepository.php b/src/Repository/UserGroupRepository.php
new file mode 100644
index 0000000..64fec99
--- /dev/null
+++ b/src/Repository/UserGroupRepository.php
@@ -0,0 +1,18 @@
+
+ */
+class UserGroupRepository extends AbstractRepository
+{
+ public function __construct(ManagerRegistry $registry)
+ {
+ parent::__construct($registry, UserGroup::class);
+ }
+}
diff --git a/src/Repository/UserRepository.php b/src/Repository/UserRepository.php
index 4f2804e..dc47b0b 100644
--- a/src/Repository/UserRepository.php
+++ b/src/Repository/UserRepository.php
@@ -12,7 +12,7 @@ use Symfony\Component\Security\Core\User\PasswordUpgraderInterface;
/**
* @extends ServiceEntityRepository
*/
-class UserRepository extends ServiceEntityRepository implements PasswordUpgraderInterface
+class UserRepository extends AbstractRepository implements PasswordUpgraderInterface
{
public function __construct(ManagerRegistry $registry)
{
@@ -32,29 +32,4 @@ class UserRepository extends ServiceEntityRepository implements PasswordUpgrader
$this->getEntityManager()->persist($user);
$this->getEntityManager()->flush();
}
-
- // /**
- // * @return User[] Returns an array of User objects
- // */
- // public function findByExampleField($value): array
- // {
- // return $this->createQueryBuilder('u')
- // ->andWhere('u.exampleField = :val')
- // ->setParameter('val', $value)
- // ->orderBy('u.id', 'ASC')
- // ->setMaxResults(10)
- // ->getQuery()
- // ->getResult()
- // ;
- // }
-
- // public function findOneBySomeField($value): ?User
- // {
- // return $this->createQueryBuilder('u')
- // ->andWhere('u.exampleField = :val')
- // ->setParameter('val', $value)
- // ->getQuery()
- // ->getOneOrNullResult()
- // ;
- // }
}
diff --git a/src/State/Processor/OrganizationalUnitProcessor.php b/src/State/Processor/OrganizationalUnitProcessor.php
new file mode 100644
index 0000000..4dd6aac
--- /dev/null
+++ b/src/State/Processor/OrganizationalUnitProcessor.php
@@ -0,0 +1,68 @@
+processCreateOrUpdate($data, $operation, $uriVariables, $context);
+ case $operation instanceof Delete:
+ return $this->processDelete($data, $operation, $uriVariables, $context);
+ }
+ }
+
+ /**
+ * @throws \Exception
+ */
+ private function processCreateOrUpdate($data, Operation $operation, array $uriVariables = [], array $context = []): OrganizationalUnitOutput
+ {
+ if (!($data instanceof OrganizationalUnitOutput)) {
+ throw new \Exception(sprintf('data is not instance of %s', OrganizationalUnitInput::class));
+ }
+
+ $entity = null;
+ if (isset($uriVariables['uuid'])) {
+ $entity = $this->organizationalUnitRepository->findOneByUuid($uriVariables['uuid']);
+ }
+
+ $organizationalUnit = $data->createOrUpdateEntity($entity);
+ $this->validator->validate($organizationalUnit);
+ $this->organizationalUnitRepository->save($organizationalUnit);
+
+ return new OrganizationalUnitOutput($organizationalUnit);
+ }
+
+ private function processDelete($data, Operation $operation, array $uriVariables = [], array $context = []): null
+ {
+ $user = $this->organizationalUnitRepository->findOneByUuid($uriVariables['uuid']);
+ $this->organizationalUnitRepository->delete($user);
+
+ return null;
+ }
+}
diff --git a/src/State/Processor/UserGroupProcessor.php b/src/State/Processor/UserGroupProcessor.php
new file mode 100644
index 0000000..e45900b
--- /dev/null
+++ b/src/State/Processor/UserGroupProcessor.php
@@ -0,0 +1,68 @@
+processCreateOrUpdate($data, $operation, $uriVariables, $context);
+ case $operation instanceof Delete:
+ return $this->processDelete($data, $operation, $uriVariables, $context);
+ }
+ }
+
+ /**
+ * @throws \Exception
+ */
+ private function processCreateOrUpdate($data, Operation $operation, array $uriVariables = [], array $context = []): UserGroupOutput
+ {
+ if (!($data instanceof UserGroupInput)) {
+ throw new \Exception(sprintf('data is not instance of %s', UserGroupInput::class));
+ }
+
+ $entity = null;
+ if (isset($uriVariables['uuid'])) {
+ $entity = $this->userGroupRepository->findOneByUuid($uriVariables['uuid']);
+ }
+
+ $userGroup = $data->createOrUpdateEntity($entity);
+ $this->validator->validate($userGroup);
+ $this->userGroupRepository->save($userGroup);
+
+ return new UserGroupOutput($userGroup);
+ }
+
+ private function processDelete($data, Operation $operation, array $uriVariables = [], array $context = []): null
+ {
+ $user = $this->userGroupRepository->findOneByUuid($uriVariables['uuid']);
+ $this->userGroupRepository->delete($user);
+
+ return null;
+ }
+}
diff --git a/src/State/Processor/UserProcessor.php b/src/State/Processor/UserProcessor.php
new file mode 100644
index 0000000..bf8558b
--- /dev/null
+++ b/src/State/Processor/UserProcessor.php
@@ -0,0 +1,75 @@
+processCreateOrUpdate($data, $operation, $uriVariables, $context);
+ case $operation instanceof Delete:
+ return $this->processDelete($data, $operation, $uriVariables, $context);
+ }
+ }
+
+ /**
+ * @throws \Exception
+ */
+ private function processCreateOrUpdate($data, Operation $operation, array $uriVariables = [], array $context = []): UserOutput
+ {
+ if (!($data instanceof UserInput)) {
+ throw new \Exception(sprintf('data is not instance of %s', UserInput::class));
+ }
+
+ $user = null;
+ if (isset($uriVariables['uuid'])) {
+ $user = $this->userRepository->findOneByUuid($uriVariables['uuid']);
+ }
+
+ $user = $data->createOrUpdateEntity($user);
+
+ if ($data->password !== null){
+ $user->setPassword($this->userPasswordHasher->hashPassword($user, $data->password));
+ }
+
+ $this->validator->validate($user);
+ $this->userRepository->save($user);
+
+ return new UserOutput($user);
+ }
+
+ private function processDelete($data, Operation $operation, array $uriVariables = [], array $context = []): null
+ {
+ $user = $this->userRepository->findOneByUuid($uriVariables['uuid']);
+ $this->userRepository->delete($user);
+
+ return null;
+ }
+}
diff --git a/src/State/Provider/OrganizationalUnitProvider.php b/src/State/Provider/OrganizationalUnitProvider.php
new file mode 100644
index 0000000..83d5735
--- /dev/null
+++ b/src/State/Provider/OrganizationalUnitProvider.php
@@ -0,0 +1,71 @@
+provideCollection($operation, $uriVariables, $context);
+ case $operation instanceof Patch:
+ case $operation instanceof Put:
+ return $this->provideInput($operation, $uriVariables, $context);
+ case $operation instanceof Get:
+ return $this->provideItem($operation, $uriVariables, $context);
+ }
+ }
+
+ private function provideCollection(Operation $operation, array $uriVariables = [], array $context = []): object
+ {
+ $paginator = $this->collectionProvider->provide($operation, $uriVariables, $context);
+
+ $items = new \ArrayObject();
+ foreach ($paginator->getIterator() as $item){
+ $items[] = new OrganizationalUnitOutput($item);
+ }
+
+ return new TraversablePaginator($items, $paginator->getCurrentPage(), $paginator->getItemsPerPage(), $paginator->getTotalItems());
+ }
+
+ public function provideItem(Operation $operation, array $uriVariables = [], array $context = []): object|array|null
+ {
+ $item = $this->itemProvider->provide($operation, $uriVariables, $context);
+
+ if (!$item) {
+ throw new NotFoundHttpException('Organizational unit not found');
+ }
+
+ return new OrganizationalUnitOutput($item);
+ }
+
+ public function provideInput(Operation $operation, array $uriVariables = [], array $context = []): object|array|null
+ {
+ if (isset($uriVariables['uuid'])) {
+ $item = $this->itemProvider->provide($operation, $uriVariables, $context);
+
+ return $item !== null ? new UserGroupInput($item) : null;
+ }
+
+ return new UserGroupInput();
+ }
+}
diff --git a/src/State/Provider/UserGroupProvider.php b/src/State/Provider/UserGroupProvider.php
new file mode 100644
index 0000000..2bf73a9
--- /dev/null
+++ b/src/State/Provider/UserGroupProvider.php
@@ -0,0 +1,71 @@
+provideCollection($operation, $uriVariables, $context);
+ case $operation instanceof Patch:
+ case $operation instanceof Put:
+ return $this->provideInput($operation, $uriVariables, $context);
+ case $operation instanceof Get:
+ return $this->provideItem($operation, $uriVariables, $context);
+ }
+ }
+
+ private function provideCollection(Operation $operation, array $uriVariables = [], array $context = []): object|array|null
+ {
+ $paginator = $this->collectionProvider->provide($operation, $uriVariables, $context);
+
+ $items = new \ArrayObject();
+ foreach ($paginator->getIterator() as $item){
+ $items[] = new UserGroupOutput($item);
+ }
+
+ return new TraversablePaginator($items, $paginator->getCurrentPage(), $paginator->getItemsPerPage(), $paginator->getTotalItems());
+ }
+
+ public function provideItem(Operation $operation, array $uriVariables = [], array $context = []): object|array|null
+ {
+ $item = $this->itemProvider->provide($operation, $uriVariables, $context);
+
+ if (!$item) {
+ throw new NotFoundHttpException('User Group not found');
+ }
+
+ return new UserGroupOutput($item);
+ }
+
+ public function provideInput(Operation $operation, array $uriVariables = [], array $context = []): object|array|null
+ {
+ if (isset($uriVariables['uuid'])) {
+ $item = $this->itemProvider->provide($operation, $uriVariables, $context);
+
+ return $item !== null ? new UserGroupInput($item) : null;
+ }
+
+ return new UserGroupInput();
+ }
+}
diff --git a/src/State/Provider/UserProvider.php b/src/State/Provider/UserProvider.php
new file mode 100644
index 0000000..f3902eb
--- /dev/null
+++ b/src/State/Provider/UserProvider.php
@@ -0,0 +1,71 @@
+provideCollection($operation, $uriVariables, $context);
+ case $operation instanceof Patch:
+ case $operation instanceof Put:
+ return $this->provideInput($operation, $uriVariables, $context);
+ case $operation instanceof Get:
+ return $this->provideItem($operation, $uriVariables, $context);
+ }
+ }
+
+ private function provideCollection(Operation $operation, array $uriVariables = [], array $context = []): object|array|null
+ {
+ $paginator = $this->collectionProvider->provide($operation, $uriVariables, $context);
+
+ $items = new \ArrayObject();
+ foreach ($paginator->getIterator() as $item){
+ $items[] = new UserOutput($item);
+ }
+
+ return new TraversablePaginator($items, $paginator->getCurrentPage(), $paginator->getItemsPerPage(), $paginator->getTotalItems());
+ }
+
+ public function provideItem(Operation $operation, array $uriVariables = [], array $context = []): object|array|null
+ {
+ $item = $this->itemProvider->provide($operation, $uriVariables, $context);
+
+ if (!$item) {
+ throw new NotFoundHttpException('User not found');
+ }
+
+ return new UserOutput($item);
+ }
+
+ public function provideInput(Operation $operation, array $uriVariables = [], array $context = []): object|array|null
+ {
+ if (isset($uriVariables['uuid'])) {
+ $item = $this->itemProvider->provide($operation, $uriVariables, $context);
+
+ return $item !== null ? new UserInput($item) : null;
+ }
+
+ return new UserInput();
+ }
+}
diff --git a/src/Validator/Constraints/UserGroupsValidPermission.php b/src/Validator/Constraints/UserGroupsValidPermission.php
new file mode 100644
index 0000000..b4a2841
--- /dev/null
+++ b/src/Validator/Constraints/UserGroupsValidPermission.php
@@ -0,0 +1,26 @@
+roles = UserGroupPermissions::getRoles();
+ $this->message = sprintf(
+ 'The permission is not valid. Please use one of the following: %s',
+ implode(', ', $this->roles)
+ );
+ }
+
+
+}
\ No newline at end of file
diff --git a/src/Validator/Constraints/UserGroupsValidPermissionValidator.php b/src/Validator/Constraints/UserGroupsValidPermissionValidator.php
new file mode 100644
index 0000000..031039a
--- /dev/null
+++ b/src/Validator/Constraints/UserGroupsValidPermissionValidator.php
@@ -0,0 +1,23 @@
+context->buildViolation($constraint->message)->addViolation();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/swagger-assets/img.png b/swagger-assets/img.png
new file mode 100644
index 0000000..6673bfc
Binary files /dev/null and b/swagger-assets/img.png differ
diff --git a/swagger-assets/img2.png b/swagger-assets/img2.png
new file mode 100644
index 0000000..fa4241c
Binary files /dev/null and b/swagger-assets/img2.png differ
diff --git a/swagger-assets/img3.png b/swagger-assets/img3.png
new file mode 100644
index 0000000..4ea8d9a
Binary files /dev/null and b/swagger-assets/img3.png differ
diff --git a/symfony.lock b/symfony.lock
index 3e86e9a..8640694 100644
--- a/symfony.lock
+++ b/symfony.lock
@@ -13,6 +13,18 @@
"src/ApiResource/.gitignore"
]
},
+ "dama/doctrine-test-bundle": {
+ "version": "8.1",
+ "recipe": {
+ "repo": "github.com/symfony/recipes-contrib",
+ "branch": "main",
+ "version": "7.2",
+ "ref": "896306d79d4ee143af9eadf9b09fd34a8c391b70"
+ },
+ "files": [
+ "config/packages/dama_doctrine_test_bundle.yaml"
+ ]
+ },
"doctrine/doctrine-bundle": {
"version": "2.12",
"recipe": {
@@ -90,6 +102,44 @@
"config/packages/nelmio_cors.yaml"
]
},
+ "phpunit/phpunit": {
+ "version": "9.6",
+ "recipe": {
+ "repo": "github.com/symfony/recipes",
+ "branch": "main",
+ "version": "9.6",
+ "ref": "7364a21d87e658eb363c5020c072ecfdc12e2326"
+ },
+ "files": [
+ ".env.test",
+ "phpunit.xml.dist",
+ "tests/bootstrap.php"
+ ]
+ },
+ "ramsey/uuid-doctrine": {
+ "version": "2.0",
+ "recipe": {
+ "repo": "github.com/symfony/recipes-contrib",
+ "branch": "main",
+ "version": "1.3",
+ "ref": "471aed0fbf5620b8d7f92b7a5ebbbf6c0945c27a"
+ },
+ "files": [
+ "config/packages/ramsey_uuid_doctrine.yaml"
+ ]
+ },
+ "stof/doctrine-extensions-bundle": {
+ "version": "1.10",
+ "recipe": {
+ "repo": "github.com/symfony/recipes-contrib",
+ "branch": "main",
+ "version": "1.2",
+ "ref": "e805aba9eff5372e2d149a9ff56566769e22819d"
+ },
+ "files": [
+ "config/packages/stof_doctrine_extensions.yaml"
+ ]
+ },
"symfony/console": {
"version": "6.4",
"recipe": {
@@ -142,6 +192,21 @@
"ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f"
}
},
+ "symfony/phpunit-bridge": {
+ "version": "7.0",
+ "recipe": {
+ "repo": "github.com/symfony/recipes",
+ "branch": "main",
+ "version": "6.3",
+ "ref": "a411a0480041243d97382cac7984f7dce7813c08"
+ },
+ "files": [
+ ".env.test",
+ "bin/phpunit",
+ "phpunit.xml.dist",
+ "tests/bootstrap.php"
+ ]
+ },
"symfony/routing": {
"version": "6.4",
"recipe": {
diff --git a/tests/Functional/AbstractTest.php b/tests/Functional/AbstractTest.php
new file mode 100644
index 0000000..956517f
--- /dev/null
+++ b/tests/Functional/AbstractTest.php
@@ -0,0 +1,73 @@
+token) {
+ return $this->token;
+ }
+
+ $response = static::createClient()->request('POST', '/auth/login', ['json' => $body ?: [
+ 'username' => 'ogadmin',
+ 'password' => '12345678',
+ ]]);
+
+ $this->assertResponseIsSuccessful();
+ $data = $response->toArray();
+ $this->token = $data['token'];
+
+ return $data['token'];
+ }
+
+ /**
+ * @throws TransportExceptionInterface
+ * @throws ServerExceptionInterface
+ * @throws RedirectionExceptionInterface
+ * @throws DecodingExceptionInterface
+ * @throws ClientExceptionInterface
+ */
+ protected function createClientWithCredentials($token = null): Client
+ {
+ $token = $token ?: $this->getToken();
+
+ return static::createClient([], ['headers' => ['authorization' => 'Bearer '.$token]]);
+ }
+}
\ No newline at end of file
diff --git a/tests/Functional/UserGroupTest.php b/tests/Functional/UserGroupTest.php
new file mode 100644
index 0000000..257360e
--- /dev/null
+++ b/tests/Functional/UserGroupTest.php
@@ -0,0 +1,126 @@
+ self::USER_ADMIN, 'roles'=> [UserGroupPermissions::ROLE_SUPER_ADMIN]]);
+
+ UserGroupFactory::createOne(['name' => 'Super Admin', 'permissions' => ['ROLE_SUPER_ADMIN'], 'enabled' => true]);
+ UserGroupFactory::createOne(['name' => 'Administrador de aulas', 'permissions' => ['ROLE_ORGANIZATIONAL_UNIT_ADMIN'], 'enabled' => true]);
+ UserGroupFactory::createOne(['name' => 'Operador de aulas', 'permissions' => ['ROLE_ORGANIZATIONAL_UNIT_OPERATOR'], 'enabled' => true]);
+ UserGroupFactory::createOne(['name' => 'Usuario', 'permissions' => ['ROLE_USER'], 'enabled' => true]);
+
+ $this->createClientWithCredentials()->request('GET', '/user-groups');
+ $this->assertResponseStatusCodeSame(Response::HTTP_OK);
+ $this->assertResponseHeaderSame('content-type', 'application/ld+json; charset=utf-8');
+ $this->assertJsonContains([
+ '@context' => '/contexts/UserGroup',
+ '@id' => '/user-groups',
+ '@type' => 'hydra:Collection',
+ 'hydra:totalItems' => 4,
+ ]);
+ }
+
+ /**
+ * @throws RedirectionExceptionInterface
+ * @throws DecodingExceptionInterface
+ * @throws ClientExceptionInterface
+ * @throws TransportExceptionInterface
+ * @throws ServerExceptionInterface
+ */
+ public function testCreateUserGroup(): void
+ {
+ UserFactory::createOne(['username' => self::USER_ADMIN, 'roles'=> [UserGroupPermissions::ROLE_SUPER_ADMIN]]);
+ $this->createClientWithCredentials()->request('POST', '/user-groups',['json' => [
+ 'name' => self::USER_GROUP_CREATE,
+ 'enabled' => true,
+ ]]);
+
+ $this->assertResponseStatusCodeSame(201);
+ $this->assertResponseHeaderSame('content-type', 'application/ld+json; charset=utf-8');
+ $this->assertJsonContains([
+ '@context' => '/contexts/UserGroupOutput',
+ '@type' => 'UserGroup',
+ 'name' => self::USER_GROUP_CREATE,
+ 'enabled' => true,
+ ]);
+ }
+
+ /**
+ * @throws RedirectionExceptionInterface
+ * @throws DecodingExceptionInterface
+ * @throws ClientExceptionInterface
+ * @throws TransportExceptionInterface
+ * @throws ServerExceptionInterface
+ */
+ public function testUpdateUserGroup(): void
+ {
+ UserFactory::createOne(['username' => self::USER_ADMIN, 'roles'=> [UserGroupPermissions::ROLE_SUPER_ADMIN]]);
+
+ UserGroupFactory::createOne(['name' => self::USER_GROUP_UPDATE]);
+ $iri = $this->findIriBy(UserGroup::class, ['name' => self::USER_GROUP_UPDATE]);
+
+ $this->createClientWithCredentials()->request('PATCH', $iri, ['json' => [
+ 'name' => self::USER_GROUP_UPDATE,
+ 'enabled' => false
+ ]]);
+
+ $this->assertResponseIsSuccessful();
+ $this->assertJsonContains([
+ '@id' => $iri,
+ 'name' => self::USER_GROUP_UPDATE,
+ 'enabled' => false
+ ]);
+ }
+
+
+ /**
+ * @throws TransportExceptionInterface
+ * @throws ServerExceptionInterface
+ * @throws RedirectionExceptionInterface
+ * @throws DecodingExceptionInterface
+ * @throws ClientExceptionInterface
+ */
+ public function testDeleteUser(): void
+ {
+ UserFactory::createOne(['username' => self::USER_ADMIN, 'roles'=> [UserGroupPermissions::ROLE_SUPER_ADMIN]]);
+ UserGroupFactory::createOne(['name' => self::USER_GROUP_DELETE]);
+
+ $iri = $this->findIriBy(UserGroup::class, ['name' => self::USER_GROUP_DELETE]);
+
+ $this->createClientWithCredentials()->request('DELETE', $iri);
+ $this->assertResponseStatusCodeSame(204);
+ $this->assertNull(
+ static::getContainer()->get('doctrine')->getRepository(UserGroup::class)->findOneBy(['name' => self::USER_GROUP_DELETE])
+ );
+ }
+}
\ No newline at end of file
diff --git a/tests/Functional/UserTest.php b/tests/Functional/UserTest.php
new file mode 100644
index 0000000..6618ba0
--- /dev/null
+++ b/tests/Functional/UserTest.php
@@ -0,0 +1,116 @@
+ self::USER_ADMIN, 'roles'=> [UserGroupPermissions::ROLE_SUPER_ADMIN]]);
+ UserFactory::createMany(10);
+
+ $this->createClientWithCredentials()->request('GET', '/users');
+ $this->assertResponseStatusCodeSame(Response::HTTP_OK);
+ $this->assertResponseHeaderSame('content-type', 'application/ld+json; charset=utf-8');
+ $this->assertJsonContains([
+ '@context' => '/contexts/User',
+ '@id' => '/users',
+ '@type' => 'hydra:Collection',
+ 'hydra:totalItems' => 11,
+ ]);
+ }
+
+ /**
+ * @throws RedirectionExceptionInterface
+ * @throws DecodingExceptionInterface
+ * @throws ClientExceptionInterface
+ * @throws TransportExceptionInterface
+ * @throws ServerExceptionInterface
+ */
+ public function testCreateUser(): void
+ {
+ UserFactory::createOne(['username' => self::USER_ADMIN, 'roles'=> [UserGroupPermissions::ROLE_SUPER_ADMIN]]);
+ $this->createClientWithCredentials()->request('POST', '/users',['json' => [
+ 'username' => self::USER_CREATE,
+ 'password' => '12345678',
+ 'enabled' => true,
+ ]]);
+
+ $this->assertResponseStatusCodeSame(201);
+ $this->assertResponseHeaderSame('content-type', 'application/ld+json; charset=utf-8');
+ $this->assertJsonContains([
+ '@context' => '/contexts/UserOutput',
+ '@type' => 'User',
+ 'username' => self::USER_CREATE,
+ 'enabled' => true,
+ ]);
+ }
+
+ /**
+ * @throws RedirectionExceptionInterface
+ * @throws DecodingExceptionInterface
+ * @throws ClientExceptionInterface
+ * @throws TransportExceptionInterface
+ * @throws ServerExceptionInterface
+ */
+ public function testUpdateUser(): void
+ {
+ UserFactory::createOne(['username' => self::USER_ADMIN, 'roles'=> [UserGroupPermissions::ROLE_SUPER_ADMIN]]);
+ UserFactory::createOne(['username' => self::USER_UPDATE, 'roles'=> [UserGroupPermissions::ROLE_SUPER_ADMIN]]);
+
+ $iri = $this->findIriBy(User::class, ['username' => self::USER_UPDATE]);
+
+ $this->createClientWithCredentials()->request('PATCH', $iri, ['json' => [
+ 'username' => self::USER_UPDATE,
+ ]]);
+
+ $this->assertResponseIsSuccessful();
+ $this->assertJsonContains([
+ '@id' => $iri,
+ 'username' => self::USER_UPDATE,
+ ]);
+ }
+
+ /**
+ * @throws TransportExceptionInterface
+ * @throws ServerExceptionInterface
+ * @throws RedirectionExceptionInterface
+ * @throws DecodingExceptionInterface
+ * @throws ClientExceptionInterface
+ */
+ public function testDeleteUser(): void
+ {
+ UserFactory::createOne(['username' => self::USER_ADMIN, 'roles'=> [UserGroupPermissions::ROLE_SUPER_ADMIN]]);
+ UserFactory::createOne(['username' => self::USER_DELETE, 'roles'=> [UserGroupPermissions::ROLE_SUPER_ADMIN]]);
+
+ $iri = $this->findIriBy(User::class, ['username' => self::USER_DELETE]);
+
+ $this->createClientWithCredentials()->request('DELETE', $iri);
+ $this->assertResponseStatusCodeSame(204);
+ $this->assertNull(
+ static::getContainer()->get('doctrine')->getRepository(User::class)->findOneBy(['username' => self::USER_DELETE])
+ );
+ }
+}
\ No newline at end of file
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
new file mode 100644
index 0000000..47a5855
--- /dev/null
+++ b/tests/bootstrap.php
@@ -0,0 +1,13 @@
+bootEnv(dirname(__DIR__).'/.env');
+}
+
+if ($_SERVER['APP_DEBUG']) {
+ umask(0000);
+}