Skip to content

Commit 1038103

Browse files
committed
Adding the ArgumentResolver component
1 parent 8c941de commit 1038103

25 files changed

+727
-38
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/Tests export-ignore
2+
/phpunit.xml.dist export-ignore
3+
/.git* export-ignore

src/Symfony/Component/ArgumentResolver/.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Symfony/Component/ArgumentResolver/.github/workflows/close-pull-request.yml

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
vendor/
2+
composer.lock
3+
phpunit.xml
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\HttpKernel\Controller;
13+
14+
/**
15+
* An ArgumentResolverInterface instance knows how to determine the
16+
* arguments for a specific function.
17+
*
18+
* @author Robin Chalas <[email protected]>
19+
* @author Fabien Potencier <[email protected]>
20+
*/
21+
interface ArgumentResolverInterface
22+
{
23+
/**
24+
* Returns the arguments to pass to the callable.
25+
*
26+
* @throws \RuntimeException When no value could be provided for a required argument
27+
*/
28+
public function getArguments(callable $callable, ?\ReflectionFunctionAbstract $reflector = null): array;
29+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
CHANGELOG
2+
=========
3+
4+
6.2
5+
---
6+
7+
* Use `SensitiveParameter` attribute to redact sensitive values in back traces
8+
9+
5.3
10+
---
11+
12+
* Add the component
13+
* Use `bcrypt` as default algorithm in `NativeArgumentResolver`
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\ArgumentResolver\Exception;
13+
14+
/**
15+
* Interface for exceptions thrown by the argument-resolver component.
16+
*
17+
* @author Robin Chalas <[email protected]>
18+
*/
19+
interface ExceptionInterface extends \Throwable
20+
{
21+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\ArgumentResolver\Exception;
13+
14+
/**
15+
* @author Robin Chalas <[email protected]>
16+
*/
17+
class LogicException extends \LogicException implements ExceptionInterface
18+
{
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\ArgumentResolver\Exception;
13+
14+
/**
15+
* @author Robin Chalas <[email protected]>
16+
*/
17+
class RawValueNotFoundException extends RuntimeException implements ExceptionInterface
18+
{
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\ArgumentResolver\Exception;
13+
14+
/**
15+
* @author Robin Chalas <[email protected]>
16+
*/
17+
class RuntimeException extends \RuntimeException implements ExceptionInterface
18+
{
19+
}

0 commit comments

Comments
 (0)