Skip to content

Commit

Permalink
Merge branch '6.4' into 7.0
Browse files Browse the repository at this point in the history
* 6.4:
  Fix RequestPayloadValueResolver handling error with no ExpectedTypes
  [Mime] Fix serializing uninitialized RawMessage::$message to null
  [Notifer][Smsapi] Set messageId of SentMessage
  [DX] Use Symfony "dark-mode"-responsive logo in README
  support lazy evaluated exception messages with Xdebug 3
  Provide more precise phpdoc for FileLocatorInterface::locate
  [DependencyInjection] #[Autowire] attribute should have precedence over bindings
  • Loading branch information
nicolas-grekas committed Jan 30, 2024
2 parents 95834ca + 206482f commit 86a5027
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions FileLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ public function __construct(string|array $paths = [])
$this->paths = (array) $paths;
}

/**
* @return string|string[]
*
* @psalm-return ($first is true ? string : string[])
*/
public function locate(string $name, ?string $currentPath = null, bool $first = true): string|array
{
if ('' === $name) {
Expand Down
4 changes: 3 additions & 1 deletion FileLocatorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ interface FileLocatorInterface
* @param string|null $currentPath The current path
* @param bool $first Whether to return the first occurrence or an array of filenames
*
* @return string|array The full path to the file or an array of file paths
* @return string|string[] The full path to the file or an array of file paths
*
* @throws \InvalidArgumentException If $name is empty
* @throws FileLocatorFileNotFoundException If a file is not found
*
* @psalm-return ($first is true ? string : string[])
*/
public function locate(string $name, ?string $currentPath = null, bool $first = true): string|array;
}

0 comments on commit 86a5027

Please sign in to comment.