Skip to content

[FrameworkBundle] remove getProjectDir method from MicroKernelTrait #36721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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__);
Expand Down