Skip to content

Commit

Permalink
Merge pull request #19 from Fabricio872/bug/RCB-13-fix-broken-attribu…
Browse files Browse the repository at this point in the history
…tes-switcher

RCB-13 fix broken attributes switcher
  • Loading branch information
Fabricio872 committed Nov 26, 2021
2 parents de3af31 + a4d0de4 commit 8c040e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions src/Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,31 @@
https://symfony.com/schema/dic/services/services-1.0.xsd">

<services>
<defaults autowire="true" autoconfigure="true"/>

<!-- Explicitly configure the service -->

<service id="fabricio872.register_command.command.user_register_command"
class="Fabricio872\RegisterCommand\Command\UserRegisterCommand"
public="true">
public="true" autowire="true">
<tag name="console.command" command="user:register"/>
</service>

<service id="Fabricio872\RegisterCommand\Command\UserRegisterCommand"
class="fabricio872.register_command.command.user_register_command"
alias="fabricio872.register_command.command.user_register_command"
public="false"/>

<service id="fabricio872.register_command.command.user_list_command"
class="Fabricio872\RegisterCommand\Command\UserListCommand"
public="true">
public="true" autowire="true">
<tag name="console.command" command="user:list"/>
</service>

<service id="Fabricio872\RegisterCommand\Command\UserListCommand"
class="fabricio872.register_command.command.user_list_command"
alias="fabricio872.register_command.command.user_list_command"
public="false"/>

<service id="fabricio872.register_command.annotations.register_command" class="Fabricio872\RegisterCommand\Annotations\RegisterCommand"
public="true"/>
<service id="Fabricio872\RegisterCommand\Annotations\RegisterCommand" class="fabricio872.register_command.annotations.register_command"
<service id="Fabricio872\RegisterCommand\Annotations\RegisterCommand" alias="fabricio872.register_command.annotations.register_command"
public="false"/>
</services>
</container>
2 changes: 1 addition & 1 deletion src/Services/Ask.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function ask(string $propertyName)
/** @var ?RegisterCommand $annotation */
$annotation = $this->reader->getPropertyAnnotation($userReflection->getProperty($propertyName), RegisterCommand::class);

if (property_exists($userReflection->getProperty($propertyName), 'getAttributes')) {
if (method_exists($userReflection->getProperty($propertyName), 'getAttributes')) {
$attributes = $userReflection->getProperty($propertyName)->getAttributes();
foreach ($attributes as $attribute) {
if ($attribute->getName() == RegisterCommand::class) {
Expand Down

0 comments on commit 8c040e5

Please sign in to comment.