Skip to content

Commit 98728f7

Browse files
committed
Regression test
1 parent abe5fa9 commit 98728f7

File tree

7 files changed

+71
-0
lines changed

7 files changed

+71
-0
lines changed

.github/workflows/other-tests.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,13 @@ jobs:
270270
cd e2e/bug7308
271271
composer install
272272
../../phpstan analyse -c app/phpstan.neon
273+
- php-version: 8.1
274+
ini-values: memory_limit=256M
275+
operating-system: ubuntu-latest
276+
script: |
277+
cd e2e/bug3634
278+
composer install
279+
../../phpstan analyse -c app/phpstan.neon
273280
steps:
274281
- name: "Checkout"
275282
uses: actions/checkout@v3

e2e/bug3634/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/vendor

e2e/bug3634/app/phpstan.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
parameters:
2+
level: 5
3+
paths:
4+
- src/

e2e/bug3634/app/src/MyApp.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
class MyApp {
4+
public function __construct(HttpResponse $response) {
5+
$response->deleteCookie('foo');
6+
}
7+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
class HttpResponse
4+
{
5+
/**
6+
* @param string $name The name of the cookie
7+
* @param string|null $value the value of the cookie, a empty value to delete the cookie
8+
* @param array $options Different cookie Options. Supported keys are:
9+
* "expires" int|string|\DateTimeInterface The time the cookie expires
10+
* "path" string The path on the server in which the cookie will be available on
11+
* "domain" string|null The domain that the cookie is available to
12+
* "secure" bool Whether the cookie should only be transmitted over a secure HTTPS connection from the client
13+
* "httponly" bool Whether the cookie will be made accessible only through the HTTP protocol
14+
* "samesite" string|null Whether the cookie will be available for cross-site requests
15+
* "raw" bool Whether the cookie value should be sent with no url encoding
16+
*
17+
* @throws \InvalidArgumentException
18+
*/
19+
public function sendCookie($name, $value, array $options = [])
20+
{
21+
}
22+
23+
public function deleteCookie(string $name)
24+
{
25+
$this->sendCookie($name, '');
26+
}
27+
}

e2e/bug3634/composer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"autoload": {
3+
"classmap": [
4+
"composer-classes/"
5+
]
6+
}
7+
}

e2e/bug3634/composer.lock

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

0 commit comments

Comments
 (0)