Skip to content

Commit

Permalink
bug #36721 [FrameworkBundle] remove getProjectDir method from MicroKe…
Browse files Browse the repository at this point in the history
…rnelTrait (garak)

This PR was merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle] remove getProjectDir method from MicroKernelTrait

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36719
| License       | MIT
| Doc PR        | not needed

Remove method added in trait, to be able to use same method in base kernel class.

Commits
-------

f2f3eba remove getProjectDir method from MicroKernelTrait
  • Loading branch information
fabpot committed May 6, 2020
2 parents af160e2 + f2f3eba commit 75e71e3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
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
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
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

0 comments on commit 75e71e3

Please sign in to comment.