From 45543f17a021e8fc01107251dba0508a03e0ce19 Mon Sep 17 00:00:00 2001 From: Ellis Date: Tue, 3 Dec 2019 13:07:08 -0500 Subject: [PATCH 1/3] FIX - info message must be lowercase --- .../MongoDB/Tools/Console/Command/GenerateHydratorsCommand.php | 2 +- .../Console/Command/GeneratePersistentCollectionsCommand.php | 2 +- .../MongoDB/Tools/Console/Command/GenerateProxiesCommand.php | 2 +- .../Tools/Console/Command/GenerateRepositoriesCommand.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GenerateHydratorsCommand.php b/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GenerateHydratorsCommand.php index 0ad964c8ee..c0431d7ef9 100644 --- a/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GenerateHydratorsCommand.php +++ b/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GenerateHydratorsCommand.php @@ -97,7 +97,7 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O $dm->getHydratorFactory()->generateHydratorClasses($metadatas, $destPath); // Outputting information message - $output->write(PHP_EOL . sprintf('Hydrator classes generated to "%s"', $destPath) . PHP_EOL); + $output->write(PHP_EOL . sprintf('Hydrator classes generated to "%s"', $destPath) . PHP_EOL); } else { $output->write('No Metadata Classes to process.' . PHP_EOL); } diff --git a/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GeneratePersistentCollectionsCommand.php b/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GeneratePersistentCollectionsCommand.php index 184f4aa759..0c3736be25 100644 --- a/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GeneratePersistentCollectionsCommand.php +++ b/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GeneratePersistentCollectionsCommand.php @@ -107,7 +107,7 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O } // Outputting information message - $output->write(PHP_EOL . sprintf('Persistent collections classes generated to "%s"', $destPath) . PHP_EOL); + $output->write(PHP_EOL . sprintf('Persistent collections classes generated to "%s"', $destPath) . PHP_EOL); } else { $output->write('No Metadata Classes to process.' . PHP_EOL); } diff --git a/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GenerateProxiesCommand.php b/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GenerateProxiesCommand.php index 25b3ba15a6..99158cc228 100644 --- a/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GenerateProxiesCommand.php +++ b/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GenerateProxiesCommand.php @@ -100,7 +100,7 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O $dm->getProxyFactory()->generateProxyClasses($metadatas, $destPath); // Outputting information message - $output->write(PHP_EOL . sprintf('Proxy classes generated to "%s"', $destPath) . PHP_EOL); + $output->write(PHP_EOL . sprintf('Proxy classes generated to "%s"', $destPath) . PHP_EOL); } else { $output->write('No Metadata Classes to process.' . PHP_EOL); } diff --git a/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GenerateRepositoriesCommand.php b/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GenerateRepositoriesCommand.php index 8d8a75143d..9b4b28e513 100644 --- a/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GenerateRepositoriesCommand.php +++ b/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/GenerateRepositoriesCommand.php @@ -96,7 +96,7 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O if ($numRepositories) { // Outputting information message - $output->write(PHP_EOL . sprintf('Repository classes generated to "%s"', $destPath) . PHP_EOL); + $output->write(PHP_EOL . sprintf('Repository classes generated to "%s"', $destPath) . PHP_EOL); } else { $output->write('No Repository classes were found to be processed.' . PHP_EOL); } From 81ed5478e7c34c9caba66f95d466921efb55a14d Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Wed, 4 Dec 2019 14:51:08 +0100 Subject: [PATCH 2/3] Fix typo in setup documentation --- docs/en/reference/introduction.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/reference/introduction.rst b/docs/en/reference/introduction.rst index 8e91d7f084..74013d0a5a 100644 --- a/docs/en/reference/introduction.rst +++ b/docs/en/reference/introduction.rst @@ -410,7 +410,7 @@ their mapping. .. note:: - The last call to ``spl_autoload_regiter`` is necessary to autoload generated + The last call to ``spl_autoload_register`` is necessary to autoload generated proxy classes. Without this, the proxy library would re-generate proxy classes for every request. See the `tuning for production`_ chapter in ProxyManager's documentation. From 7bd82706a3a9f70fe97028fa54e8c2c7eba6914e Mon Sep 17 00:00:00 2001 From: Maciej Malarz Date: Tue, 17 Dec 2019 18:51:24 +0100 Subject: [PATCH 3/3] Change Throwable to Exception for PHP 5.6 --- lib/Doctrine/ODM/MongoDB/Mapping/MappingException.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ODM/MongoDB/Mapping/MappingException.php b/lib/Doctrine/ODM/MongoDB/Mapping/MappingException.php index d99cf085e1..4e5f46986d 100644 --- a/lib/Doctrine/ODM/MongoDB/Mapping/MappingException.php +++ b/lib/Doctrine/ODM/MongoDB/Mapping/MappingException.php @@ -20,7 +20,7 @@ namespace Doctrine\ODM\MongoDB\Mapping; use Doctrine\Common\Persistence\Mapping\MappingException as BaseMappingException; -use Throwable; +use Exception; /** * Class for all exceptions related to the Doctrine MongoDB ODM @@ -30,7 +30,7 @@ */ class MappingException extends BaseMappingException { - public function __construct($message = "", $code = 0, Throwable $previous = null) + public function __construct($message = "", $code = 0, Exception $previous = null) { if (self::class !== static::class) { @trigger_error(sprintf('The class "%s" extends "%s" which will be final in doctrine/mongodb-odm 2.0.', static::class, self::class), E_USER_DEPRECATED);