Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 48 additions & 54 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,54 @@ parameters:
count: 1
path: tests/Gedmo/Mapping/Fixture/Category.php

-
message: '#^Property Gedmo\\Tests\\Mapping\\Fixture\\Referenced\:\:\$referencer \(Gedmo\\Tests\\Mapping\\Fixture\\Referencer\|null\) is never assigned Gedmo\\Tests\\Mapping\\Fixture\\Referencer so it can be removed from the property type\.$#'
identifier: property.unusedType
count: 1
path: tests/Gedmo/Mapping/Fixture/Referenced.php

-
message: '#^Property Gedmo\\Tests\\Mapping\\Fixture\\Referencer\:\:\$id \(string\|null\) is never assigned string so it can be removed from the property type\.$#'
identifier: property.unusedType
count: 1
path: tests/Gedmo/Mapping/Fixture/Referencer.php

-
message: '#^Property Gedmo\\Tests\\Mapping\\Fixture\\Referencing\:\:\$id \(string\|null\) is never assigned string so it can be removed from the property type\.$#'
identifier: property.unusedType
count: 1
path: tests/Gedmo/Mapping/Fixture/Referencing.php

-
message: '#^Property Gedmo\\Tests\\Mapping\\Fixture\\Referencing\:\:\$referencer \(Gedmo\\Tests\\Mapping\\Fixture\\Referencer\|null\) is never assigned Gedmo\\Tests\\Mapping\\Fixture\\Referencer so it can be removed from the property type\.$#'
identifier: property.unusedType
count: 1
path: tests/Gedmo/Mapping/Fixture/Referencing.php

-
message: '#^Property Gedmo\\Tests\\Mapping\\Fixture\\Xml\\Category\:\:\$changed \(DateTime\|null\) is never assigned DateTime so it can be removed from the property type\.$#'
identifier: property.unusedType
count: 1
path: tests/Gedmo/Mapping/Fixture/Xml/Category.php

-
message: '#^Property Gedmo\\Tests\\Mapping\\Fixture\\Xml\\Category\:\:\$id \(int\|null\) is never assigned int so it can be removed from the property type\.$#'
identifier: property.unusedType
count: 1
path: tests/Gedmo/Mapping/Fixture/Xml/Category.php

-
message: '#^Property Gedmo\\Tests\\Mapping\\Fixture\\Xml\\ClosureCategory\:\:\$id \(int\|null\) is never assigned int so it can be removed from the property type\.$#'
identifier: property.unusedType
count: 1
path: tests/Gedmo/Mapping/Fixture/Xml/ClosureCategory.php

-
message: '#^Property Gedmo\\Tests\\Mapping\\Fixture\\Xml\\MaterializedPathCategory\:\:\$id \(int\|null\) is never assigned int so it can be removed from the property type\.$#'
identifier: property.unusedType
count: 1
path: tests/Gedmo/Mapping/Fixture/Xml/MaterializedPathCategory.php

-
message: '#^Instantiated class Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver not found\.$#'
identifier: class.notFound
Expand Down Expand Up @@ -1110,66 +1158,12 @@ parameters:
count: 1
path: tests/Gedmo/Mapping/ORMMappingTestCase.php

-
message: '#^Property Gedmo\\Tests\\Mapping\\ReferenceIntegrityMappingTest\:\:\$dm is never written, only read\.$#'
identifier: property.onlyRead
count: 1
path: tests/Gedmo/Mapping/ReferenceIntegrityMappingTest.php

-
message: '#^Property Gedmo\\Tests\\Mapping\\ReferenceIntegrityMappingTest\:\:\$referenceIntegrity is never written, only read\.$#'
identifier: property.onlyRead
count: 1
path: tests/Gedmo/Mapping/ReferenceIntegrityMappingTest.php

-
message: '#^Unreachable statement \- code above always terminates\.$#'
identifier: deadCode.unreachable
count: 1
path: tests/Gedmo/Mapping/ReferenceIntegrityMappingTest.php

-
message: '#^Instantiated class Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver not found\.$#'
identifier: class.notFound
count: 1
path: tests/Gedmo/Mapping/TreeMappingTest.php

-
message: '#^Instantiated class Doctrine\\ORM\\Mapping\\Driver\\YamlDriver not found\.$#'
identifier: class.notFound
count: 1
path: tests/Gedmo/Mapping/TreeMappingTest.php

-
message: '#^Parameter \#1 \$nestedDriver of method Doctrine\\Persistence\\Mapping\\Driver\\MappingDriverChain\:\:addDriver\(\) expects Doctrine\\Persistence\\Mapping\\Driver\\MappingDriver, Doctrine\\ORM\\Mapping\\Driver\\YamlDriver given\.$#'
identifier: argument.type
count: 1
path: tests/Gedmo/Mapping/TreeMappingTest.php

-
message: '#^Instantiated class Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver not found\.$#'
identifier: class.notFound
count: 1
path: tests/Gedmo/Mapping/Xml/ClosureTreeMappingTest.php

-
message: '#^Instantiated class Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver not found\.$#'
identifier: class.notFound
count: 1
path: tests/Gedmo/Mapping/Xml/MaterializedPathTreeMappingTest.php

-
message: '#^Instantiated class Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver not found\.$#'
identifier: class.notFound
count: 1
path: tests/Gedmo/Mapping/Xml/ReferencesMappingTest.php

-
message: '#^Instantiated class Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver not found\.$#'
identifier: class.notFound
count: 1
path: tests/Gedmo/Mapping/Xml/TranslatableMappingTest.php

