diff --git a/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php b/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php index 9bf22357df895..d36b3f9a70bdb 100644 --- a/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php +++ b/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php @@ -44,7 +44,7 @@ public function isOptional() /** * {@inheritdoc} */ - public function warmUp($cacheDir) + public function warmUp(string $cacheDir) { foreach ($this->registry->getManagers() as $em) { // we need the directory no matter the proxy cache generation strategy diff --git a/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php b/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php index 4496d3ac9a3d9..8ecf2135d9245 100644 --- a/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php +++ b/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php @@ -129,10 +129,7 @@ public function removeEventListener($events, $listener) } } - /** - * @param string $eventName - */ - private function initializeListeners($eventName) + private function initializeListeners(string $eventName) { foreach ($this->listeners[$eventName] as $hash => $listener) { if (\is_string($listener)) { diff --git a/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php b/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php index ee4c644f0ea8a..0ae2088c90d4a 100644 --- a/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php +++ b/src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php @@ -44,11 +44,8 @@ public function __construct(ManagerRegistry $registry) /** * Adds the stack logger for a connection. - * - * @param string $name - * @param DebugStack $logger */ - public function addLogger($name, DebugStack $logger) + public function addLogger(string $name, DebugStack $logger) { $this->loggers[$name] = $logger; } @@ -120,7 +117,7 @@ public function getName() return 'db'; } - private function sanitizeQueries($connectionName, $queries) + private function sanitizeQueries(string $connectionName, array $queries) { foreach ($queries as $i => $query) { $queries[$i] = $this->sanitizeQuery($connectionName, $query); @@ -129,7 +126,7 @@ private function sanitizeQueries($connectionName, $queries) return $queries; } - private function sanitizeQuery($connectionName, $query) + private function sanitizeQuery(string $connectionName, $query) { $query['explainable'] = true; if (null === $query['params']) { diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php index a36b55eb16c0c..70ff425fe47b3 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php @@ -101,11 +101,8 @@ protected function loadMappingInformation(array $objectManager, ContainerBuilder * Register the alias for this mapping driver. * * Aliases can be used in the Query languages of all the Doctrine object managers to simplify writing tasks. - * - * @param array $mappingConfig - * @param string $mappingName */ - protected function setMappingDriverAlias($mappingConfig, $mappingName) + protected function setMappingDriverAlias(array $mappingConfig, string $mappingName) { if (isset($mappingConfig['alias'])) { $this->aliasMap[$mappingConfig['alias']] = $mappingConfig['prefix']; @@ -117,12 +114,9 @@ protected function setMappingDriverAlias($mappingConfig, $mappingName) /** * Register the mapping driver configuration for later use with the object managers metadata driver chain. * - * @param array $mappingConfig - * @param string $mappingName - * * @throws \InvalidArgumentException */ - protected function setMappingDriverConfig(array $mappingConfig, $mappingName) + protected function setMappingDriverConfig(array $mappingConfig, string $mappingName) { $mappingDirectory = $mappingConfig['dir']; if (!is_dir($mappingDirectory)) { @@ -171,11 +165,8 @@ protected function getMappingDriverBundleConfigDefaults(array $bundleConfig, \Re /** * Register all the collected mapping information with the object manager by registering the appropriate mapping drivers. - * - * @param array $objectManager - * @param ContainerBuilder $container A ContainerBuilder instance */ - protected function registerMappingDrivers($objectManager, ContainerBuilder $container) + protected function registerMappingDrivers(array $objectManager, ContainerBuilder $container) { // configure metadata driver for each bundle based on the type of mapping files found if ($container->hasDefinition($this->getObjectManagerElementName($objectManager['name'].'_metadata_driver'))) { @@ -225,12 +216,9 @@ protected function registerMappingDrivers($objectManager, ContainerBuilder $cont /** * Assertion if the specified mapping information is valid. * - * @param array $mappingConfig - * @param string $objectManagerName - * * @throws \InvalidArgumentException */ - protected function assertValidMappingConfiguration(array $mappingConfig, $objectManagerName) + protected function assertValidMappingConfiguration(array $mappingConfig, string $objectManagerName) { if (!$mappingConfig['type'] || !$mappingConfig['dir'] || !$mappingConfig['prefix']) { throw new \InvalidArgumentException(sprintf('Mapping definitions for Doctrine manager "%s" require at least the "type", "dir" and "prefix" options.', $objectManagerName)); @@ -252,12 +240,9 @@ protected function assertValidMappingConfiguration(array $mappingConfig, $object /** * Detects what metadata driver to use for the supplied directory. * - * @param string $dir A directory path - * @param ContainerBuilder $container A ContainerBuilder instance - * * @return string|null A metadata driver short name, if one can be detected */ - protected function detectMetadataDriver($dir, ContainerBuilder $container) + protected function detectMetadataDriver(string $dir, ContainerBuilder $container) { $configPath = $this->getMappingResourceConfigDirectory(); $extension = $this->getMappingResourceExtension(); @@ -286,13 +271,9 @@ protected function detectMetadataDriver($dir, ContainerBuilder $container) /** * Loads a configured object manager metadata, query or result cache driver. * - * @param array $objectManager A configured object manager - * @param ContainerBuilder $container A ContainerBuilder instance - * @param string $cacheName - * * @throws \InvalidArgumentException in case of unknown driver type */ - protected function loadObjectManagerCacheDriver(array $objectManager, ContainerBuilder $container, $cacheName) + protected function loadObjectManagerCacheDriver(array $objectManager, ContainerBuilder $container, string $cacheName) { $this->loadCacheDriver($cacheName, $objectManager['name'], $objectManager[$cacheName.'_driver'], $container); } @@ -300,16 +281,11 @@ protected function loadObjectManagerCacheDriver(array $objectManager, ContainerB /** * Loads a cache driver. * - * @param string $cacheName The cache driver name - * @param string $objectManagerName The object manager name - * @param array $cacheDriver The cache driver mapping - * @param ContainerBuilder $container The ContainerBuilder instance - * * @return string * * @throws \InvalidArgumentException */ - protected function loadCacheDriver($cacheName, $objectManagerName, array $cacheDriver, ContainerBuilder $container) + protected function loadCacheDriver(string $cacheName, string $objectManagerName, array $cacheDriver, ContainerBuilder $container) { $cacheDriverServiceId = $this->getObjectManagerElementName($objectManagerName.'_'.$cacheName); @@ -412,11 +388,9 @@ protected function fixManagersAutoMappings(array $managerConfigs, array $bundles * * @example $name is 'entity_manager' then the result would be 'doctrine.orm.entity_manager' * - * @param string $name - * * @return string */ - abstract protected function getObjectManagerElementName($name); + abstract protected function getObjectManagerElementName(string $name); /** * Noun that describes the mapped objects such as Entity or Document. diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php index deaa64e7c9084..6016c8ce0905f 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php @@ -109,7 +109,7 @@ private function addTaggedListeners(ContainerBuilder $container) } } - private function getEventManagerDef(ContainerBuilder $container, $name) + private function getEventManagerDef(ContainerBuilder $container, string $name) { if (!isset($this->eventManagers[$name])) { $this->eventManagers[$name] = $container->getDefinition(sprintf($this->managerTemplate, $name)); @@ -128,12 +128,9 @@ private function getEventManagerDef(ContainerBuilder $container, $name) * @see https://bugs.php.net/bug.php?id=53710 * @see https://bugs.php.net/bug.php?id=60926 * - * @param string $tagName - * @param ContainerBuilder $container - * * @return array */ - private function findAndSortTags($tagName, ContainerBuilder $container) + private function findAndSortTags(string $tagName, ContainerBuilder $container) { $sortedTags = []; diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php index 352bf79bfbc7e..454c7cc0b9222 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/Security/UserProvider/EntityFactory.php @@ -33,7 +33,7 @@ public function __construct(string $key, string $providerId) $this->providerId = $providerId; } - public function create(ContainerBuilder $container, $id, $config) + public function create(ContainerBuilder $container, string $id, array $config) { $container ->setDefinition($id, new ChildDefinition($this->providerId)) diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php index 38e97ceba09c0..e9717efa0552e 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php @@ -62,7 +62,7 @@ public function __construct(ObjectManager $manager, string $class, IdReader $idR /** * {@inheritdoc} */ - public function loadChoiceList($value = null) + public function loadChoiceList(callable $value = null) { if ($this->choiceList) { return $this->choiceList; @@ -78,7 +78,7 @@ public function loadChoiceList($value = null) /** * {@inheritdoc} */ - public function loadValuesForChoices(array $choices, $value = null) + public function loadValuesForChoices(array $choices, callable $value = null) { // Performance optimization if (empty($choices)) { @@ -110,7 +110,7 @@ public function loadValuesForChoices(array $choices, $value = null) /** * {@inheritdoc} */ - public function loadChoicesForValues(array $values, $value = null) + public function loadChoicesForValues(array $values, callable $value = null) { // Performance optimization // Also prevents the generation of "WHERE id IN ()" queries through the diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityLoaderInterface.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityLoaderInterface.php index e36043af63cb8..8eb5a84484503 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityLoaderInterface.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityLoaderInterface.php @@ -28,12 +28,7 @@ public function getEntities(); /** * Returns an array of entities matching the given identifiers. * - * @param string $identifier The identifier field of the object. This method - * is not applicable for fields with multiple - * identifiers. - * @param array $values The values of the identifiers - * * @return array The entities */ - public function getEntitiesByIds($identifier, array $values); + public function getEntitiesByIds(string $identifier, array $values); } diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/IdReader.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/IdReader.php index 3509d9b03b329..9ab9607c2c18f 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/IdReader.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/IdReader.php @@ -84,11 +84,9 @@ public function isIntId(): bool * * This method assumes that the object has a single-column ID. * - * @param object $object The object - * * @return mixed The ID value */ - public function getIdValue($object) + public function getIdValue(object $object = null) { if (!$object) { return; diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php index 96f5e2f5f1868..eeb1a77f91b82 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php @@ -53,7 +53,7 @@ public function getEntities() /** * {@inheritdoc} */ - public function getEntitiesByIds($identifier, array $values) + public function getEntitiesByIds(string $identifier, array $values) { $qb = clone $this->queryBuilder; $alias = current($qb->getRootAliases()); diff --git a/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php b/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php index 34fb04aed283e..f3ff76f26f94b 100644 --- a/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php +++ b/src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php @@ -36,7 +36,7 @@ public function __construct(ManagerRegistry $registry) /** * {@inheritdoc} */ - public function guessType($class, $property) + public function guessType(string $class, string $property) { if (!$ret = $this->getMetadata($class)) { return new TypeGuess('Symfony\Component\Form\Extension\Core\Type\TextType', [], Guess::LOW_CONFIDENCE); @@ -94,7 +94,7 @@ public function guessType($class, $property) /** * {@inheritdoc} */ - public function guessRequired($class, $property) + public function guessRequired(string $class, string $property) { $classMetadatas = $this->getMetadata($class); @@ -132,7 +132,7 @@ public function guessRequired($class, $property) /** * {@inheritdoc} */ - public function guessMaxLength($class, $property) + public function guessMaxLength(string $class, string $property) { $ret = $this->getMetadata($class); if ($ret && isset($ret[0]->fieldMappings[$property]) && !$ret[0]->hasAssociation($property)) { @@ -151,7 +151,7 @@ public function guessMaxLength($class, $property) /** * {@inheritdoc} */ - public function guessPattern($class, $property) + public function guessPattern(string $class, string $property) { $ret = $this->getMetadata($class); if ($ret && isset($ret[0]->fieldMappings[$property]) && !$ret[0]->hasAssociation($property)) { @@ -161,7 +161,7 @@ public function guessPattern($class, $property) } } - protected function getMetadata($class) + protected function getMetadata(string $class) { // normalize class name $class = self::getRealClass(ltrim($class, '\\')); diff --git a/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php b/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php index 88f9cf9101c7d..8030207da61a1 100644 --- a/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php +++ b/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php @@ -14,6 +14,7 @@ use Doctrine\Common\Collections\Collection; use Doctrine\Common\Persistence\ManagerRegistry; use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\ORM\QueryBuilder; use Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader; use Symfony\Bridge\Doctrine\Form\ChoiceList\EntityLoaderInterface; use Symfony\Bridge\Doctrine\Form\ChoiceList\IdReader; @@ -49,14 +50,12 @@ abstract class DoctrineType extends AbstractType implements ResetInterface * * For backwards compatibility, objects are cast to strings by default. * - * @param object $choice The object - * * @return string The string representation of the object * * @internal This method is public to be usable as callback. It should not * be used in user code. */ - public static function createChoiceLabel($choice) + public static function createChoiceLabel(object $choice) { return (string) $choice; } @@ -68,17 +67,16 @@ public static function createChoiceLabel($choice) * a single-column integer ID. In that case, the value of the field is * the ID of the object. That ID is also used as field name. * - * @param object $choice The object - * @param int|string $key The choice key - * @param string $value The choice value. Corresponds to the object's - * ID here. + * @param int|string $key The choice key + * @param string $value The choice value. Corresponds to the object's + * ID here. * * @return string The field name * * @internal This method is public to be usable as callback. It should not * be used in user code. */ - public static function createChoiceName($choice, $key, $value) + public static function createChoiceName(object $choice, $key, string $value) { return str_replace('-', '_', (string) $value); } @@ -88,15 +86,13 @@ public static function createChoiceName($choice, $key, $value) * For instance in ORM two query builders with an equal SQL string and * equal parameters are considered to be equal. * - * @param object $queryBuilder - * * @return array|false Array with important QueryBuilder parts or false if * they can't be determined * * @internal This method is public to be usable as callback. It should not * be used in user code. */ - public function getQueryBuilderPartsForCachingHash($queryBuilder) + public function getQueryBuilderPartsForCachingHash(QueryBuilder $queryBuilder) { return false; } @@ -265,13 +261,9 @@ public function configureOptions(OptionsResolver $resolver) /** * Return the default loader object. * - * @param ObjectManager $manager - * @param mixed $queryBuilder - * @param string $class - * * @return EntityLoaderInterface */ - abstract public function getLoader(ObjectManager $manager, $queryBuilder, $class); + abstract public function getLoader(ObjectManager $manager, QueryBuilder $queryBuilder, string $class); public function getParent() { diff --git a/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php b/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php index b6c598350c0a8..016f1b05051e9 100644 --- a/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php +++ b/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php @@ -46,13 +46,9 @@ public function configureOptions(OptionsResolver $resolver) /** * Return the default loader object. * - * @param ObjectManager $manager - * @param QueryBuilder $queryBuilder - * @param string $class - * * @return ORMQueryBuilderLoader */ - public function getLoader(ObjectManager $manager, $queryBuilder, $class) + public function getLoader(ObjectManager $manager, QueryBuilder $queryBuilder, string $class) { return new ORMQueryBuilderLoader($queryBuilder); } @@ -69,14 +65,12 @@ public function getBlockPrefix() * We consider two query builders with an equal SQL string and * equal parameters to be equal. * - * @param QueryBuilder $queryBuilder - * * @return array * * @internal This method is public to be usable as callback. It should not * be used in user code. */ - public function getQueryBuilderPartsForCachingHash($queryBuilder) + public function getQueryBuilderPartsForCachingHash(QueryBuilder $queryBuilder) { return [ $queryBuilder->getQuery()->getSQL(), diff --git a/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php b/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php index 63880a6d614a0..b64a82faa2a75 100644 --- a/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php +++ b/src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php @@ -58,11 +58,8 @@ public function stopQuery() /** * Logs a message. - * - * @param string $message A message to log - * @param array $params The context */ - protected function log($message, array $params) + protected function log(string $message, array $params) { $this->logger->debug($message, $params); } diff --git a/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php b/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php index 89bb9afaf9681..b3ccfe79a0301 100644 --- a/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php +++ b/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php @@ -40,7 +40,7 @@ public function __construct(EntityManagerInterface $entityManager) /** * {@inheritdoc} */ - public function getProperties($class, array $context = []) + public function getProperties(string $class, array $context = []) { if (null === $metadata = $this->getMetadata($class)) { return null; @@ -62,7 +62,7 @@ public function getProperties($class, array $context = []) /** * {@inheritdoc} */ - public function getTypes($class, $property, array $context = []) + public function getTypes(string $class, string $property, array $context = []) { if (null === $metadata = $this->getMetadata($class)) { return null; @@ -162,7 +162,7 @@ public function getTypes($class, $property, array $context = []) /** * {@inheritdoc} */ - public function isReadable($class, $property, array $context = []) + public function isReadable(string $class, string $property, array $context = []) { return null; } @@ -170,7 +170,7 @@ public function isReadable($class, $property, array $context = []) /** * {@inheritdoc} */ - public function isWritable($class, $property, array $context = []) + public function isWritable(string $class, string $property, array $context = []) { if ( null === ($metadata = $this->getMetadata($class)) diff --git a/src/Symfony/Bridge/Doctrine/RegistryInterface.php b/src/Symfony/Bridge/Doctrine/RegistryInterface.php index 6928f8afd4f9c..24b1ce45262c5 100644 --- a/src/Symfony/Bridge/Doctrine/RegistryInterface.php +++ b/src/Symfony/Bridge/Doctrine/RegistryInterface.php @@ -31,11 +31,9 @@ public function getDefaultEntityManagerName(); /** * Gets a named entity manager. * - * @param string $name The entity manager name (null for the default one) - * * @return EntityManager */ - public function getEntityManager($name = null); + public function getEntityManager(string $name = null); /** * Gets an array of all registered entity managers. @@ -57,24 +55,20 @@ public function getEntityManagers(); * hold an obsolete reference. You can inject the registry instead * to avoid this problem. * - * @param string $name The entity manager name (null for the default one) - * * @return EntityManager */ - public function resetEntityManager($name = null); + public function resetEntityManager(string $name = null); /** * Resolves a registered namespace alias to the full namespace. * * This method looks for the alias in all registered entity managers. * - * @param string $alias The alias - * * @return string The full namespace * * @see Configuration::getEntityNamespace */ - public function getEntityNamespace($alias); + public function getEntityNamespace(string $alias); /** * Gets all connection names. @@ -86,9 +80,7 @@ public function getEntityManagerNames(); /** * Gets the entity manager associated with a given class. * - * @param string $class A Doctrine Entity class name - * * @return EntityManager|null */ - public function getEntityManagerForClass($class); + public function getEntityManagerForClass(string $class); } diff --git a/src/Symfony/Bridge/Doctrine/Security/User/UserLoaderInterface.php b/src/Symfony/Bridge/Doctrine/Security/User/UserLoaderInterface.php index 452939fa7934a..d996f71702291 100644 --- a/src/Symfony/Bridge/Doctrine/Security/User/UserLoaderInterface.php +++ b/src/Symfony/Bridge/Doctrine/Security/User/UserLoaderInterface.php @@ -31,9 +31,7 @@ interface UserLoaderInterface * * This method must return null if the user is not found. * - * @param string $username The username - * * @return UserInterface|null */ - public function loadUserByUsername($username); + public function loadUserByUsername(string $username); } diff --git a/src/Symfony/Bridge/Doctrine/Test/TestRepositoryFactory.php b/src/Symfony/Bridge/Doctrine/Test/TestRepositoryFactory.php index f6ac1eedda5fc..0a44dcbf85da9 100644 --- a/src/Symfony/Bridge/Doctrine/Test/TestRepositoryFactory.php +++ b/src/Symfony/Bridge/Doctrine/Test/TestRepositoryFactory.php @@ -40,14 +40,14 @@ public function getRepository(EntityManagerInterface $entityManager, $entityName return $this->repositoryList[$repositoryHash] = $this->createRepository($entityManager, $entityName); } - public function setRepository(EntityManagerInterface $entityManager, $entityName, ObjectRepository $repository) + public function setRepository(EntityManagerInterface $entityManager, string $entityName, ObjectRepository $repository) { $repositoryHash = $this->getRepositoryHash($entityManager, $entityName); $this->repositoryList[$repositoryHash] = $repository; } - private function createRepository(EntityManagerInterface $entityManager, $entityName): ObjectRepository + private function createRepository(EntityManagerInterface $entityManager, string $entityName): ObjectRepository { /* @var $metadata ClassMetadata */ $metadata = $entityManager->getClassMetadata($entityName); @@ -56,7 +56,7 @@ private function createRepository(EntityManagerInterface $entityManager, $entity return new $repositoryClassName($entityManager, $metadata); } - private function getRepositoryHash(EntityManagerInterface $entityManager, $entityName): string + private function getRepositoryHash(EntityManagerInterface $entityManager, string $entityName): string { return $entityManager->getClassMetadata($entityName)->getName().spl_object_hash($entityManager); } diff --git a/src/Symfony/Bridge/Doctrine/composer.json b/src/Symfony/Bridge/Doctrine/composer.json index 301cb7ff43d69..9dd55ece0e3c9 100644 --- a/src/Symfony/Bridge/Doctrine/composer.json +++ b/src/Symfony/Bridge/Doctrine/composer.json @@ -27,11 +27,11 @@ "symfony/stopwatch": "^4.4|^5.0", "symfony/config": "^4.4|^5.0", "symfony/dependency-injection": "^4.4|^5.0", - "symfony/form": "^4.4|^5.0", - "symfony/http-kernel": "^4.4|^5.0", + "symfony/form": "^5.0", + "symfony/http-kernel": "^5.0", "symfony/messenger": "^4.4|^5.0", "symfony/property-access": "^4.4|^5.0", - "symfony/property-info": "^4.4|^5.0", + "symfony/property-info": "^5.0", "symfony/proxy-manager-bridge": "^4.4|^5.0", "symfony/security-core": "^5.0", "symfony/expression-language": "^4.4|^5.0", @@ -48,8 +48,11 @@ "conflict": { "phpunit/phpunit": "<5.4.3", "symfony/dependency-injection": "<4.4", - "symfony/form": "<4.4", + "symfony/form": "<5", + "symfony/http-kernel": "<5", "symfony/messenger": "<4.4", + "symfony/property-info": "<5", + "symfony/security-bundle": "<5", "symfony/security-core": "<5" }, "suggest": { diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php index df250358aa61e..6d9481c59cb4a 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/UserProviderFactoryInterface.php @@ -22,7 +22,7 @@ */ interface UserProviderFactoryInterface { - public function create(ContainerBuilder $container, $id, $config); + public function create(ContainerBuilder $container, string $id, array $config); public function getKey(); diff --git a/src/Symfony/Component/Form/ChoiceList/Loader/ChoiceLoaderInterface.php b/src/Symfony/Component/Form/ChoiceList/Loader/ChoiceLoaderInterface.php index 31d47d539cfb5..507735d1b3aa2 100644 --- a/src/Symfony/Component/Form/ChoiceList/Loader/ChoiceLoaderInterface.php +++ b/src/Symfony/Component/Form/ChoiceList/Loader/ChoiceLoaderInterface.php @@ -36,7 +36,7 @@ interface ChoiceLoaderInterface * * @return ChoiceListInterface The loaded choice list */ - public function loadChoiceList($value = null); + public function loadChoiceList(callable $value = null); /** * Loads the choices corresponding to the given values. @@ -54,7 +54,7 @@ public function loadChoiceList($value = null); * * @return array An array of choices */ - public function loadChoicesForValues(array $values, $value = null); + public function loadChoicesForValues(array $values, callable $value = null); /** * Loads the values corresponding to the given choices. @@ -72,5 +72,5 @@ public function loadChoicesForValues(array $values, $value = null); * * @return string[] An array of choice values */ - public function loadValuesForChoices(array $choices, $value = null); + public function loadValuesForChoices(array $choices, callable $value = null); } diff --git a/src/Symfony/Component/Form/FormTypeGuesserInterface.php b/src/Symfony/Component/Form/FormTypeGuesserInterface.php index 3be9a0c9f8570..e172df4911061 100644 --- a/src/Symfony/Component/Form/FormTypeGuesserInterface.php +++ b/src/Symfony/Component/Form/FormTypeGuesserInterface.php @@ -19,32 +19,23 @@ interface FormTypeGuesserInterface /** * Returns a field guess for a property name of a class. * - * @param string $class The fully qualified class name - * @param string $property The name of the property to guess for - * * @return Guess\TypeGuess|null A guess for the field's type and options */ - public function guessType($class, $property); + public function guessType(string $class, string $property); /** * Returns a guess whether a property of a class is required. * - * @param string $class The fully qualified class name - * @param string $property The name of the property to guess for - * * @return Guess\ValueGuess|null A guess for the field's required setting */ - public function guessRequired($class, $property); + public function guessRequired(string $class, string $property); /** * Returns a guess about the field's maximum length. * - * @param string $class The fully qualified class name - * @param string $property The name of the property to guess for - * * @return Guess\ValueGuess|null A guess for the field's maximum length */ - public function guessMaxLength($class, $property); + public function guessMaxLength(string $class, string $property); /** * Returns a guess about the field's pattern. @@ -56,10 +47,7 @@ public function guessMaxLength($class, $property); * * @see https://github.com/symfony/symfony/pull/3927 * - * @param string $class The fully qualified class name - * @param string $property The name of the property to guess for - * * @return Guess\ValueGuess|null A guess for the field's required pattern */ - public function guessPattern($class, $property); + public function guessPattern(string $class, string $property); } diff --git a/src/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php b/src/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php index 25d8ee8f61a8c..e7715a33f6c99 100644 --- a/src/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php +++ b/src/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php @@ -20,8 +20,6 @@ interface WarmableInterface { /** * Warms up the cache. - * - * @param string $cacheDir The cache directory */ - public function warmUp($cacheDir); + public function warmUp(string $cacheDir); } 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