Skip to content
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

Feature/upgrade sf6 and php8 #21

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
language: php

php:
- 5.6
- 7.0
- 7.1
- 7.2
- 8.2
- 8.3

cache:
directories:
Expand All @@ -33,5 +31,4 @@ branches:

matrix:
allow_failures:
- php: 7.1
- php: 7.2
- php: 8.3
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 5.0.0
Support Symfony 5+ and php 8.2

# 4.1.3
Make Configuration parser SF 5 compatible

Expand Down
23 changes: 11 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,20 @@
}
},
"require": {
"php": ">=7.4",
"guzzlehttp/guzzle": "^6.0",
"symfony/config": "^4.0 || ^5.0",
"symfony/dependency-injection": "^4.0 || ^5.0",
"symfony/http-kernel": "^5.0",
"symfony/event-dispatcher": "^5.0",
"symfony/console": "^5.0"
"php": ">=8.2",
"guzzlehttp/guzzle": "^7.0",
"symfony/config": "^5.0 || ^6.0 || ^7.0",
"symfony/dependency-injection": "^5.0 || ^6.0 || ^7.0",
"symfony/http-kernel": "^5.0 || ^6.0 || ^7.0",
"symfony/event-dispatcher": "^5.0 || ^6.0 || ^7.0",
"symfony/console": "^5.0 || ^6.0 || ^7.0"
},
"require-dev": {
"matthiasnoback/symfony-config-test": "^4.3",
"matthiasnoback/symfony-config-test": "^4.3 || ^5.0",
"phpmd/phpmd": "^2.6",
"phpunit/phpunit": "^8.5",
"phpunit/phpunit": "^9.6",
"sensiolabs/security-checker": "^v6.0.3",
"squizlabs/php_codesniffer": "^1.0",
"symfony/phpunit-bridge": "^3.0 || ^4.0 || ^5.0" ,
"mockery/mockery": "^1.6.4"
"squizlabs/php_codesniffer": "^3.0",
"symfony/phpunit-bridge": "^5.0 || ^6.0 || ^7.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

namespace Surfnet\MessageBirdApiClientBundle\Tests\Service;

use Mockery as m;
use Mockery\Matcher\MatcherAbstract;
use PHPUnit\Framework\TestCase;
use Psr\Log\LoggerInterface;
use Surfnet\MessageBirdApiClient\Messaging\Message;
Expand All @@ -32,11 +30,13 @@ public function testItReturnsSuccessfully()
{
$message = new Message('SURFnet', '31612345678', 'body');
$result = new SendMessageResult(SendMessageResult::STATUS_DELIVERED, []);
$libraryService = $this->createMock('Surfnet\MessageBirdApiClient\Messaging\MessagingService');
$libraryService->expects($this->once())
->method('send')
->with($message)
->willReturn($result);

$libraryService = m::mock('Surfnet\MessageBirdApiClient\Messaging\MessagingService')
->shouldReceive('send')->once()->with($message)->andReturn($result)
->getMock();
$logger = m::mock('Psr\Log\LoggerInterface');
$logger = $this->createMock('Psr\Log\LoggerInterface');

$service = new MessagingService($libraryService, $logger);

Expand Down Expand Up @@ -107,22 +107,4 @@ public function testItLogsInvalidAccessKeys()
$service->send($message);
}

/**
* @param string
* @return MatcherAbstract
*/
private function expectStringContains($contains)
{
return m::on(function ($string) use ($contains) {
return strpos($string, $contains) !== false;
});
}

protected function tearDown(): void
{
m::close();
parent::tearDown();
}


}