-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update prefixes in function document #111
Comments
That makes sense. Please include an example |
I noticed PHP tags ( |
I don't know what the name of the package you're referring to is. I need to recreate this if I am to fix it.
File and line number would be hugely helpful here. |
@BrianHenryIE this is line: https://github.com/stripe/stripe-php/blob/dbcb2820703dd36f6375c7b3c5bf696bd0cff260/lib/Payout.php#L107 |
I just wrote a test to try to address this but it is behaving as desired for me /**
* Returns a list of existing payouts sent to third-party bank accounts or payouts
* that Stripe sent to you. The payouts return in sorted order, with the most
* recently created payouts appearing first.
*
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Strauss\Issue111\Stripe\Exception\ApiErrorException if the request fails
*
* @return \Strauss\Issue111\Stripe\Collection<\Stripe\Payout> of ApiResources
*/
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, \Strauss\Issue111\Stripe\Collection::class, $params, $opts);
} Is this maybe a case of PhpStorm's rendering of the PhpDoc hiding the full namespace? Test: <?php
/**
* Should prefix modified classnames in phpdoc
*
* @see https://github.com/BrianHenryIE/strauss/pull/111
*/
namespace BrianHenryIE\Strauss\Tests\Issues;
use BrianHenryIE\Strauss\Tests\Integration\Util\IntegrationTestCase;
/**
* @package BrianHenryIE\Strauss\Tests\Issues
* @coversNothing
*/
class StraussIssue111Test extends IntegrationTestCase
{
public function test_phpdoc()
{
$composerJsonString = <<<'EOD'
{
"name": "strauss/issue111",
"require": {
"stripe/stripe-php": "16.1.0"
},
"extra": {
"strauss": {
"namespace_prefix": "Strauss\\Issue111\\"
}
}
}
EOD;
chdir($this->testsWorkingDir);
file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString);
exec('composer install');
$this->runStrauss();
$php_string = file_get_contents($this->testsWorkingDir . '/vendor-prefixed/stripe/stripe-php/lib/Payout.php');
self::assertStringNotContainsString('@throws \Stripe\Exception\ApiErrorException', $php_string);
self::assertStringContainsString('@throws \Strauss\Issue111\Stripe\Exception\ApiErrorException', $php_string);
}
} |
Fixed in v0.20.0 |
@BrianHenryIE thank you |
I found that the function document does not update which creates a false flag with tools like
PHPStan
. I expect it to auto-update@param
and@return
in the function document.The text was updated successfully, but these errors were encountered: