From f2f3ebac8be2d71483b8e39989b26cf0b7e95a93 Mon Sep 17 00:00:00 2001 From: Massimiliano Arione Date: Wed, 6 May 2020 11:35:03 +0200 Subject: [PATCH] remove getProjectDir method from MicroKernelTrait --- src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md | 2 +- .../Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php | 8 -------- .../Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php | 5 +++++ 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md b/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md index 686d3c2ecb7d..9815c8fd1261 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md +++ b/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md @@ -9,7 +9,7 @@ CHANGELOG * Added the `framework.router.default_uri` configuration option to configure the default `RequestContext` * Made `MicroKernelTrait::configureContainer()` compatible with `ContainerConfigurator` * Added a new `mailer.message_bus` option to configure or disable the message bus to use to send mails. - * Added flex-compatible default implementations for `MicroKernelTrait::registerBundles()` and `getProjectDir()` + * Added flex-compatible default implementation for `MicroKernelTrait::registerBundles()` * Deprecated passing a `RouteCollectionBuilder` to `MicroKernelTrait::configureRoutes()`, type-hint `RoutingConfigurator` instead * The `TemplateController` now accepts context argument * Deprecated *not* setting the "framework.router.utf8" configuration option as it will default to `true` in Symfony 6.0 diff --git a/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php b/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php index d0d6fca01250..7783bdec4255 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php +++ b/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php @@ -60,14 +60,6 @@ abstract protected function configureRoutes(RoutingConfigurator $routes); */ abstract protected function configureContainer(ContainerConfigurator $c); - /** - * {@inheritdoc} - */ - public function getProjectDir(): string - { - return \dirname((new \ReflectionObject($this))->getFileName(), 2); - } - /** * {@inheritdoc} */ diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php index a4843bf988f8..87008db163e7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/flex-style/src/FlexStyleMicroKernel.php @@ -50,6 +50,11 @@ public function getLogDir(): string return $this->cacheDir; } + public function getProjectDir(): string + { + return \dirname((new \ReflectionObject($this))->getFileName(), 2); + } + public function __sleep(): array { throw new \BadMethodCallException('Cannot serialize '.__CLASS__);