-
Notifications
You must be signed in to change notification settings - Fork 3
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
add support for PHP 8 #24
Changes from 7 commits
3500159
eaa9783
8964a64
eec7546
3b4c8f9
595b077
a88903e
d9f5cc5
e4ab590
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,9 @@ jobs: | |
- ubuntu-latest | ||
php-version: | ||
- 7.4 | ||
- 8.0 | ||
- 8.1 | ||
- 8.2 | ||
|
||
steps: | ||
- name: Checkout | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,9 @@ jobs: | |
- ubuntu-latest | ||
php-version: | ||
- 7.4 | ||
- 8.0 | ||
- 8.1 | ||
- 8.2 | ||
|
||
steps: | ||
- name: Checkout | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ final class AnonymizerTest extends TestCase | |
/** @var ObserverInterface|MockObject */ | ||
private $observerMock; | ||
|
||
public const TMP_FILE_PATH = "/tmp/testData"; | ||
|
||
public function setUp(): void | ||
{ | ||
|
@@ -286,8 +287,12 @@ public function testRun(): void | |
|
||
private function makeLineStream(array $lines) | ||
{ | ||
$fp = fopen('data://text/plain;base64,' . base64_encode(implode("\n", $lines)), 'ab+'); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this code is problematic for the input stream and it works well. I would suggest to:
|
||
$fp = fopen(self::TMP_FILE_PATH . (string)rand(0, 999), 'w+'); | ||
fwrite($fp, implode("\n", $lines)); | ||
|
||
rewind($fp); | ||
|
||
return $fp; | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you think that we should remove the platform from config (line 19), so we won't have any hard restriction on version number?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might want to remove that "php": "7.4" platform config.
If we don't run composer as a container (that runs on various php version, usually latest), it's not needed anymore.
But I'm not sure if it bothers us if we keep it at minimum. So I think we don't need to change it now.