-
Notifications
You must be signed in to change notification settings - Fork 10
Add support for symfony 7 and doctrine collections 2 #49
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
Merged
wachterjohannes
merged 9 commits into
php-task:master
from
alexander-schranz:feature/deps-updates
Jul 16, 2024
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9b696cb
Add support for symfony 7 and doctrine collections 2
alexander-schranz 71d10d1
Update tests with prophecy
alexander-schranz fb39ced
Fix failing test cases
alexander-schranz 681f50e
Update CI script
alexander-schranz 55ca8ff
Fix some code style
alexander-schranz 651553b
Add PHP 8.4 to test CI
alexander-schranz ff423c1
CI Changes
alexander-schranz 1e13527
Update composer deps
alexander-schranz 56c29a6
Fix lowest deps
alexander-schranz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,3 +4,4 @@ composer.phar | |
|
|
||
| *.iml | ||
| .idea | ||
| .phpunit.cache | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
|
|
||
| <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd" | ||
| backupGlobals="false" | ||
| colors="true" | ||
| bootstrap="vendor/autoload.php"> | ||
| <php> | ||
| <ini name="error_reporting" value="-1" /> | ||
| <ini name="date.timezone" value="UTC" /> | ||
| </php> | ||
|
|
||
| <testsuites> | ||
| <testsuite name="php-task Library Test Suite"> | ||
| <directory>./tests/</directory> | ||
| </testsuite> | ||
| </testsuites> | ||
|
|
||
| <filter> | ||
| <whitelist> | ||
| <directory>./</directory> | ||
| <exclude> | ||
| <directory>./vendor</directory> | ||
| <directory>./tests</directory> | ||
| </exclude> | ||
| </whitelist> | ||
| </filter> | ||
| </phpunit> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,7 @@ | |
|
|
||
| use PHPUnit\Framework\TestCase; | ||
| use Prophecy\Argument; | ||
| use Prophecy\PhpUnit\ProphecyTrait; | ||
| use Symfony\Component\EventDispatcher\EventDispatcherInterface; | ||
| use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy; | ||
| use Task\Event\Events; | ||
|
|
@@ -33,6 +34,8 @@ | |
| */ | ||
| class TaskRunnerTest extends TestCase | ||
| { | ||
| use ProphecyTrait; | ||
|
|
||
| /** | ||
| * @var TaskExecutionRepositoryInterface | ||
| */ | ||
|
|
@@ -81,8 +84,8 @@ public function testRunTasks() | |
| $this->createTaskExecution($task, new \DateTime(), 'Test 2')->setStatus(TaskStatus::PLANNED), | ||
| ]; | ||
|
|
||
| $this->taskExecutionRepository->save($executions[0])->willReturnArgument(0)->shouldBeCalledTimes(2); | ||
| $this->taskExecutionRepository->save($executions[1])->willReturnArgument(0)->shouldBeCalledTimes(2); | ||
| $this->taskExecutionRepository->save($executions[0])->willReturnArgument(0)->shouldBeCalledTimes(3); | ||
| $this->taskExecutionRepository->save($executions[1])->willReturnArgument(0)->shouldBeCalledTimes(3); | ||
|
Comment on lines
+87
to
+88
Member
Author
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. CI failing since: #47 |
||
|
|
||
| $this->executor->execute($executions[0])->willReturn(strrev('Test 1')); | ||
| $this->executor->execute($executions[1])->willReturn(strrev('Test 2')); | ||
|
|
@@ -115,8 +118,8 @@ public function testRunTasksFailed() | |
| $this->createTaskExecution($task, new \DateTime(), 'Test 2')->setStatus(TaskStatus::PLANNED), | ||
| ]; | ||
|
|
||
| $this->taskExecutionRepository->save($executions[0])->willReturnArgument(0)->shouldBeCalledTimes(2); | ||
| $this->taskExecutionRepository->save($executions[1])->willReturnArgument(0)->shouldBeCalledTimes(2); | ||
| $this->taskExecutionRepository->save($executions[0])->willReturnArgument(0)->shouldBeCalledTimes(3); | ||
| $this->taskExecutionRepository->save($executions[1])->willReturnArgument(0)->shouldBeCalledTimes(3); | ||
|
Comment on lines
+121
to
+122
Member
Author
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. CI failing since: #47 |
||
|
|
||
| $this->executor->execute($executions[0])->willThrow(new \Exception()); | ||
| $this->executor->execute($executions[1])->willReturn(strrev('Test 2')); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
can be removed as soon as prophecy supports 8.4 officially: https://github.com/phpspec/prophecy/blob/f9e07be0992e7bf1cad210829055b99318df142f/composer.json#L21 but mostly it takes some time.