From bf9f88937bac27a8bac3d4a61e91c0c7b79a57ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Thu, 19 Dec 2024 22:44:47 +0100 Subject: [PATCH] Use short urls for all php.net links (#2711) * Use short urls for all php.net links: Detect the user language * Remove links to php.net from source files --- docs/en/reference/attributes-reference.rst | 4 ++-- docs/en/reference/basic-mapping.rst | 4 ++-- docs/en/reference/introduction.rst | 2 +- docs/en/tutorials/getting-started.rst | 2 +- lib/Doctrine/ODM/MongoDB/Aggregation/Stage/MatchStage.php | 1 - lib/Doctrine/ODM/MongoDB/Iterator/CachingIterator.php | 4 ---- lib/Doctrine/ODM/MongoDB/Iterator/HydratingIterator.php | 3 --- lib/Doctrine/ODM/MongoDB/Iterator/UnrewindableIterator.php | 3 --- lib/Doctrine/ODM/MongoDB/Query/Query.php | 2 -- 9 files changed, 6 insertions(+), 19 deletions(-) diff --git a/docs/en/reference/attributes-reference.rst b/docs/en/reference/attributes-reference.rst index dedaf906aa..55fed36a35 100644 --- a/docs/en/reference/attributes-reference.rst +++ b/docs/en/reference/attributes-reference.rst @@ -1235,7 +1235,7 @@ for the related collection. `Extended JSON specification `_. The recommended way to fill up this property is to create a class constant (eg. ``::VALIDATOR``) using the - `HEREDOC/NOWDOC syntax `_ + `HEREDOC/NOWDOC syntax `_ for clarity and to reference it as the attribute value. - ``action`` - Determines how MongoDB handles documents that violate @@ -1398,6 +1398,6 @@ root class specified in the view mapping. .. _BSON specification: http://bsonspec.org/spec.html .. _DBRef: https://docs.mongodb.com/manual/reference/database-references/#dbrefs .. _geoNear command: https://docs.mongodb.com/manual/reference/command/geoNear/ -.. _MongoDB\BSON\ObjectId: https://www.php.net/manual/en/class.mongodb-bson-objectid.php +.. _MongoDB\BSON\ObjectId: https://www.php.net/class.mongodb-bson-objectid .. |FQCN| raw:: html FQCN diff --git a/docs/en/reference/basic-mapping.rst b/docs/en/reference/basic-mapping.rst index 82000d9c31..e25ada74ef 100644 --- a/docs/en/reference/basic-mapping.rst +++ b/docs/en/reference/basic-mapping.rst @@ -27,7 +27,7 @@ document mapping metadata: Introduction to Attributes -------------------------- -`PHP attributes `_ +`PHP attributes `_ are a PHP 8+ feature that provides a native way to add metadata to classes, methods, properties, and other language constructs. They replace doctrine annotations by offering a standardized approach to metadata, eliminating @@ -151,7 +151,7 @@ Here is a quick overview of the built-in mapping types: - ``string`` - ``timestamp`` -You can read more about the available MongoDB types on `php.net `_. +You can read more about the available MongoDB types on `php.net `_. .. note:: diff --git a/docs/en/reference/introduction.rst b/docs/en/reference/introduction.rst index 42b44f2be7..4452b34e98 100644 --- a/docs/en/reference/introduction.rst +++ b/docs/en/reference/introduction.rst @@ -436,4 +436,4 @@ please create separate clients for your application and ODM. .. _MongoDB: https://www.mongodb.com/ .. _Composer: http://getcomposer.org/ .. _tuning for production: https://ocramius.github.io/ProxyManager/docs/tuning-for-production.html -.. _official PHP manual: https://www.php.net/manual/en/mongodb.installation.php +.. _official PHP manual: https://www.php.net/mongodb.installation diff --git a/docs/en/tutorials/getting-started.rst b/docs/en/tutorials/getting-started.rst index 11ef0ccc89..df745ba920 100755 --- a/docs/en/tutorials/getting-started.rst +++ b/docs/en/tutorials/getting-started.rst @@ -298,4 +298,4 @@ access to the properties and methods that you have defined yourself. You can continue reading :doc:`Introduction to MongoDB Object Document Mapper <../reference/introduction>`. .. _MongoDB Compass: https://www.mongodb.com/products/tools/compass -.. _ObjectId: https://www.php.net/manual/en/class.mongodb-bson-objectid.php +.. _ObjectId: https://www.php.net/class.mongodb-bson-objectid diff --git a/lib/Doctrine/ODM/MongoDB/Aggregation/Stage/MatchStage.php b/lib/Doctrine/ODM/MongoDB/Aggregation/Stage/MatchStage.php index 2e8d7bef0f..c562824ae4 100644 --- a/lib/Doctrine/ODM/MongoDB/Aggregation/Stage/MatchStage.php +++ b/lib/Doctrine/ODM/MongoDB/Aggregation/Stage/MatchStage.php @@ -26,7 +26,6 @@ public function __construct(Builder $builder) $this->query = $this->expr(); } - /** @see http://php.net/manual/en/language.oop5.cloning.php */ public function __clone() { $this->query = clone $this->query; diff --git a/lib/Doctrine/ODM/MongoDB/Iterator/CachingIterator.php b/lib/Doctrine/ODM/MongoDB/Iterator/CachingIterator.php index 8d80284fa2..2a3096ad3c 100644 --- a/lib/Doctrine/ODM/MongoDB/Iterator/CachingIterator.php +++ b/lib/Doctrine/ODM/MongoDB/Iterator/CachingIterator.php @@ -55,7 +55,6 @@ public function __construct(Traversable $iterator) $this->storeCurrentItem(); } - /** @see https://php.net/countable.count */ public function count(): int { $currentKey = key($this->items); @@ -91,7 +90,6 @@ public function key() return key($this->items); } - /** @see http://php.net/iterator.next */ public function next(): void { if ($this->iterator !== null) { @@ -103,7 +101,6 @@ public function next(): void next($this->items); } - /** @see http://php.net/iterator.rewind */ public function rewind(): void { /* If the iterator has advanced, exhaust it now so that future iteration @@ -116,7 +113,6 @@ public function rewind(): void reset($this->items); } - /** @see http://php.net/iterator.valid */ public function valid(): bool { return $this->key() !== null; diff --git a/lib/Doctrine/ODM/MongoDB/Iterator/HydratingIterator.php b/lib/Doctrine/ODM/MongoDB/Iterator/HydratingIterator.php index 7e3fc075c2..306e15c8dc 100644 --- a/lib/Doctrine/ODM/MongoDB/Iterator/HydratingIterator.php +++ b/lib/Doctrine/ODM/MongoDB/Iterator/HydratingIterator.php @@ -57,19 +57,16 @@ public function key() return $this->getIterator()->key(); } - /** @see http://php.net/iterator.next */ public function next(): void { $this->getIterator()->next(); } - /** @see http://php.net/iterator.rewind */ public function rewind(): void { $this->getIterator()->rewind(); } - /** @see http://php.net/iterator.valid */ public function valid(): bool { return $this->key() !== null; diff --git a/lib/Doctrine/ODM/MongoDB/Iterator/UnrewindableIterator.php b/lib/Doctrine/ODM/MongoDB/Iterator/UnrewindableIterator.php index c0352c050e..288ced8cb9 100644 --- a/lib/Doctrine/ODM/MongoDB/Iterator/UnrewindableIterator.php +++ b/lib/Doctrine/ODM/MongoDB/Iterator/UnrewindableIterator.php @@ -72,7 +72,6 @@ public function key() return null; } - /** @see http://php.net/iterator.next */ public function next(): void { if (! $this->iterator) { @@ -89,13 +88,11 @@ public function next(): void $this->iterator = null; } - /** @see http://php.net/iterator.rewind */ public function rewind(): void { $this->preventRewinding(__METHOD__); } - /** @see http://php.net/iterator.valid */ public function valid(): bool { return $this->key() !== null; diff --git a/lib/Doctrine/ODM/MongoDB/Query/Query.php b/lib/Doctrine/ODM/MongoDB/Query/Query.php index bf3372bb60..62cc56f8b0 100644 --- a/lib/Doctrine/ODM/MongoDB/Query/Query.php +++ b/lib/Doctrine/ODM/MongoDB/Query/Query.php @@ -254,8 +254,6 @@ public function getDocumentManager(): DocumentManager * Otherwise, the query will be executed and UnexpectedValueException will * be thrown if {@link Query::execute()} does not return an Iterator. * - * @see http://php.net/manual/en/iteratoraggregate.getiterator.php - * * @throws BadMethodCallException If the query type would not return an Iterator. * @throws UnexpectedValueException If the query did not return an Iterator. * @throws MongoDBException