diff --git a/composer.json b/composer.json index b79f6bd01432ed7070e0c836e5a412c690738056..a949dde65daeb1f5696dacf0a64f715901da14bd 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,6 @@ "ext-json": "*", "api-platform/core": "^2.6", "dbp/relay-core-bundle": "dev-main as 0.1.32", - "dbp/relay-base-person-bundle": "dev-main", "symfony/config": "^5.4", "symfony/framework-bundle": "^5.4", "symfony/security-bundle": "^5.4", diff --git a/composer.lock b/composer.lock index e26e725f8d38a0fb4f00137af6e22be6a6da9253..77fc5274a1c0b73f74ab896094ba490045e13d98 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": "f3cd7d8703dced18c4c8cb466c578dcf", + "content-hash": "d21fecd0dcd474297b30d7107433ac01", "packages": [ { "name": "api-platform/core", @@ -167,85 +167,6 @@ ], "time": "2022-01-11T10:29:54+00:00" }, - { - "name": "dbp/relay-base-person-bundle", - "version": "dev-main", - "source": { - "type": "git", - "url": "git@gitlab.tugraz.at:dbp/relay/dbp-relay-base-person-bundle.git", - "reference": "00084de146defc2fd6c9c8da71c692462d2bbf34" - }, - "require": { - "api-platform/core": "^2.6.3", - "dbp/relay-core-bundle": "dev-main as 0.1.32", - "ext-json": "*", - "guzzlehttp/guzzle": "^7.0", - "nelmio/cors-bundle": "^2.1.0", - "php": ">=7.3", - "phpdocumentor/reflection-docblock": "^3.0 || ^4.0 || ^5.0", - "symfony/config": "^5.2", - "symfony/expression-language": "^5.2", - "symfony/framework-bundle": "^5.2", - "symfony/security-bundle": "^5.2", - "symfony/security-core": "^5.2", - "symfony/security-guard": "^5.2", - "symfony/twig-bundle": "^5.2", - "symfony/validator": "^5.2", - "symfony/yaml": "^5.2" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.0", - "phpstan/phpstan": "^1.0.0", - "phpstan/phpstan-phpunit": "^1.0.0", - "phpunit/phpunit": "^9", - "symfony/browser-kit": "^5.2", - "symfony/http-client": "^5.2", - "symfony/monolog-bundle": "^3.7", - "symfony/phpunit-bridge": "^5.2", - "vimeo/psalm": "^4.4" - }, - "default-branch": true, - "type": "symfony-bundle", - "autoload": { - "psr-4": { - "Dbp\\Relay\\BasePersonBundle\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "Dbp\\Relay\\BasePersonBundle\\Tests\\": "tests/" - } - }, - "scripts": { - "test": [ - "@php vendor/bin/phpunit" - ], - "phpstan": [ - "@php vendor/bin/phpstan analyze --ansi" - ], - "psalm": [ - "@php vendor/bin/psalm" - ], - "lint": [ - "@composer run cs", - "@composer run phpstan", - "@composer run psalm" - ], - "cs-fix": [ - "@php vendor/bin/php-cs-fixer --ansi fix" - ], - "cs": [ - "@php vendor/bin/php-cs-fixer --ansi fix --dry-run --diff" - ], - "coverage": [ - "@php -dxdebug.mode=coverage vendor/bin/simple-phpunit --coverage-html _coverage" - ] - }, - "license": [ - "AGPL-3.0-or-later" - ], - "time": "2022-04-19T07:09:19+00:00" - }, { "name": "dbp/relay-core-bundle", "version": "dev-main", @@ -10116,8 +10037,7 @@ ], "minimum-stability": "stable", "stability-flags": { - "dbp/relay-core-bundle": 20, - "dbp/relay-base-person-bundle": 20 + "dbp/relay-core-bundle": 20 }, "prefer-stable": false, "prefer-lowest": false, diff --git a/src/Entity/CourseAttendee.php b/src/Entity/CourseAttendee.php index 9723dde5ea7ca36c93ff4c8df1d5f251c681c832..c8ed97b2ffdd09175fce1cd113c42976a79ec95a 100644 --- a/src/Entity/CourseAttendee.php +++ b/src/Entity/CourseAttendee.php @@ -4,10 +4,9 @@ declare(strict_types=1); namespace Dbp\Relay\BaseCourseBundle\Entity; +use ApiPlatform\Core\Annotation\ApiProperty; use ApiPlatform\Core\Annotation\ApiResource; use Dbp\Relay\BaseCourseBundle\Controller\GetAttendeesByCourse; -use Dbp\Relay\BasePersonBundle\Entity\PersonInterface; -use Dbp\Relay\BasePersonBundle\Entity\PersonTrait; use Symfony\Component\Serializer\Annotation\Groups; /** @@ -28,7 +27,7 @@ use Symfony\Component\Serializer\Annotation\Groups; * "read" = false, * "normalization_context" = { * "jsonld_embed_context" = true, - * "groups" = {"BasePerson:output"} + * "groups" = {"CourseAttendee:output"} * }, * "openapi_context" = { * "tags" = {"BaseCourse"}, @@ -53,12 +52,83 @@ use Symfony\Component\Serializer\Annotation\Groups; * shortName="CourseAttendee", * description="A person attending a course", * normalizationContext={ - * "groups" = {"BasePerson:output"}, + * "groups" = {"CourseAttendee:output"}, * "jsonld_embed_context" = true, * } * ) */ -class CourseAttendee implements PersonInterface +class CourseAttendee { - use PersonTrait; + /** + * @ApiProperty(identifier=true) + * @Groups({"CourseAttendee:output"}) + * + * @var string + */ + private $identifier; + + /** + * @ApiProperty(iri="http://schema.org/givenName") + * @Groups({"CourseAttendee:output"}) + * + * @var string + */ + private $givenName; + + /** + * @var string + * @ApiProperty(iri="http://schema.org/familyName") + * @Groups({"CourseAttendee:output"}) + * + * @var string + */ + private $familyName; + + /** + * @ApiProperty(iri="http://schema.org/email") + * @Groups({"CourseAttendee:output"}) + * + * @var string + */ + private $email; + + public function setIdentifier(string $identifier): void + { + $this->identifier = $identifier; + } + + public function getIdentifier(): ?string + { + return $this->identifier; + } + + public function getGivenName(): ?string + { + return $this->givenName; + } + + public function setGivenName(string $givenName): void + { + $this->givenName = $givenName; + } + + public function getFamilyName(): ?string + { + return $this->familyName; + } + + public function setFamilyName(string $familyName): void + { + $this->familyName = $familyName; + } + + public function getEmail(): ?string + { + return $this->email; + } + + public function setEmail(string $email): void + { + $this->email = $email; + } }