Skip to content

Commit e182a3c

Browse files
committed
Merge branch '6.1' into 6.2
* 6.1: do not accept array input when a form is not multiple Update PR template [FrameworkBundle] fix tests Fix merge [Mime] Throw exception when body in Email attach method is not ok [VarDumper][VarExporter] Deal with DatePeriod->include_end_date on PHP 8.2 [Cache] Throw when "redis_sentinel" is used with a non-Predis "class" option New bundle path convention when AbstractBundle is used fix merge Bootstrap 4 fieldset for row errors [Form] Fix same choice loader with different choice values [Filesystem] Safeguard (sym)link calls Fix dumping extension config without bundle [HttpClient] Honor "max_duration" when replacing requests with async decorators [FrameworkBundle] Simplify registration of #[AsRoutingConditionService] [HttpClient] Add missing HttpOptions::setMaxDuration() [HttpKernel] Fix missing null type in `ErrorListener::__construct()` [HttpFoundation] [Session] Overwrite invalid session id
2 parents 69f57b7 + 8ed51b3 commit e182a3c

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

Bundle/AbstractBundle.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,18 @@ public function getContainerExtension(): ?ExtensionInterface
4747

4848
return $this->extension ??= new BundleExtension($this, $this->extensionAlias);
4949
}
50+
51+
/**
52+
* {@inheritdoc}
53+
*/
54+
public function getPath(): string
55+
{
56+
if (null === $this->path) {
57+
$reflected = new \ReflectionObject($this);
58+
// assume the modern directory structure by default
59+
$this->path = \dirname($reflected->getFileName(), 2);
60+
}
61+
62+
return $this->path;
63+
}
5064
}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ CHANGELOG
1010
* Add `Profiler::isEnabled()` so collaborating collector services may elect to omit themselves
1111
* Add the `UidValueResolver` argument value resolver
1212
* Add `AbstractBundle` class for DI configuration/definition on a single file
13+
* Update the path of a bundle placed in the `src/` directory to the parent directory when `AbstractBundle` is used
1314

1415
6.0
1516
---

EventListener/ErrorListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class ErrorListener implements EventSubscriberInterface
3535
protected $debug;
3636
protected $exceptionsMapping;
3737

38-
public function __construct(string|object|array $controller, LoggerInterface $logger = null, bool $debug = false, array $exceptionsMapping = [])
38+
public function __construct(string|object|array|null $controller, LoggerInterface $logger = null, bool $debug = false, array $exceptionsMapping = [])
3939
{
4040
$this->controller = $controller;
4141
$this->logger = $logger;

0 commit comments

Comments
 (0)