Skip to content

Commit

Permalink
Use short urls for all php.net links (#2711)
Browse files Browse the repository at this point in the history
* Use short urls for all php.net links: Detect the user language
* Remove links to php.net from source files
  • Loading branch information
GromNaN authored Dec 19, 2024
1 parent 25ef253 commit bf9f889
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 19 deletions.
4 changes: 2 additions & 2 deletions docs/en/reference/attributes-reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,7 @@ for the related collection.
`Extended JSON specification <https://github.com/mongodb/specifications/blob/master/source/extended-json.rst>`_.
The recommended way to fill up this property is to create a class constant
(eg. ``::VALIDATOR``) using the
`HEREDOC/NOWDOC syntax <https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.nowdoc>`_
`HEREDOC/NOWDOC syntax <https://www.php.net/language.types.string#language.types.string.syntax.nowdoc>`_
for clarity and to reference it as the attribute value.
-
``action`` - Determines how MongoDB handles documents that violate
Expand Down Expand Up @@ -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
<abbr title="Fully-Qualified Class Name">FQCN</abbr>
4 changes: 2 additions & 2 deletions docs/en/reference/basic-mapping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ document mapping metadata:
Introduction to Attributes
--------------------------

`PHP attributes <https://www.php.net/manual/en/language.attributes.overview.php>`_
`PHP attributes <https://www.php.net/language.attributes.overview>`_
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
Expand Down Expand Up @@ -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 <https://www.php.net/manual/en/mongodb.bson.php>`_.
You can read more about the available MongoDB types on `php.net <https://www.php.net/mongodb.bson>`_.

.. note::

Expand Down
2 changes: 1 addition & 1 deletion docs/en/reference/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion docs/en/tutorials/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion lib/Doctrine/ODM/MongoDB/Aggregation/Stage/MatchStage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 0 additions & 4 deletions lib/Doctrine/ODM/MongoDB/Iterator/CachingIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand All @@ -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
Expand All @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions lib/Doctrine/ODM/MongoDB/Iterator/HydratingIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions lib/Doctrine/ODM/MongoDB/Iterator/UnrewindableIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ public function key()
return null;
}

/** @see http://php.net/iterator.next */
public function next(): void
{
if (! $this->iterator) {
Expand All @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions lib/Doctrine/ODM/MongoDB/Query/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bf9f889

Please sign in to comment.