Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

Commit

Permalink
Merge pull request #18 from iltar/fix/orm-config
Browse files Browse the repository at this point in the history
Fixed some old references after #17
  • Loading branch information
linaori authored Jul 22, 2016
2 parents 5d8173a + 9f8a0aa commit 80897ed
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private function addRouterConfig(ArrayNodeDefinition $rootNode)
->fixXmlConfig('mapped_property')
->children()
->booleanNode('entity_id_resolver')
->info('Enable or disable the EntityIdResolver')
->info('Enable or disable the EntityIdDescriptor which resolves entity ids')
->defaultFalse()
->end() // entity_id_resolver
->arrayNode('mapped_properties')
Expand Down
6 changes: 3 additions & 3 deletions src/DependencyInjection/IltarHttpExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Iltar\HttpBundle\DependencyInjection;

use Iltar\HttpBundle\DoctrineBridge\Router\EntityIdResolver;
use Iltar\HttpBundle\Router\MappablePropertyPathResolver;
use Iltar\HttpBundle\Router\ParameterResolverInterface;
use Iltar\HttpBundle\Router\ParameterResolvingRouter;
use Iltar\HttpBundle\Router\Resolver\IdentifyingValueResolver;
use Iltar\HttpBundle\Router\Resolver\MappablePropertyPathResolver;
use Iltar\HttpBundle\Router\ResolverCollection;
use Iltar\HttpBundle\Router\ResolverCollectionInterface;
use Symfony\Component\Config\FileLocator;
Expand Down Expand Up @@ -54,7 +54,7 @@ private function processRouterConfig(array $config, ContainerBuilder $container,

if (false !== $config['entity_id_resolver']) {
$loader->load('entity_id_resolver.xml');
$this->addClassesToCompile([EntityIdResolver::class]);
$this->addClassesToCompile([IdentifyingValueResolver::class]);
}
}

Expand Down
1 change: 1 addition & 0 deletions src/DoctrineBridge/EntityIdDescriptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public function __construct(RegistryInterface $registry, PropertyAccessor $prope
* Returns true of the implementation manages this type of object.
*
* @param mixed $object
*
* @return bool
*/
public function isManaged($object)
Expand Down
3 changes: 2 additions & 1 deletion src/DoctrineBridge/Router/EntityIdResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
* Uses a model descriptor to get the identifying value of a model.
*
* @deprecated as of 1.1 and will be removed in 2.0. Use the Iltar\HttpBundle\Router\Resolver\IdentifyingValueResolver instead.
*
* @author Iltar van der Berg <kjarli@gmail.com>
*/
final class EntityIdResolver extends IdentifyingValueResolver
{
public function __construct(ModelDescriptorInterface $modelDescriptor)
{
@trigger_error(sprintf('%s is deprecated as of 1.1 and will be removed in 2.0. Use the %s instead.', EntityIdResolver::class, IdentifyingValueResolver::class), E_USER_DEPRECATED);
@trigger_error(sprintf('%s is deprecated as of 1.1 and will be removed in 2.0. Use the %s instead.', self::class, IdentifyingValueResolver::class), E_USER_DEPRECATED);

parent::__construct($modelDescriptor);
}
Expand Down
1 change: 1 addition & 0 deletions src/ModelDescriptor/ModelDescriptorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ interface ModelDescriptorInterface
* Returns true of the implementation manages this type of object.
*
* @param mixed $object
*
* @return bool
*/
public function isManaged($object);
Expand Down
2 changes: 1 addition & 1 deletion src/Router/Resolver/IdentifyingValueResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* @final as of 2.0, when the EntityIdResolver will be removed.
*/
/*final*/ class IdentifyingValueResolver implements ParameterResolverInterface
/*final */class IdentifyingValueResolver implements ParameterResolverInterface
{
/**
* @var ModelDescriptorInterface
Expand Down
2 changes: 1 addition & 1 deletion src/Router/Resolver/MappablePropertyPathResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @final as of 2.0, when the deprecated MappablePropertyPathResolver will be removed.
*/
/*final*/ class MappablePropertyPathResolver implements ParameterResolverInterface
/*final */class MappablePropertyPathResolver implements ParameterResolverInterface
{
/**
* @var PropertyAccessor
Expand Down

0 comments on commit 80897ed

Please sign in to comment.