diff --git a/composer.lock b/composer.lock index 7e9a95b6c..641644f99 100644 --- a/composer.lock +++ b/composer.lock @@ -75,16 +75,16 @@ }, { "name": "inpsyde/modularity", - "version": "1.7.4", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/inpsyde/modularity.git", - "reference": "ef0143d58e4dd358f7cc3c8d917b18d07cf6e13d" + "reference": "c6855a6d9c4ce6f090d031e820f176bddf2a0b1c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/inpsyde/modularity/zipball/ef0143d58e4dd358f7cc3c8d917b18d07cf6e13d", - "reference": "ef0143d58e4dd358f7cc3c8d917b18d07cf6e13d", + "url": "https://api.github.com/repos/inpsyde/modularity/zipball/c6855a6d9c4ce6f090d031e820f176bddf2a0b1c", + "reference": "c6855a6d9c4ce6f090d031e820f176bddf2a0b1c", "shasum": "" }, "require": { @@ -137,9 +137,9 @@ "description": "Modular PSR-11 implementation for WordPress plugins, themes or libraries.", "support": { "issues": "https://github.com/inpsyde/modularity/issues", - "source": "https://github.com/inpsyde/modularity/tree/1.7.4" + "source": "https://github.com/inpsyde/modularity/tree/1.8.0" }, - "time": "2024-03-22T07:01:53+00:00" + "time": "2024-05-14T06:07:35+00:00" }, { "name": "inpsyde/wp-context", @@ -411,12 +411,12 @@ "source": { "type": "git", "url": "https://github.com/RRZE-Webteam/FAU-Studium-Common.git", - "reference": "023a63d3e7c53e6681308b20284237a68621644f" + "reference": "82947001ec8016e74eb8655aba62d7e7141394ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/RRZE-Webteam/FAU-Studium-Common/zipball/023a63d3e7c53e6681308b20284237a68621644f", - "reference": "023a63d3e7c53e6681308b20284237a68621644f", + "url": "https://api.github.com/repos/RRZE-Webteam/FAU-Studium-Common/zipball/82947001ec8016e74eb8655aba62d7e7141394ef", + "reference": "82947001ec8016e74eb8655aba62d7e7141394ef", "shasum": "" }, "require": { @@ -489,7 +489,7 @@ "source": "https://github.com/RRZE-Webteam/FAU-Studium-Common/tree/dev", "issues": "https://github.com/RRZE-Webteam/FAU-Studium-Common/issues" }, - "time": "2024-05-24T11:51:27+00:00" + "time": "2024-05-24T14:26:03+00:00" }, { "name": "webmozart/assert", @@ -964,16 +964,16 @@ }, { "name": "composer/xdebug-handler", - "version": "3.0.4", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255" + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/4f988f8fdf580d53bdb2d1278fe93d1ed5462255", - "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", "shasum": "" }, "require": { @@ -1010,7 +1010,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.4" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" }, "funding": [ { @@ -1026,7 +1026,7 @@ "type": "tidelift" } ], - "time": "2024-03-26T18:29:49+00:00" + "time": "2024-05-06T16:37:16+00:00" }, { "name": "dealerdirect/phpcodesniffer-composer-installer", @@ -1497,16 +1497,16 @@ }, { "name": "johnpbloch/wordpress-core", - "version": "6.5.2", + "version": "6.5.3", "source": { "type": "git", "url": "https://github.com/johnpbloch/wordpress-core.git", - "reference": "bf083fe2944a4683461d496086ec22319cd8bdf1" + "reference": "2e2e090f5f9c342c302b3b1f05c20077f5253222" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/johnpbloch/wordpress-core/zipball/bf083fe2944a4683461d496086ec22319cd8bdf1", - "reference": "bf083fe2944a4683461d496086ec22319cd8bdf1", + "url": "https://api.github.com/repos/johnpbloch/wordpress-core/zipball/2e2e090f5f9c342c302b3b1f05c20077f5253222", + "reference": "2e2e090f5f9c342c302b3b1f05c20077f5253222", "shasum": "" }, "require": { @@ -1514,7 +1514,7 @@ "php": ">=7.0.0" }, "provide": { - "wordpress/core-implementation": "6.5.2" + "wordpress/core-implementation": "6.5.3" }, "type": "wordpress-core", "notification-url": "https://packagist.org/downloads/", @@ -1541,7 +1541,7 @@ "source": "https://core.trac.wordpress.org/browser", "wiki": "https://codex.wordpress.org/" }, - "time": "2024-04-09T21:20:55+00:00" + "time": "2024-05-07T16:03:39+00:00" }, { "name": "mustache/mustache", @@ -1994,16 +1994,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": { @@ -2052,9 +2052,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", @@ -2116,16 +2116,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.28.0", + "version": "1.29.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb" + "reference": "536889f2b340489d328f5ffb7b02bb6b183ddedc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb", - "reference": "cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/536889f2b340489d328f5ffb7b02bb6b183ddedc", + "reference": "536889f2b340489d328f5ffb7b02bb6b183ddedc", "shasum": "" }, "require": { @@ -2157,9 +2157,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.28.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.0" }, - "time": "2024-04-03T18:51:33+00:00" + "time": "2024-05-06T12:04:23+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3606,16 +3606,16 @@ }, { "name": "spatie/array-to-xml", - "version": "3.2.3", + "version": "3.3.0", "source": { "type": "git", "url": "https://github.com/spatie/array-to-xml.git", - "reference": "c95fd4db94ec199f798d4b5b4a81757bd20d88ab" + "reference": "f56b220fe2db1ade4c88098d83413ebdfc3bf876" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/c95fd4db94ec199f798d4b5b4a81757bd20d88ab", - "reference": "c95fd4db94ec199f798d4b5b4a81757bd20d88ab", + "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/f56b220fe2db1ade4c88098d83413ebdfc3bf876", + "reference": "f56b220fe2db1ade4c88098d83413ebdfc3bf876", "shasum": "" }, "require": { @@ -3628,6 +3628,11 @@ "spatie/pest-plugin-snapshots": "^1.1" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, "autoload": { "psr-4": { "Spatie\\ArrayToXml\\": "src" @@ -3653,7 +3658,7 @@ "xml" ], "support": { - "source": "https://github.com/spatie/array-to-xml/tree/3.2.3" + "source": "https://github.com/spatie/array-to-xml/tree/3.3.0" }, "funding": [ { @@ -3665,7 +3670,7 @@ "type": "github" } ], - "time": "2024-02-07T10:39:02+00:00" + "time": "2024-05-01T10:20:27+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -4493,16 +4498,16 @@ }, { "name": "vimeo/psalm", - "version": "5.23.1", + "version": "5.24.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "8471a896ccea3526b26d082f4461eeea467f10a4" + "reference": "462c80e31c34e58cc4f750c656be3927e80e550e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/8471a896ccea3526b26d082f4461eeea467f10a4", - "reference": "8471a896ccea3526b26d082f4461eeea467f10a4", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/462c80e31c34e58cc4f750c656be3927e80e550e", + "reference": "462c80e31c34e58cc4f750c656be3927e80e550e", "shasum": "" }, "require": { @@ -4599,7 +4604,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2024-03-11T20:33:46+00:00" + "time": "2024-05-01T19:32:08+00:00" }, { "name": "wp-cli/mustangostang-spyc", diff --git a/src/Infrastructure/Dashboard/TermMeta/CampoKeyTermMetaField.php b/src/Infrastructure/Dashboard/TermMeta/CampoKeyTermMetaField.php index 8f2dd350f..38de090b4 100644 --- a/src/Infrastructure/Dashboard/TermMeta/CampoKeyTermMetaField.php +++ b/src/Infrastructure/Dashboard/TermMeta/CampoKeyTermMetaField.php @@ -4,17 +4,17 @@ namespace Fau\DegreeProgram\Infrastructure\Dashboard\TermMeta; +use Fau\DegreeProgram\Common\Infrastructure\Repository\CampoKeysRepository; + class CampoKeyTermMetaField extends InputTermMetaField { - public const KEY = 'uniquename'; - public function __construct( string $description, TermMetaFieldValidationPattern $validationPattern = null, ) { parent::__construct( - self::KEY, + CampoKeysRepository::CAMPO_KEY_TERM_META_KEY, __('Campo Key', 'fau-degree-program'), $description, validationPattern: $validationPattern, diff --git a/src/Infrastructure/Repository/CacheBasedRevisionRepository.php b/src/Infrastructure/Repository/CacheBasedRevisionRepository.php index 5758f943b..16fdbe6a6 100644 --- a/src/Infrastructure/Repository/CacheBasedRevisionRepository.php +++ b/src/Infrastructure/Repository/CacheBasedRevisionRepository.php @@ -156,6 +156,7 @@ public function findRevision(DegreeProgramId $revisionId): ?DegreeProgramRevisio DegreeProgram::COMBINATIONS => $this->combinationsToContextualIdList($rawRevision->combinations()), DegreeProgram::LIMITED_COMBINATIONS => $this->combinationsToContextualIdList($rawRevision->limitedCombinations()), DegreeProgram::APPLY_NOW_LINK => $this->structureToContextualId($rawRevision->applyNowLink()), + DegreeProgram::CAMPO_KEYS => $rawRevision->campoKeys()->asArray(), ], self::multilingualStringToFlatArray(DegreeProgram::ENTRY_TEXT, $rawRevision->entryText()), ); diff --git a/src/Infrastructure/Repository/RepositoryModule.php b/src/Infrastructure/Repository/RepositoryModule.php index bc0b92e91..2b5c32090 100644 --- a/src/Infrastructure/Repository/RepositoryModule.php +++ b/src/Infrastructure/Repository/RepositoryModule.php @@ -13,6 +13,7 @@ use Fau\DegreeProgram\Common\Application\Repository\DegreeProgramViewRepository; use Fau\DegreeProgram\Common\Domain\DegreeProgramRepository; use Fau\DegreeProgram\Common\Infrastructure\Content\Taxonomy\TaxonomiesList; +use Fau\DegreeProgram\Common\Infrastructure\Repository\CampoKeysRepository; use Fau\DegreeProgram\Common\Infrastructure\Repository\FacultyRepository; use Fau\DegreeProgram\Common\Infrastructure\Repository\IdGenerator; use Fau\DegreeProgram\Common\Infrastructure\Repository\WordPressDatabaseDegreeProgramCollectionRepository; @@ -33,16 +34,19 @@ class RepositoryModule implements ServiceModule public const VIEW_REPOSITORY_UNCACHED = 'view_repository_uncached'; public const COLLECTION_REPOSITORY_UNCACHED = 'collection_repository_uncached'; + // phpcs:ignore Inpsyde.CodeQuality.FunctionLength.TooLong public function services(): array { return [ IdGenerator::class => static fn() => new IdGenerator(), + CampoKeysRepository::class => static fn() => new CampoKeysRepository(), ConditionalFieldsFilter::class => static fn() => new ConditionalFieldsFilter(), FacultyRepository::class => static fn() => new FacultyRepository(), DegreeProgramRepository::class => static fn(ContainerInterface $container) => new WordPressDatabaseDegreeProgramRepository( $container->get(IdGenerator::class), $container->get(EventDispatcherInterface::class), $container->get(HtmlDegreeProgramSanitizer::class), + $container->get(CampoKeysRepository::class), ), self::VIEW_REPOSITORY_UNCACHED => static fn(ContainerInterface $container) => new WordPressDatabaseDegreeProgramViewRepository( $container->get(DegreeProgramRepository::class), @@ -56,7 +60,8 @@ public function services(): array $container->get(CacheInterface::class), ), WpQueryArgsBuilder::class => static fn(ContainerInterface $container) => new WpQueryArgsBuilder( - $container->get(TaxonomiesList::class) + $container->get(TaxonomiesList::class), + $container->get(CampoKeysRepository::class), ), self::COLLECTION_REPOSITORY_UNCACHED => static fn(ContainerInterface $container) => new WordPressDatabaseDegreeProgramCollectionRepository( $container->get(self::VIEW_REPOSITORY_UNCACHED),