From 881a7b3b69b8f7fef722f021fcee796fbc994778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Sun, 13 Mar 2022 14:35:15 +0100 Subject: [PATCH 01/11] Link to docs for the stable version When we do not know what version people intend to browse, it seems more sensible to assume they want to see the docs for the stable version. --- README.md | 2 +- SECURITY.md | 4 ++-- UPGRADE.md | 4 ++-- docs/en/reference/configuration.rst | 2 +- lib/Doctrine/ORM/EntityManager.php | 2 +- lib/Doctrine/ORM/UnitOfWork.php | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index cd167513078..ae41996c807 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ without requiring unnecessary code duplication. ## More resources: * [Website](http://www.doctrine-project.org) -* [Documentation](https://www.doctrine-project.org/projects/doctrine-orm/en/latest/index.html) +* [Documentation](https://www.doctrine-project.org/projects/doctrine-orm/en/stable/index.html) [3.0 image]: https://github.com/doctrine/orm/actions/workflows/continuous-integration.yml/badge.svg?branch=3.0.x diff --git a/SECURITY.md b/SECURITY.md index 9deac9ed312..d7013cb4069 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -10,8 +10,8 @@ we cannot protect you from SQL injection. Please read the documentation chapter on Security in Doctrine DBAL and ORM to understand the assumptions we make. -- [DBAL Security Page](https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/security.html) -- [ORM Security Page](https://www.doctrine-project.org/projects/doctrine-orm/en/latest/reference/security.html) +- [DBAL Security Page](https://www.doctrine-project.org/projects/doctrine-dbal/en/stable/reference/security.html) +- [ORM Security Page](https://www.doctrine-project.org/projects/doctrine-orm/en/stable/reference/security.html) If you find a Security bug in Doctrine, please report it on Jira and change the Security Level to "Security Issues". It will be visible to Doctrine Core diff --git a/UPGRADE.md b/UPGRADE.md index 22ceaf2f7da..263f5d21919 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -289,8 +289,8 @@ If you would still like to perform batching operations over small `UnitOfWork` instances, it is suggested to follow these paths instead: * eagerly use `EntityManager#clear()` in conjunction with a specific second level - cache configuration (see http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/second-level-cache.html) - * use an explicit change tracking policy (see http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/change-tracking-policies.html) + cache configuration (see http://docs.doctrine-project.org/projects/doctrine-orm/en/stable/reference/second-level-cache.html) + * use an explicit change tracking policy (see http://docs.doctrine-project.org/projects/doctrine-orm/en/stable/reference/change-tracking-policies.html) ## Deprecated `YAML` mapping drivers. diff --git a/docs/en/reference/configuration.rst b/docs/en/reference/configuration.rst index 36cd5978818..ef6f75af52c 100644 --- a/docs/en/reference/configuration.rst +++ b/docs/en/reference/configuration.rst @@ -95,7 +95,7 @@ If you want to configure Doctrine in more detail, take a look at the :doc:`Advan .. note:: You can learn more about the database connection configuration in the - `Doctrine DBAL connection configuration reference `_. + `Doctrine DBAL connection configuration reference `_. Setting up the Commandline Tool ------------------------------- diff --git a/lib/Doctrine/ORM/EntityManager.php b/lib/Doctrine/ORM/EntityManager.php index 045efe32f08..8ef853bf39f 100644 --- a/lib/Doctrine/ORM/EntityManager.php +++ b/lib/Doctrine/ORM/EntityManager.php @@ -59,7 +59,7 @@ * $entityManager = EntityManager::create($dbParams, $config); * * For more information see - * {@link http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/configuration.html} + * {@link http://docs.doctrine-project.org/projects/doctrine-orm/en/stable/reference/configuration.html} * * You should never attempt to inherit from the EntityManager: Inheritance * is not a valid extension point for the EntityManager. Instead you diff --git a/lib/Doctrine/ORM/UnitOfWork.php b/lib/Doctrine/ORM/UnitOfWork.php index cd5d727167a..e225351d90b 100644 --- a/lib/Doctrine/ORM/UnitOfWork.php +++ b/lib/Doctrine/ORM/UnitOfWork.php @@ -103,7 +103,7 @@ class UnitOfWork implements PropertyChangedListener * Hint used to collect all primary keys of associated entities during hydration * and execute it in a dedicated query afterwards * - * @see https://www.doctrine-project.org/projects/doctrine-orm/en/latest/reference/dql-doctrine-query-language.html#temporarily-change-fetch-mode-in-dql + * @see https://www.doctrine-project.org/projects/doctrine-orm/en/stable/reference/dql-doctrine-query-language.html#temporarily-change-fetch-mode-in-dql */ public const HINT_DEFEREAGERLOAD = 'deferEagerLoad'; From a34dc0a0e3fb6352e9645fc473b9b6bac383f11e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Sun, 13 Mar 2022 14:36:37 +0100 Subject: [PATCH 02/11] Use internal links when self-referencing This should result in links with the current version of the docs. --- docs/en/cookbook/dql-user-defined-functions.rst | 4 ++-- docs/en/cookbook/implementing-wakeup-or-clone.rst | 4 ++-- docs/en/reference/architecture.rst | 2 ++ docs/en/reference/dql-doctrine-query-language.rst | 2 ++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/en/cookbook/dql-user-defined-functions.rst b/docs/en/cookbook/dql-user-defined-functions.rst index 1739e089c91..ca7bb7847c4 100644 --- a/docs/en/cookbook/dql-user-defined-functions.rst +++ b/docs/en/cookbook/dql-user-defined-functions.rst @@ -131,8 +131,8 @@ generation of a DateDiff FunctionNode somewhere in the AST of the dql statement. The ``ArithmeticPrimary`` method call is the most common -denominator of valid EBNF tokens taken from the -`DQL EBNF grammar `_ +denominator of valid EBNF tokens taken from the :ref:`DQL EBNF grammar +` that matches our requirements for valid input into the DateDiff Dql function. Picking the right tokens for your methods is a tricky business, but the EBNF grammar is pretty helpful finding it, as is diff --git a/docs/en/cookbook/implementing-wakeup-or-clone.rst b/docs/en/cookbook/implementing-wakeup-or-clone.rst index adf57d1b27c..c65a9a62216 100644 --- a/docs/en/cookbook/implementing-wakeup-or-clone.rst +++ b/docs/en/cookbook/implementing-wakeup-or-clone.rst @@ -3,8 +3,8 @@ Implementing Wakeup or Clone .. sectionauthor:: Roman Borschel (roman@code-factory.org) -As explained in the -`restrictions for entity classes in the manual `_, +As explained in the :ref:`restrictions for entity classes in the manual +`, it is usually not allowed for an entity to implement ``__wakeup`` or ``__clone``, because Doctrine makes special use of them. However, it is quite easy to make use of these methods in a safe diff --git a/docs/en/reference/architecture.rst b/docs/en/reference/architecture.rst index 75206f75ced..74a5950434f 100644 --- a/docs/en/reference/architecture.rst +++ b/docs/en/reference/architecture.rst @@ -66,6 +66,8 @@ The root namespace of the ORM package is ``Doctrine\ORM``. Terminology ----------- +.. _terminology_entities: + Entities ~~~~~~~~ diff --git a/docs/en/reference/dql-doctrine-query-language.rst b/docs/en/reference/dql-doctrine-query-language.rst index 93abfb55723..2c045ba7706 100644 --- a/docs/en/reference/dql-doctrine-query-language.rst +++ b/docs/en/reference/dql-doctrine-query-language.rst @@ -1531,6 +1531,8 @@ Given that there are 10 users and corresponding addresses in the database the ex a one-by-one basis once they are accessed. +.. _dql_ebnf_grammar: + EBNF ---- From b6cff1aa1c9caeb8e724781286d38e3684c783b6 Mon Sep 17 00:00:00 2001 From: Maxime Veber Date: Fri, 18 Mar 2022 10:32:03 +0100 Subject: [PATCH 03/11] Stands with Ukraine (#9567) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ae41996c807..5b0c9b3797d 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ | [![Build status][3.0 image]][3.0] | [![Build status][2.12 image]][2.12] | [![Build status][2.11 image]][2.11] | | [![Coverage Status][3.0 coverage image]][3.0 coverage]| [![Coverage Status][2.12 coverage image]][2.12 coverage] | [![Coverage Status][2.11 coverage image]][2.11 coverage] | +[

