Skip to content

Commit

Permalink
Merge branch '0.6' of github.com:sulu/SuluContentBundle into 0.x
Browse files Browse the repository at this point in the history
 Conflicts:
	.gitignore
	Content/Application/ContentDataMapper/DataMapper/ExcerptDataMapper.php
	Content/Application/ContentDataMapper/DataMapper/RoutableDataMapper.php
	Content/Application/ContentDataMapper/DataMapper/SeoDataMapper.php
	Content/Application/ContentDataMapper/DataMapper/TemplateDataMapper.php
	Content/Application/ContentDataMapper/DataMapper/WorkflowDataMapper.php
	Content/Application/ContentWorkflow/Subscriber/UnpublishTransitionSubscriber.php
	Content/Application/DimensionContentCollectionFactory/DimensionContentCollectionFactory.php
	Content/Domain/Model/DimensionContentCollection.php
	Content/Infrastructure/Doctrine/DimensionContentRepository.php
	Content/Infrastructure/Sulu/SmartContent/Repository/ContentDataProviderRepository.php
	Tests/Functional/Integration/ExampleControllerTest.php
	Tests/Traits/CreateExampleTrait.php
	Tests/Unit/Content/Application/ContentDataMapper/DataMapper/RoutableDataMapperTest.php
	Tests/Unit/Content/Application/ContentDataMapper/DataMapper/TemplateDataMapperTest.php
	Tests/Unit/Content/Application/ContentWorkflow/Subscriber/UnpublishTransitionSubscriberTest.php
	Tests/Unit/Content/Application/DimensionContentCollectionFactory/DimensionContentCollectionFactoryTest.php
	Tests/Unit/Content/Infrastructure/Sulu/Preview/ContentObjectProviderTest.php
	composer.json
  • Loading branch information
alexander-schranz committed Oct 3, 2022
2 parents cc33006 + 16de307 commit 8435b81
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 38 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -27,6 +27,7 @@ package-lock.json
# tests
Tests/Application/var
Tests/Application/public/build
Tests/Application/.env.local
Tests/Application/.env*.local
Tests/reports/

Expand Down
Expand Up @@ -15,6 +15,7 @@

use Doctrine\Common\Util\ClassUtils;
use Doctrine\ORM\EntityManagerInterface;
use Sulu\Bundle\ContentBundle\Content\Domain\Model\DimensionContentInterface;

class ContentMetadataInspector implements ContentMetadataInspectorInterface
{
Expand All @@ -33,6 +34,7 @@ public function getDimensionContentClass(string $contentRichEntityClass): string
$contentRichEntityClass = ClassUtils::getRealClass($contentRichEntityClass);

$classMetadata = $this->entityManager->getClassMetadata($contentRichEntityClass);
/** @var array{targetEntity: class-string<DimensionContentInterface>} $associationMapping */
$associationMapping = $classMetadata->getAssociationMapping('dimensionContents');

return $associationMapping['targetEntity'];
Expand All @@ -43,6 +45,7 @@ public function getDimensionContentPropertyName(string $contentRichEntityClass):
$contentRichEntityClass = ClassUtils::getRealClass($contentRichEntityClass);

$classMetadata = $this->entityManager->getClassMetadata($contentRichEntityClass);
/** @var array{mappedBy: string} $associationMapping */
$associationMapping = $classMetadata->getAssociationMapping('dimensionContents');

return $associationMapping['mappedBy'];
Expand Down
2 changes: 1 addition & 1 deletion Content/Infrastructure/Doctrine/MetadataLoader.php
Expand Up @@ -136,7 +136,7 @@ private function addManyToOne(
'targetEntity' => $class,
'joinColumns' => [
[
'name' => $namingStrategy->joinKeyColumnName($name),
'name' => $namingStrategy->joinKeyColumnName($name), // @phpstan-ignore-line
'referencedColumnName' => $referencedColumnName,
'nullable' => $nullable,
'onDelete' => 'CASCADE',
Expand Down
1 change: 1 addition & 0 deletions Content/Infrastructure/Doctrine/RouteRemover.php
Expand Up @@ -22,6 +22,7 @@

/**
* @internal
*
* @final
*/
class RouteRemover implements EventSubscriber
Expand Down
Expand Up @@ -19,6 +19,7 @@

/**
* @internal
*
* @implements \IteratorAggregate<DimensionContentInterface>
*/
class PreviewDimensionContentCollection implements \IteratorAggregate, DimensionContentCollectionInterface
Expand Down
Expand Up @@ -341,7 +341,7 @@ private function mapProperty(PropertyMetadata $property, IndexMetadata $metadata
// @codeCoverageIgnoreStart
$metadata->setImageUrlField($this->getContentField($property));
break;
// @codeCoverageIgnoreEnd
// @codeCoverageIgnoreEnd
default:
// TODO FIXME add test case for this
// @codeCoverageIgnoreStart
Expand Down
3 changes: 0 additions & 3 deletions Tests/Application/config/config.yml
@@ -1,9 +1,6 @@
framework:
profiler: { enabled: true, collect: false }

framework:
profiler: { enabled: true, collect: false }

doctrine:
orm:
mappings:
Expand Down
2 changes: 1 addition & 1 deletion Tests/Application/public/index.php
Expand Up @@ -13,7 +13,7 @@

use Sulu\Bundle\ContentBundle\Tests\Application\Kernel;
use Sulu\Component\HttpKernel\SuluKernel;
use Symfony\Component\Debug\Debug;
use Symfony\Component\ErrorHandler\Debug;
use Symfony\Component\HttpFoundation\Request;

// Webserver should run under dev for development
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -38,7 +38,7 @@
"coduo/php-matcher": "^3.2 || ^4.0 || ^5.0 || ^6.0",
"doctrine/data-fixtures": "^1.3.3",
"doctrine/doctrine-fixtures-bundle": "^2.0 || ^3.0",
"friendsofphp/php-cs-fixer": "^2.17 || ^3.1",
"friendsofphp/php-cs-fixer": "^3.4",
"handcraftedinthealps/code-coverage-checker": "^0.2.1",
"handcraftedinthealps/zendsearch": "^2.0",
"jackalope/jackalope-doctrine-dbal": "^1.3.4",
Expand Down
31 changes: 0 additions & 31 deletions depfile.yaml

This file was deleted.

32 changes: 32 additions & 0 deletions deptrac.yaml
@@ -0,0 +1,32 @@
parameters:
paths:
- ./Content

layers:
- name: UserInterface
collectors:
- type: directory
regex: UserInterface/.*
- name: Infrastructure
collectors:
- type: directory
regex: Infrastructure/.*
- name: Application
collectors:
- type: directory
regex: Application/.*
- name: Domain
collectors:
- type: directory
regex: Domain/.*

ruleset:
UserInterface:
- Application
- Domain
Infrastructure:
- Application
- Domain
Application:
- Domain
Domain: ~

0 comments on commit 8435b81

Please sign in to comment.