Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 44757b0

Browse filesBrowse files
committed
[DependencyInjection] added a check for the class name when dumping a container to PHP
1 parent 1dd5b61 commit 44757b0
Copy full SHA for 44757b0

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎src/Symfony/Components/DependencyInjection/Dumper/PhpDumper.php

Copy file name to clipboardExpand all lines: src/Symfony/Components/DependencyInjection/Dumper/PhpDumper.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ protected function addServiceInstance($id, $definition)
8787
{
8888
$class = $this->dumpValue($definition->getClass());
8989

90-
if (0 === strpos($class, "'") && !preg_match('/^\'[\\a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\'$/', $class)) {
90+
if (0 === strpos($class, "'") && !preg_match('/^\'[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(\\\{2}[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)*\'$/', $class)) {
9191
throw new \InvalidArgumentException(sprintf('"%s" is not a valid class name.', $class));
9292
}
9393

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.