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 98694d8

Browse filesBrowse files
committed
bug #34795 [Routing][ObjectLoader] Remove forgotten deprecation after merge (fancyweb)
This PR was merged into the 5.0 branch. Discussion ---------- [Routing][ObjectLoader] Remove forgotten deprecation after merge | Q | A | ------------- | --- | Branch? | 5.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - #34621 needs to be gone on 5.0. We want to throw here. I think it was forgotten when merging in 5.0. Commits ------- 4e60b9d [Routing][ObjectLoader] Remove forgotten deprecation after merge
2 parents fb08d9c + 4e60b9d commit 98694d8
Copy full SHA for 98694d8

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+1
-6
lines changed

‎src/Symfony/Component/Routing/Loader/ObjectLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Routing/Loader/ObjectLoader.php
+1-6Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,10 @@ abstract protected function getObject(string $id);
4242
*/
4343
public function load($resource, string $type = null)
4444
{
45-
if (!preg_match('/^[^\:]+(?:::?(?:[^\:]+))?$/', $resource)) {
45+
if (!preg_match('/^[^\:]+(?:::(?:[^\:]+))?$/', $resource)) {
4646
throw new \InvalidArgumentException(sprintf('Invalid resource "%s" passed to the %s route loader: use the format "object_id::method" or "object_id" if your object class has an "__invoke" method.', $resource, \is_string($type) ? '"'.$type.'"' : 'object'));
4747
}
4848

49-
if (1 === substr_count($resource, ':')) {
50-
$resource = str_replace(':', '::', $resource);
51-
@trigger_error(sprintf('Referencing object route loaders with a single colon is deprecated since Symfony 4.1. Use %s instead.', $resource), E_USER_DEPRECATED);
52-
}
53-
5449
$parts = explode('::', $resource);
5550
$method = $parts[1] ?? '__invoke';
5651

0 commit comments

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