8000 Add Symfony 6.x support by klimov-paul · Pull Request #86 · yoanm/symfony-jsonrpc-http-server · GitHub
[go: up one dir, main page]

Skip to content

Add Symfony 6.x support #86

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

Closed
wants to merge 2 commits into from
Closed
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
20 changes: 14 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,33 @@ jobs:
max-parallel: 4
matrix:
php-version:
- '8.1' # Latest supported
- '8.2' # Latest supported
- '8.1'
- '8.0' # First php 8 version
- '7.4' # Latest php 7 version
- '7.3' # Lowest supported
symfony-version:
- '4.4' # Lowest LTS
- '5.4' # Latest LTS
- '6.0' # Latest LTS
exclude:
# Run all symfony version only on Lowest and Latest php versions, run it only one time for others
- php-version: '8.0'
symfony-version: '4.4'
- php-version: '7.4'
symfony-version: '5.4'
- php-version: '7.3'
symfony-version: '6.0'
- php-version: '7.4'
symfony-version: '6.0'
- php-version: '8.0'
symfony-version: '6.0'
steps:
- name: Check out code
uses: actions/checkout@v2

- name: Enable coverage
if: ${{ matrix.php-version == '8.1' }}
if: ${{ matrix.php-version == '8.2' }}
run: |
echo "COVERAGE_OUTPUT_STYLE=clover" >> $GITHUB_ENV
echo "COVERAGE_TYPE=xdebug" >> $GITHUB_ENV
Expand Down Expand Up @@ -135,10 +143,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Setup PHP 8.1
- name: Setup PHP 8.2
uses: shivammathur/setup-php@v2
with:
php-version: 8.1 # Latest supported
php-version: 8.2 # Latest supported
tools: composer
coverage: none
env:
Expand Down Expand Up @@ -203,13 +211,13 @@ jobs:
# - next Symfony minor version to manage with latest supported php version
matrix:
php-version:
- '8.2' # Current php dev version
- '8.3' # Current php dev version
symfony-version:
- '4.4' # Lowest LTS
- '5.4' # Latest LTS
include:
- symfony-version: '6.0' # Next symfony minor version to manage with latest supported PHP version
php-version: '8.1'
php-version: '8.2'

steps:
- name: Check out code
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG-3.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

* ✔️ Symfony 5.4

* 🧪 Set Symfony 6.0 for nightly
* ✔️ Symfony 6.0

### Chore

Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
"require": {
"php": "^7.3 || ^8.0",
"psr/container": "^1.0",
"symfony/config": "^4.4 || ^5.4",
"symfony/dependency-injection": "^4.4 || ^5.4",
8000 "symfony/config": "^4.4 || ^5.4 || ^6.0",
"symfony/dependency-injection": "^4.4 || ^5.4 || ^6.0",
"symfony/event-dispatcher": "^4.4 || ^5.4",
"symfony/event-dispatcher-contracts": "^1.0 || ^2.0",
"symfony/http-foundation": "^4.4 || ^5.4",
"symfony/http-kernel": "^4.4 || ^5.4",
"symfony/event-dispatcher-contracts": "^1.0 || ^2.0 || ^3.0",
"symfony/http-foundation": "^4.4 || ^5.4 || ^6.0",
"symfony/http-kernel": "^4.4 || ^5.4 || ^6.0",
"yoanm/jsonrpc-server-sdk": "^3.0"
},
"require-dev": {
Expand All @@ -46,8 +46,8 @@
"phpunit/phpunit": "^8.0 || ^9.0",
"matthiasnoback/symfony-dependency-injection-test": "^3.0 || ^4.0",
"matthiasnoback/symfony-config-test": "^3.0 || ^4.0",
"symfony/framework-bundle": "^4.4 || ^5.4",
"symfony/routing": "^4.4 || ^5.4",
"symfony/framework-bundle": "^4.4 || ^5.4 || ^6.0",
"symfony/routing": "^4.4 || ^5.4 || ^6.0",
"yoanm/php-unit-extended": "~1.0",
"phpspec/prophecy-phpunit": "^2.0",
"dvdoug/behat-code-coverage": "^5.0"
Expand Down
8 changes: 4 additions & 4 deletions features/demo_app/src/AbstractKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function registerBundles(): iterable
/**
* {@inheritdoc}
*/
public function getCacheDir()
public function getCacheDir(): string
{
// Use a specific cache for each kernels
if (null === $this->customCacheDir) {
Expand All @@ -44,15 +44,15 @@ public function getCacheDir()
/**
* {@inheritdoc}
*/
public function getLogDir()
public function getLogDir(): string
{
return $this->getProjectDir().'/var/log';
}

/**
* {@inheritdoc}
*/
public function getProjectDir()
public function getProjectDir(): string
{
return realpath(__DIR__.'/../');
}
Expand Down Expand Up @@ -86,7 +86,7 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa
*
* @return string The container class
*/
protected function getContainerClass()
protected function getContainerClass(): string
{
// In order to avoid collisions between kernels use a dedicated name
return parent::getContainerClass().Container::camelize($this->getConfigDirectoryName());
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/JsonRpcHttpServerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ private function checkMethodAwareServiceIdList(

if (null !== $class && !$class->implementsInterface(JsonRpcMethodAwareInterface::class)) {
throw new LogicException(sprintf(
'Service "%s" is taggued as JSON-RPC method aware but does not implement %s',
'Service "%s" is tagged as JSON-RPC method aware but does not implement %s',
$serviceId,
JsonRpcMethodAwareInterface::class
));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ protected function addJsonRpcMethodTag(Definition $definition, $methodName)
protected function createJsonRpcMethodDefinition($class = ConcreteJsonRpcMethod::class)
{
return (new Definition($class))
->setPrivate(false);
->setPublic(true);
}

protected function mockResolver()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public function testShouldThowAnExceptionIfMethodAwareServiceDoesNotImplementRig

$this->expectException(LogicException::class);
$this->expectExceptionMessage(sprintf(
'Service "%s" is taggued as JSON-RPC method aware but does not implement %s',
'Service "%s" is tagged as JSON-RPC method aware but does not implement %s',
$methodAwareServiceServiceId,
JsonRpcMethodAwareInterface::class
));
Expand Down
0