-
message: '#^Method Gedmo\\Tests\\Sluggable\\Fixture\\Doctrine\\FakeFilter\:\:addFilterConstraint\(\) has parameter \$targetTableAlias with no type specified\.$#'
identifier: missingType.parameter
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:gedmo="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping">
<mapped-superclass name="Gedmo\Tests\Mapping\Fixture\Xml\BaseCategory">
<field name="left" type="integer">
<gedmo:tree-left/>
</field>
<field name="right" type="integer">
<gedmo:tree-right/>
</field>
<field name="rooted" type="integer">
<gedmo:tree-root/>
</field>
<field name="level" type="integer">
<gedmo:tree-level/>
</field>
<field name="created" type="datetime">
<gedmo:timestampable on="create"/>
</field>
<field name="updated" type="datetime">
<gedmo:timestampable on="update"/>
</field>
</mapped-superclass>
</doctrine-mapping>
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:gedmo="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping">
<entity name="Gedmo\Tests\Mapping\Fixture\Xml\Category" table="categories">
<indexes>
<index name="search_idx" columns="title"/>
</indexes>
<id name="id" type="integer">
<generator/>
</id>
<field name="title" length="64">
<gedmo:translatable/>
</field>
<field name="slug" length="64">
<gedmo:slug separator="_" style="camel" fields="title">
<gedmo:handler class="Gedmo\Sluggable\Handler\RelativeSlugHandler">
<gedmo:handler-option name="relationField" value="parent"/>
<gedmo:handler-option name="relationSlugField" value="slug"/>
<gedmo:handler-option name="separator" value="/"/>
</gedmo:handler>
<gedmo:handler class="Gedmo\Sluggable\Handler\TreeSlugHandler">
<gedmo:handler-option name="parentRelationField" value="parent"/>
<gedmo:handler-option name="separator" value="/"/>
</gedmo:handler>
</gedmo:slug>
</field>
<field name="changed" type="date">
<gedmo:timestampable on="change" field="title" value="Test"/>
</field>
<many-to-one field="parent" target-entity="Gedmo\Tests\Mapping\Fixture\Xml\Category" inversed-by="children">
<join-column name="parent_id"/>
<gedmo:tree-parent/>
</many-to-one>
<one-to-many field="children" target-entity="Gedmo\Tests\Mapping\Fixture\Xml\Category" mapped-by="parent"/>
<gedmo:translation entity="Gedmo\Tests\Translatable\Fixture\CategoryTranslation" locale="localeField"/>
<gedmo:tree type="nested"/>
<gedmo:loggable/>
</entity>
</doctrine-mapping>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:gedmo="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping">
<entity name="Gedmo\Tests\Mapping\Fixture\Xml\ClosureCategory" table="closure_categories">
<indexes>
<index name="search_idx" columns="title"/>
</indexes>
<id name="id" type="integer">
<generator/>
</id>
<field name="title" length="64"/>
<field name="level" type="integer">
<gedmo:tree-level/>
</field>
<many-to-one field="parent" target-entity="Gedmo\Tests\Mapping\Fixture\Xml\ClosureCategory" inversed-by="children">
<join-column name="parent_id"/>
<gedmo:tree-parent/>
</many-to-one>
<one-to-many field="children" target-entity="Gedmo\Tests\Mapping\Fixture\Xml\ClosureCategory" mapped-by="parent"/>
<gedmo:tree type="closure"/>
<gedmo:tree-closure class="Gedmo\Tests\Tree\Fixture\Closure\CategoryClosureWithoutMapping"/>
</entity>
</doctrine-mapping>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:gedmo="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping">
<entity name="Gedmo\Tests\Mapping\Fixture\Xml\MaterializedPathTree" table="materialized_path_trees">
<entity name="Gedmo\Tests\Mapping\Fixture\Xml\MaterializedPathCategory" table="materialized_path_categories">
<indexes>
<index name="title_idx" columns="title"/>
<index name="search_idx" columns="title"/>
</indexes>
<id name="id" type="integer" column="id">
<generator strategy="AUTO"/>
<id name="id" type="integer">
<generator/>
</id>
<field name="level" column="lvl" type="integer">
<gedmo:tree-level/>
</field>
<field name="title" type="string" length="64">
<field name="title" length="64">
<gedmo:tree-path-source/>
</field>
<field name="path" type="string" length="3000">
<field name="path" length="3000">
<gedmo:tree-path separator=","/>
</field>
<field name="level" type="integer">
<gedmo:tree-level/>
</field>
<field name="lockTime" type="datetime">
<gedmo:tree-lock-time/>
</field>
<field name="pathHash" type="string" nullable="true">
<gedmo:tree-path-hash/>
</field>
<many-to-one field="parent" target-entity="MaterializedPathTree">
<join-column name="parent_id" referenced-column-name="id" on-delete="CASCADE"/>
<many-to-one field="parent" target-entity="Gedmo\Tests\Mapping\Fixture\Xml\MaterializedPathCategory" inversed-by="children">
<join-column name="parent_id"/>
<gedmo:tree-parent/>
</many-to-one>
<gedmo:tree type="materializedPath" activate-locking="true" locking-timeout="10"/>
<gedmo:tree type="materializedPath" activate-locking="true"/>
</entity>
</doctrine-mapping>

This file was deleted.

This file was deleted.

This file was deleted.

47 changes: 0 additions & 47 deletions tests/Gedmo/Mapping/Fixture/ClosureTreeClosure.php

This file was deleted.

Loading