From bb58a69e66f2371e64d502b941378d44c48ef091 Mon Sep 17 00:00:00 2001 From: Daniil Fajnberg Date: Thu, 1 Aug 2024 15:33:41 +0200 Subject: [PATCH 1/2] MDL-82668 core: Use a `.phpstorm.meta.php` directory instead of a file Allow developers to add their own metadata overrides --- .gitignore | 4 ++- .../moodle.php | 27 ++++++++++--------- 2 files changed, 17 insertions(+), 14 deletions(-) rename .phpstorm.meta.php => .phpstorm.meta.php/moodle.php (61%) diff --git a/.gitignore b/.gitignore index 1f1ea578ac1..de356d573e0 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,9 @@ /.patches/ /.idea/ .phpstorm.* -!.phpstorm.meta.php +!/.phpstorm.meta.php/ +/.phpstorm.meta.php/* +!/.phpstorm.meta.php/moodle.php /nbproject/ CVS .DS_Store diff --git a/.phpstorm.meta.php b/.phpstorm.meta.php/moodle.php similarity index 61% rename from .phpstorm.meta.php rename to .phpstorm.meta.php/moodle.php index 1f9f6c3000b..527e89ff7a5 100644 --- a/.phpstorm.meta.php +++ b/.phpstorm.meta.php/moodle.php @@ -22,19 +22,20 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -namespace PHPSTORM_META; +namespace PHPSTORM_META { -// Assume that anything returned by \core\di::get('...') is an instance of the first argument. -override(\core\di::get(0), map([ - '' => '@', -])); + // Assume that anything returned by \core\di::get('...') is an instance of the first argument. + override(\core\di::get(0), map([ + '' => '@', + ])); -// Assume that anything returned by \Psr\Container\ContainerInterface::get('...') is an instance of the first argument. -override(\Psr\Container\ContainerInterface::get(0), map([ - '' => '@', -])); + // Assume that anything returned by \Psr\Container\ContainerInterface::get('...') is an instance of the first argument. + override(\Psr\Container\ContainerInterface::get(0), map([ + '' => '@', + ])); -// Assume that anything returned by \DI\Container::get('...') is an instance of the first argument. -override(\DI\Container::get(0), map([ - '' => '@', -])); + // Assume that anything returned by \DI\Container::get('...') is an instance of the first argument. + override(\DI\Container::get(0), map([ + '' => '@', + ])); +} From c0bb4e4957e60077772f306b4da70f8b290b6842 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Wed, 14 Aug 2024 16:31:32 +0800 Subject: [PATCH 2/2] MDL-82668 core: Move phpstorm meta to di.php --- .gitignore | 2 +- .phpstorm.meta.php/{moodle.php => di.php} | 27 +++++++++++------------ 2 files changed, 14 insertions(+), 15 deletions(-) rename .phpstorm.meta.php/{moodle.php => di.php} (61%) diff --git a/.gitignore b/.gitignore index de356d573e0..be141300074 100644 --- a/.gitignore +++ b/.gitignore @@ -28,7 +28,7 @@ .phpstorm.* !/.phpstorm.meta.php/ /.phpstorm.meta.php/* -!/.phpstorm.meta.php/moodle.php +!/.phpstorm.meta.php/di.php /nbproject/ CVS .DS_Store diff --git a/.phpstorm.meta.php/moodle.php b/.phpstorm.meta.php/di.php similarity index 61% rename from .phpstorm.meta.php/moodle.php rename to .phpstorm.meta.php/di.php index 527e89ff7a5..1f9f6c3000b 100644 --- a/.phpstorm.meta.php/moodle.php +++ b/.phpstorm.meta.php/di.php @@ -22,20 +22,19 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -namespace PHPSTORM_META { +namespace PHPSTORM_META; - // Assume that anything returned by \core\di::get('...') is an instance of the first argument. - override(\core\di::get(0), map([ - '' => '@', - ])); +// Assume that anything returned by \core\di::get('...') is an instance of the first argument. +override(\core\di::get(0), map([ + '' => '@', +])); - // Assume that anything returned by \Psr\Container\ContainerInterface::get('...') is an instance of the first argument. - override(\Psr\Container\ContainerInterface::get(0), map([ - '' => '@', - ])); +// Assume that anything returned by \Psr\Container\ContainerInterface::get('...') is an instance of the first argument. +override(\Psr\Container\ContainerInterface::get(0), map([ + '' => '@', +])); - // Assume that anything returned by \DI\Container::get('...') is an instance of the first argument. - override(\DI\Container::get(0), map([ - '' => '@', - ])); -} +// Assume that anything returned by \DI\Container::get('...') is an instance of the first argument. +override(\DI\Container::get(0), map([ + '' => '@', +]));