Skip to content

Commit 0e0583f

Browse files
committed
rename class
1 parent b1eb248 commit 0e0583f

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

src/Symfony/Component/DependencyInjection/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ CHANGELOG
77
* Allow using `#[Target]` with no arguments to state that a parameter must match a named autowiring alias
88
* Deprecate `ContainerAwareInterface` and `ContainerAwareTrait`, use dependency injection instead
99
* Add `defined` env var processor that returns `true` for defined and neither null nor empty env vars
10-
* Add `#[Locator]` attribute
10+
* Add `#[AutowireLocator]` attribute
1111

1212
6.3
1313
---

src/Symfony/Component/DependencyInjection/Tests/Attribute/LocatorTest.php renamed to src/Symfony/Component/DependencyInjection/Tests/Attribute/AutowireLocatorTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313

1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument;
16-
use Symfony\Component\DependencyInjection\Attribute\Locator;
16+
use Symfony\Component\DependencyInjection\Attribute\AutowireLocator;
1717
use Symfony\Component\DependencyInjection\ContainerInterface;
1818
use Symfony\Component\DependencyInjection\Reference;
1919

20-
class LocatorTest extends TestCase
20+
class AutowireLocatorTest extends TestCase
2121
{
2222
public function testSimpleLocator()
2323
{
24-
$locator = new Locator('foo', 'bar');
24+
$locator = new AutowireLocator('foo', 'bar');
2525

2626
$this->assertEquals(
2727
new ServiceLocatorArgument(['foo' => new Reference('foo'), 'bar' => new Reference('bar')]),
@@ -31,7 +31,7 @@ public function testSimpleLocator()
3131

3232
public function testComplexLocator()
3333
{
34-
$locator = new Locator(
34+
$locator = new AutowireLocator(
3535
'?qux',
3636
foo: 'bar',
3737
bar: '?baz',

src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
use Symfony\Component\DependencyInjection\Tests\Fixtures\AutoconfiguredInterface2;
3333
use Symfony\Component\DependencyInjection\Tests\Fixtures\AutoconfiguredService1;
3434
use Symfony\Component\DependencyInjection\Tests\Fixtures\AutoconfiguredService2;
35+
use Symfony\Component\DependencyInjection\Tests\Fixtures\AutowireLocatorConsumer;
3536
use Symfony\Component\DependencyInjection\Tests\Fixtures\BarTagClass;
3637
use Symfony\Component\DependencyInjection\Tests\Fixtures\FooBarTaggedClass;
3738
use Symfony\Component\DependencyInjection\Tests\Fixtures\FooBarTaggedForDefaultPriorityClass;
3839
use Symfony\Component\DependencyInjection\Tests\Fixtures\FooTagClass;
39-
use Symfony\Component\DependencyInjection\Tests\Fixtures\LocatorConsumer;
4040
use Symfony\Component\DependencyInjection\Tests\Fixtures\StaticMethodTag;
4141
use Symfony\Component\DependencyInjection\Tests\Fixtures\TaggedConsumerWithExclude;
4242
use Symfony\Component\DependencyInjection\Tests\Fixtures\TaggedIteratorConsumer;
@@ -398,15 +398,15 @@ public function testLocatorConfiguredViaAttribute()
398398
$container->register(FooTagClass::class)
399399
->setPublic(true)
400400
;
401-
$container->register(LocatorConsumer::class)
401+
$container->register(AutowireLocatorConsumer::class)
402402
->setAutowired(true)
403403
->setPublic(true)
404404
;
405405

406406
$container->compile();
407407

408-
/** @var LocatorConsumer $s */
409-
$s = $container->get(LocatorConsumer::class);
408+
/** @var AutowireLocatorConsumer $s */
409+
$s = $container->get(AutowireLocatorConsumer::class);
410410

411411
self::assertSame($container->get(BarTagClass::class), $s->locator->get(BarTagClass::class));
412412
self::assertSame($container->get(FooTagClass::class), $s->locator->get('with_key'));

src/Symfony/Component/DependencyInjection/Tests/Fixtures/LocatorConsumer.php renamed to src/Symfony/Component/DependencyInjection/Tests/Fixtures/AutowireLocatorConsumer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
namespace Symfony\Component\DependencyInjection\Tests\Fixtures;
1313

1414
use Psr\Container\ContainerInterface;
15-
use Symfony\Component\DependencyInjection\Attribute\Locator;
15+
use Symfony\Component\DependencyInjection\Attribute\AutowireLocator;
1616

17-
final class LocatorConsumer
17+
final class AutowireLocatorConsumer
1818
{
1919
public function __construct(
20-
#[Locator(
20+
#[AutowireLocator(
2121
BarTagClass::class,
2222
with_key: FooTagClass::class,
2323
nullable: '?invalid',

src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
1818
use Symfony\Component\DependencyInjection\Attribute\Autowire;
1919
use Symfony\Component\DependencyInjection\Attribute\AutowireCallable;
20-
use Symfony\Component\DependencyInjection\Attribute\Locator;
20+
use Symfony\Component\DependencyInjection\Attribute\AutowireLocator;
2121
use Symfony\Component\DependencyInjection\Attribute\TaggedIterator;
2222
use Symfony\Component\DependencyInjection\Attribute\TaggedLocator;
2323
use Symfony\Component\DependencyInjection\Attribute\Target;
@@ -676,7 +676,7 @@ class WithTaggedIteratorAndTaggedLocator
676676
public function fooAction(
677677
#[TaggedIterator('foobar')] iterable $iterator,
678678
#[TaggedLocator('foobar')] ServiceLocator $locator,
679-
#[Locator('bar', 'baz')] ContainerInterface $container,
679+
#[AutowireLocator('bar', 'baz')] ContainerInterface $container,
680680
) {
681681
}
682682
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy