-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[DI] Remove AutowireExceptionPass #24398
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,6 @@ class AutowirePass extends AbstractRecursivePass | |
private $autowired = array(); | ||
private $lastFailure; | ||
private $throwOnAutowiringException; | ||
private $autowiringExceptions = array(); | ||
|
||
/** | ||
* @param bool $throwOnAutowireException Errors can be retrieved via Definition::getErrors() | ||
|
@@ -41,26 +40,11 @@ public function __construct($throwOnAutowireException = true) | |
$this->throwOnAutowiringException = $throwOnAutowireException; | ||
} | ||
|
||
/** | ||
* @deprecated since version 3.4, to be removed in 4.0. | ||
* | ||
* @return AutowiringFailedException[] | ||
*/ | ||
public function getAutowiringExceptions() | ||
{ | ||
@trigger_error('Calling AutowirePass::getAutowiringExceptions() is deprecated since Symfony 3.4 and will be removed in 4.0. Use Definition::getErrors() instead.', E_USER_DEPRECATED); | ||
|
||
return $this->autowiringExceptions; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the property should be removed also (same in the other pass) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch. Done. |
||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function process(ContainerBuilder $container) | ||
{ | ||
// clear out any possibly stored exceptions from before | ||
$this->autowiringExceptions = array(); | ||
|
||
try { | ||
parent::process($container); | ||
} finally { | ||
|
@@ -82,7 +66,6 @@ protected function processValue($value, $isRoot = false) | |
throw $e; | ||
} | ||
|
||
$this->autowiringExceptions[] = $e; | ||
$this->container->getDefinition($this->currentId)->addError($e->getMessage()); | ||
|
||
return parent::processValue($value, $isRoot); | ||
|
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not having anything in the 3.4 changelog about the deprecation looks weird to me. The changelog should be updated (in a separate branch)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #24399 :)