Skip to content

Commit

Permalink
Bump coding standard to v11
Browse files Browse the repository at this point in the history
  • Loading branch information
franmomu committed Dec 20, 2022
1 parent ef1222a commit 977c472
Show file tree
Hide file tree
Showing 19 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ on:
jobs:
coding-standards:
name: "Coding Standards"
uses: "doctrine/.github/.github/workflows/coding-standards.yml@1.4.1"
uses: "doctrine/.github/.github/workflows/coding-standards.yml@3.0.0"
with:
php-version: "8.1"
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"require-dev": {
"ext-bcmath": "*",
"doctrine/coding-standard": "^10.0",
"doctrine/coding-standard": "^11.0",
"jmikola/geojson": "^1.0",
"phpbench/phpbench": "^1.0.0",
"phpstan/phpstan": "^1.9.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ final class DocumentNotFoundEventArgs extends LifecycleEventArgs
public function __construct(object $document, DocumentManager $dm, $identifier)
{
parent::__construct($document, $dm);

$this->identifier = $identifier;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ final class PostCollectionLoadEventArgs extends ManagerEventArgs
public function __construct(PersistentCollectionInterface $collection, DocumentManager $dm)
{
parent::__construct($dm);

$this->collection = $collection;
}

Expand Down
1 change: 1 addition & 0 deletions lib/Doctrine/ODM/MongoDB/Event/PreLoadEventArgs.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ final class PreLoadEventArgs extends LifecycleEventArgs
public function __construct(object $document, DocumentManager $dm, array &$data)
{
parent::__construct($document, $dm);

$this->data =& $data;
}

Expand Down
1 change: 1 addition & 0 deletions lib/Doctrine/ODM/MongoDB/Event/PreUpdateEventArgs.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ final class PreUpdateEventArgs extends LifecycleEventArgs
public function __construct(object $document, DocumentManager $dm, array $changeSet)
{
parent::__construct($document, $dm);

$this->documentChangeSet = $changeSet;
}

Expand Down
1 change: 1 addition & 0 deletions lib/Doctrine/ODM/MongoDB/LockException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ final class LockException extends MongoDBException
public function __construct(string $msg, ?object $document = null)
{
parent::__construct($msg);

$this->document = $document;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class SimplifiedXmlDriver extends XmlDriver
public function __construct($prefixes, $fileExtension = self::DEFAULT_FILE_EXTENSION)
{
$locator = new SymfonyFileLocator((array) $prefixes, $fileExtension);

parent::__construct($locator, $fileExtension);
}
}
1 change: 1 addition & 0 deletions lib/Doctrine/ODM/MongoDB/Tools/Console/MetadataFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public static function filter(array $metadatas, $filter): array
public function __construct(ArrayIterator $metadata, $filter)
{
$this->_filter = (array) $filter;

parent::__construct($metadata);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class LookupTest extends BaseTest
public function setUp(): void
{
parent::setUp();

$this->insertTestData();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ class ChildDocumentWithDiscriminatorComplex extends ChildDocumentWithDiscriminat
public function __construct(string $type, string $value)
{
parent::__construct($type);

$this->value = $value;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class ReferenceDiscriminatorsTest extends BaseTest
public function setUp(): void
{
parent::setUp();

$this->dm->getSchemaManager()->ensureDocumentIndexes(CommentableAction::class);
$this->dm->getSchemaManager()->ensureDocumentIndexes(GroupMainActivityStreamItem::class);
$this->dm->getSchemaManager()->ensureDocumentIndexes(GroupMembersActivityStreamItem::class);
Expand Down Expand Up @@ -142,6 +143,7 @@ class CommentableAction extends Action
public function __construct(string $type, array $comments = [])
{
parent::__construct($type);

$this->comments = $comments;
}

Expand Down Expand Up @@ -201,6 +203,7 @@ abstract class GroupActivityStreamItem extends ActivityStreamItem
public function __construct(Action $action, string $groupId)
{
parent::__construct($action);

$this->groupId = $groupId;
}

Expand Down Expand Up @@ -236,6 +239,7 @@ abstract class UserActivityStreamItem extends ActivityStreamItem
public function __construct(Action $action, string $userId)
{
parent::__construct($action);

$this->userId = $userId;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class BasicInheritanceMappingTest extends BaseTest
public function setUp(): void
{
parent::setUp();

$this->factory = new ClassMetadataFactory();
$this->factory->setDocumentManager($this->dm);
$this->factory->setConfiguration($this->dm->getConfiguration());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class ShardKeyInheritanceMappingTest extends BaseTest
public function setUp(): void
{
parent::setUp();

$this->factory = new ClassMetadataFactory();
$this->factory->setDocumentManager($this->dm);
$this->factory->setConfiguration($this->dm->getConfiguration());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class DefaultPersistentCollectionGeneratorTest extends BaseTest
public function setUp(): void
{
parent::setUp();

$this->generator = new DefaultPersistentCollectionGenerator(
$this->dm->getConfiguration()->getPersistentCollectionDir(),
$this->dm->getConfiguration()->getPersistentCollectionNamespace()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ class PersistenceBuilderTest extends BaseTest
public function setUp(): void
{
parent::setUp();

$this->pb = $this->dm->getUnitOfWork()->getPersistenceBuilder();
}

public function tearDown(): void
{
unset($this->pb);

parent::tearDown();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class QueryExpressionVisitorTest extends BaseTest
public function setUp(): void
{
parent::setUp();

$this->queryBuilder = $this->dm->createQueryBuilder(Bar::class);
$this->visitor = new QueryExpressionVisitor($this->queryBuilder);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public function setUp(): void
public function tearDown(): void
{
parent::tearDown();

unset($this->application);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public function setUp(): void
public function tearDown(): void
{
parent::tearDown();

unset($this->command);
unset($this->commandTester);
}
Expand Down

0 comments on commit 977c472

Please sign in to comment.