Remove expected exception annotations#1993
Conversation
| ->in(__DIR__) | ||
| ->exclude('tests/Fixtures/app/cache') | ||
| ->in([__DIR__.'/src', __DIR__.'/tests']) | ||
| ->append([__FILE__]) |
There was a problem hiding this comment.
well, to apply the same standard to app php files in the project.
There was a problem hiding this comment.
Actually, what's wrong with just using
->in(__DIR__)as before?
| * file that was distributed with this source code. | ||
| */ | ||
|
|
||
| declare(strict_types=1); |
There was a problem hiding this comment.
(But if we really want to do this, then let's do it right...)
Missing blank line after.
| return PhpCsFixer\Config::create() | ||
| ->setRiskyAllowed(true) | ||
| ->setRules([ | ||
| '@PHPUnit60Migration:risky' => true, |
There was a problem hiding this comment.
Can you take this opportunity to restore the alphabetical order? 😄
There was a problem hiding this comment.
well, it's not at the moment....done anyway
There was a problem hiding this comment.
Yeah, I saw that the order was out of whack. You could put it before the @Symfony rules, but never mind...
|
Well maybe the @ rules should go together, at the top.
…On Fri, 1 Jun 2018, 22:03 Teoh Han Hui, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In .php_cs.dist
<#1993 (comment)>:
> ;
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
+ ***@***.***:risky' => true,
Yeah, I saw that the order was out of whack. You could put it before the
@symfony rules, but never mind...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1993 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAmK8NwYEVBmIdziEuRACOgrC6iN5qtpks5t4awOgaJpZM4UWnCM>
.
|
| */ | ||
| public function testResolveOperationPathWithSubresource() | ||
| { | ||
| $this->expectException(\ApiPlatform\Core\Exception\InvalidArgumentException::class); |
There was a problem hiding this comment.
Should be imported instead of using the FQN. It's weird that PHP CS Fixer doesn't fix that automatically.
There was a problem hiding this comment.
Erg yeah....this is going to be annoying.
There was a problem hiding this comment.
Because PHP-CS-Fixer does not have such a fixer. 😆
There was a problem hiding this comment.
The closest thing is: https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/v2.12.0/src/Fixer/Import/FullyQualifiedStrictTypesFixer.php
but it only deals with existing imports. (Oh, and only for type hints...)
|
@teohhanhui done |
| @@ -1,5 +1,15 @@ | |||
| <?php | |||
|
|
|||
| /* | |||
There was a problem hiding this comment.
I don't like the idea of having this header block in a file like .php_cs.dist, but oh well...
| $finder = PhpCsFixer\Finder::create() | ||
| ->in(__DIR__) | ||
| ->exclude('tests/Fixtures/app/cache') | ||
| ->in([__DIR__.'/src', __DIR__.'/tests']) |
There was a problem hiding this comment.
@bendavies I thought you've reverted this. We do want to include files in bin and public too, for example.
Can you explain the rationale for this change?
There was a problem hiding this comment.
i did mean to, sorry. fixing.
| ->exclude('tests/Fixtures/app/cache') | ||
| ->in([__DIR__.'/src', __DIR__.'/tests']) | ||
| ->append([__FILE__]) | ||
| ->exclude(__DIR__.'/tests/Fixtures/app/cache') |
There was a problem hiding this comment.
Can you revert all the changes from this line and above? But we can keep the
declare(strict_types=1);of course.
There was a problem hiding this comment.
which bits exactly. it is ok now?
There was a problem hiding this comment.
I'll take care of the rest. 😄
|
Thanks @bendavies! 🎉 |
#1988 (comment)