πŸ‡ΊπŸ‡¦ UKRAINE NEEDS YOUR HELP NOW!

](https://www.doctrine-project.org/stop-war.html) + Doctrine 2 is an object-relational mapper (ORM) for PHP 7.1+ that provides transparent persistence for PHP objects. It sits on top of a powerful database abstraction layer (DBAL). One of its key features is the option to write database queries in a proprietary object oriented SQL dialect called Doctrine Query Language (DQL), From c1b373b9310c10413b617ecf58a2f552133fd863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Fri, 18 Mar 2022 19:19:15 +0100 Subject: [PATCH 04/11] Ignore deprecation from Persistence The deprecation is already addressed in the next minor branch. --- psalm.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/psalm.xml b/psalm.xml index 3eb3f5c189e..2a7becf0a24 100644 --- a/psalm.xml +++ b/psalm.xml @@ -30,6 +30,8 @@ + + From c6831c6b077223eac3b17518d615771d5e0bb1c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Z=C3=A1ruba?= Date: Sat, 19 Mar 2022 13:03:28 +0100 Subject: [PATCH 05/11] Update XmlExporter.php - Type problem in php8.x (#9589) Please see PHP interface SimpleXMLElement::addAttribute(string $name, string $value = null, string $namespace = null): void .... The $value must be string or null. --- lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php b/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php index 11ef880ff7b..bfa07b532d0 100644 --- a/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php +++ b/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php @@ -73,7 +73,7 @@ public function exportClassMetadata(ClassMetadataInfo $metadata) $discriminatorColumnXml->addAttribute('type', $metadata->discriminatorColumn['type']); if (isset($metadata->discriminatorColumn['length'])) { - $discriminatorColumnXml->addAttribute('length', $metadata->discriminatorColumn['length']); + $discriminatorColumnXml->addAttribute('length', (string) $metadata->discriminatorColumn['length']); } } @@ -339,7 +339,7 @@ public function exportClassMetadata(ClassMetadataInfo $metadata) } if (isset($inverseJoinColumn['nullable'])) { - $inverseJoinColumnXml->addAttribute('nullable', $inverseJoinColumn['nullable']); + $inverseJoinColumnXml->addAttribute('nullable', $inverseJoinColumn['nullable'] ? 'true' : 'false'); } if (isset($inverseJoinColumn['orderBy'])) { @@ -365,7 +365,7 @@ public function exportClassMetadata(ClassMetadataInfo $metadata) } if (isset($joinColumn['nullable'])) { - $joinColumnXml->addAttribute('nullable', $joinColumn['nullable']); + $joinColumnXml->addAttribute('nullable', $joinColumn['nullable'] ? 'true' : 'false'); } } } From 2a653b05a0d56ca6cd4e8cc04bbf7138bc6276ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Sun, 20 Mar 2022 19:13:19 +0100 Subject: [PATCH 06/11] Use correct syntax for external links There is no leading underscore, and the trailing underscore should not be forgotten. --- docs/en/reference/events.rst | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/en/reference/events.rst b/docs/en/reference/events.rst index 9473760a358..f1ae35f75de 100644 --- a/docs/en/reference/events.rst +++ b/docs/en/reference/events.rst @@ -142,33 +142,33 @@ Events Overview | Event | Dispatched by | Lifecycle | Passed | | | | Callback | Argument | +=================================================================+=======================+===========+=====================================+ -| :ref:`preRemove` | ``$em->remove()`` | Yes | `_LifecycleEventArgs`_ | +| :ref:`preRemove` | ``$em->remove()`` | Yes | `LifecycleEventArgs`_ | +-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| :ref:`postRemove` | ``$em->flush()`` | Yes | `_LifecycleEventArgs`_ | +| :ref:`postRemove` | ``$em->flush()`` | Yes | `LifecycleEventArgs`_ | +-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| :ref:`prePersist` | ``$em->persist()`` | Yes | `_LifecycleEventArgs`_ | +| :ref:`prePersist` | ``$em->persist()`` | Yes | `LifecycleEventArgs`_ | | | on *initial* persist | | | +-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| :ref:`postPersist` | ``$em->flush()`` | Yes | `_LifecycleEventArgs`_ | +| :ref:`postPersist` | ``$em->flush()`` | Yes | `LifecycleEventArgs`_ | +-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| :ref:`preUpdate` | ``$em->flush()`` | Yes | `_PreUpdateEventArgs`_ | +| :ref:`preUpdate` | ``$em->flush()`` | Yes | `PreUpdateEventArgs`_ | +-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| :ref:`postUpdate` | ``$em->flush()`` | Yes | `_LifecycleEventArgs`_ | +| :ref:`postUpdate` | ``$em->flush()`` | Yes | `LifecycleEventArgs`_ | +-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| :ref:`postLoad` | Loading from database | Yes | `_LifecycleEventArgs`_ | +| :ref:`postLoad` | Loading from database | Yes | `LifecycleEventArgs`_ | +-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| :ref:`loadClassMetadata` | Loading of mapping | No | `_LoadClassMetadataEventArgs` | +| :ref:`loadClassMetadata` | Loading of mapping | No | `LoadClassMetadataEventArgs`_ | | | metadata | | | +-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| ``onClassMetadataNotFound`` | ``MappingException`` | No | `_OnClassMetadataNotFoundEventArgs` | +| ``onClassMetadataNotFound`` | ``MappingException`` | No | `OnClassMetadataNotFoundEventArgs`_ | +-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| :ref:`preFlush` | ``$em->flush()`` | Yes | `_PreFlushEventArgs`_ | +| :ref:`preFlush` | ``$em->flush()`` | Yes | `PreFlushEventArgs`_ | +-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| :ref:`onFlush` | ``$em->flush()`` | No | `_OnFlushEventArgs` | +| :ref:`onFlush` | ``$em->flush()`` | No | `OnFlushEventArgs`_ | +-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| :ref:`postFlush` | ``$em->flush()`` | No | `_PostFlushEventArgs` | +| :ref:`postFlush` | ``$em->flush()`` | No | `PostFlushEventArgs`_ | +-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ -| :ref:`onClear` | ``$em->clear()`` | No | `_OnClearEventArgs` | +| :ref:`onClear` | ``$em->clear()`` | No | `OnClearEventArgs`_ | +-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+ Naming convention From 80f65d6f77a1542525fdd702c033021fc38ba075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Tue, 22 Mar 2022 14:02:31 +0100 Subject: [PATCH 07/11] Implement int-mask-of where appropriate With Psalm, you can specify that an integer should be a bitmask of constants. Doing so allows to make some types more precise. --- lib/Doctrine/ORM/Query/AST/PathExpression.php | 6 +++++- lib/Doctrine/ORM/Query/Parser.php | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Query/AST/PathExpression.php b/lib/Doctrine/ORM/Query/AST/PathExpression.php index 3c94698e5d0..cafd10a44d5 100644 --- a/lib/Doctrine/ORM/Query/AST/PathExpression.php +++ b/lib/Doctrine/ORM/Query/AST/PathExpression.php @@ -25,7 +25,10 @@ class PathExpression extends Node */ public $type; - /** @var int */ + /** + * @var int + * @psalm-var int-mask-of + */ public $expectedType; /** @var string */ @@ -38,6 +41,7 @@ class PathExpression extends Node * @param int $expectedType * @param string $identificationVariable * @param string|null $field + * @psalm-param int-mask-of $expectedType */ public function __construct($expectedType, $identificationVariable, $field = null) { diff --git a/lib/Doctrine/ORM/Query/Parser.php b/lib/Doctrine/ORM/Query/Parser.php index d74010a088e..e3a9dea1521 100644 --- a/lib/Doctrine/ORM/Query/Parser.php +++ b/lib/Doctrine/ORM/Query/Parser.php @@ -1137,6 +1137,7 @@ public function JoinAssociationPathExpression() * PathExpression ::= IdentificationVariable {"." identifier}* * * @param int $expectedTypes + * @psalm-param int-mask-of $expectedTypes * * @return PathExpression */ From 3bc78caba93321572c6bd8d9d8ab26c08b757a84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Wed, 23 Mar 2022 18:38:40 +0100 Subject: [PATCH 08/11] Indicate what feature is deprecated --- lib/Doctrine/ORM/Exception/NotSupported.php | 11 +++++++++-- lib/Doctrine/ORM/Id/UuidGenerator.php | 6 +++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/ORM/Exception/NotSupported.php b/lib/Doctrine/ORM/Exception/NotSupported.php index 2437d99753b..c8aa0e04ff8 100644 --- a/lib/Doctrine/ORM/Exception/NotSupported.php +++ b/lib/Doctrine/ORM/Exception/NotSupported.php @@ -13,9 +13,16 @@ public static function create(): self return new self('This behaviour is (currently) not supported by Doctrine 2'); } - public static function createForDbal3(): self + public static function createForDbal3(string $context): self { - return new self('Feature was deprecated in doctrine/dbal 2.x and is not supported by installed doctrine/dbal:3.x, please see the doctrine/deprecations logs for new alternative approaches.'); + return new self(sprintf( + <<<'EXCEPTION' +Context: %s +Problem: Feature was deprecated in doctrine/dbal 2.x and is not supported by installed doctrine/dbal:3.x +Solution: See the doctrine/deprecations logs for new alternative approaches. +EXCEPTION, + $context + )); } public static function createForPersistence3(string $context): self diff --git a/lib/Doctrine/ORM/Id/UuidGenerator.php b/lib/Doctrine/ORM/Id/UuidGenerator.php index 81dd9c85f76..d24fcc1fb01 100644 --- a/lib/Doctrine/ORM/Id/UuidGenerator.php +++ b/lib/Doctrine/ORM/Id/UuidGenerator.php @@ -11,6 +11,7 @@ use Doctrine\ORM\Exception\NotSupported; use function method_exists; +use function sprintf; /** * Represents an ID generator that uses the database UUID expression @@ -29,7 +30,10 @@ public function __construct() ); if (! method_exists(AbstractPlatform::class, 'getGuidExpression')) { - throw NotSupported::createForDbal3(); + throw NotSupported::createForDbal3(sprintf( + 'Using the database to generate a UUID through %s', + self::class + )); } } From 343b0ae576843082f2ad139dd94b662e1a715017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Sat, 26 Mar 2022 12:07:22 +0100 Subject: [PATCH 09/11] Remove Sphinx config I do not think this file is still useful, since AFAIK we are not using Sphinx anymore. Besides, this is the only Doctrine project I could find that still has that file. It was last updated 6 years ago. --- docs/en/conf.py | 201 ------------------------------------------------ 1 file changed, 201 deletions(-) delete mode 100644 docs/en/conf.py diff --git a/docs/en/conf.py b/docs/en/conf.py deleted file mode 100644 index deafa6ee2d4..00000000000 --- a/docs/en/conf.py +++ /dev/null @@ -1,201 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Doctrine 2 ORM documentation build configuration file, created by -# sphinx-quickstart on Fri Dec 3 18:10:24 2010. -# -# This file is execfile()d with the current directory set to its containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import sys, os, datetime - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path.append(os.path.abspath('_exts')) - -# -- General configuration ----------------------------------------------------- - -# Add any Sphinx extension module names here, as strings. They can be extensions -# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['configurationblock'] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix of source filenames. -source_suffix = '.rst' - -# The encoding of source files. -#source_encoding = 'utf-8' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'Doctrine 2 ORM' -copyright = u'2010-%y, Doctrine Project Team'.format(datetime.date.today) - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = '2' -# The full version, including alpha/beta/rc tags. -release = '2' - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -language = 'en' - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' - -# List of documents that shouldn't be included in the build. -#unused_docs = [] - -# List of directories, relative to source directory, that shouldn't be searched -# for source files. -exclude_trees = ['_build'] - -# The reST default role (used for this markup: `text`) to use for all documents. -#default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -show_authors = True - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] - - -# -- Options for HTML output --------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. Major themes that come with -# Sphinx are currently 'default' and 'sphinxdoc'. -html_theme = 'doctrine' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -#html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -html_theme_path = ['_theme'] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -#html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -#html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -#html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -#html_additional_pages = {} - -# If false, no module index is generated. -#html_use_modindex = True - -# If false, no index is generated. -#html_use_index = True - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = '' - -# Output file base name for HTML help builder. -htmlhelp_basename = 'Doctrine2ORMdoc' - - -# -- Options for LaTeX output -------------------------------------------------- - -# The paper size ('letter' or 'a4'). -#latex_paper_size = 'letter' - -# The font size ('10pt', '11pt' or '12pt'). -#latex_font_size = '10pt' - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, documentclass [howto/manual]). -latex_documents = [ - ('index', 'Doctrine2ORM.tex', u'Doctrine 2 ORM Documentation', - u'Doctrine Project Team', 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -#latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -#latex_use_parts = False - -# Additional stuff for the LaTeX preamble. -#latex_preamble = '' - -# Documents to append as an appendix to all manuals. -#latex_appendices = [] - -# If false, no module index is generated. -#latex_use_modindex = True - -primary_domain = "dcorm" - -def linkcode_resolve(domain, info): - if domain == 'dcorm': - return 'http://' - return None From e410180c6e4fe9b6900b2b6ebbdeb7eff8d35ee2 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Mon, 28 Mar 2022 10:37:03 +0200 Subject: [PATCH 10/11] PHPStan 1.5.0 (#9607) --- composer.json | 2 +- phpstan-baseline.neon | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6c3857ddcee..13f38a490e0 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,7 @@ "doctrine/annotations": "^1.13", "doctrine/coding-standard": "^9.0", "phpbench/phpbench": "^0.16.10 || ^1.0", - "phpstan/phpstan": "1.4.6", + "phpstan/phpstan": "~1.4.10 || 1.5.0", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.4", "squizlabs/php_codesniffer": "3.6.2", "symfony/cache": "^4.4 || ^5.4 || ^6.0", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index f59d9b9318c..7b44e2213eb 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,5 +1,10 @@ parameters: ignoreErrors: + - + message: "#^Method Doctrine\\\\ORM\\\\AbstractQuery\\:\\:processParameterValue\\(\\) should return array\\|bool\\|float\\|int\\|string but returns mixed\\.$#" + count: 1 + path: lib/Doctrine/ORM/AbstractQuery.php + - message: "#^Call to an undefined method Doctrine\\\\ORM\\\\Persisters\\\\Entity\\\\EntityPersister\\:\\:getCacheRegion\\(\\)\\.$#" count: 1 From acff29fdddc5daf1e192e163530697d8593ffe5b Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Mon, 28 Mar 2022 10:48:23 +0200 Subject: [PATCH 11/11] Update psalm.xml --- psalm.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/psalm.xml b/psalm.xml index 59d3acc60df..5d6b9bce1fc 100644 --- a/psalm.xml +++ b/psalm.xml @@ -33,8 +33,6 @@ - -