Skip to content

Commit

Permalink
Add Symfony 6 support (#33)
Browse files Browse the repository at this point in the history
* Drop symfony 4 support, add symfony 6 support
* Only support php:^8.1
* Add missing typehints
  • Loading branch information
janlam7 committed Jun 6, 2024
1 parent 6ac755f commit 3eec9a7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
php-versions: ['7.3', '7.4', '8.0']
php-versions: ['8.1','8.2','8.3']
name: PHP ${{ matrix.php-versions }}
steps:
- uses: actions/checkout@v2
Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
"license": "MIT",
"minimum-stability": "dev",
"require": {
"php": ">=7.3",
"php": "^8.1",
"doctrine/annotations": "^1.3",
"symfony/config": "^4.4|^5.0",
"symfony/dependency-injection": "^4.4|^5.0",
"symfony/framework-bundle": "^4.4|^5.0",
"symfony/http-kernel": "^4.4|^5.0",
"symfony/routing": "^4.4|^5.0",
"symfony/translation": "^4.4|^5.0",
"symfony/yaml": "^4.4|^5.0"
"symfony/config": "^5.4|^6.0",
"symfony/dependency-injection": "^5.4|^6.0",
"symfony/framework-bundle": "^5.4|^6.0",
"symfony/http-kernel": "^5.4|^6.0",
"symfony/routing": "^5.4|^6.0",
"symfony/translation": "^5.4|^6.0",
"symfony/yaml": "^5.4|^6.0"
},
"require-dev": {
"hostnet/phpcs-tool": "^9.1.0",
"phpunit/phpunit": "^9.5.6",
"symfony/finder": "^5.0"
"symfony/finder": "^5.4|^6.0"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion src/Loader/EnumLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct(YamlFileLoader $yml_loader)
/**
* {@inheritdoc}
*/
public function load($resource, $locale, $domain = 'messages')
public function load($resource, $locale, $domain = 'messages'): MessageCatalogue
{
if (!class_exists($domain)) {
throw new \RuntimeException(sprintf("Could not load constants for a class '%s'.", $domain));
Expand Down
6 changes: 3 additions & 3 deletions test/Functional/Fixtures/TestKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class TestKernel extends Kernel
/**
* {@inheritdoc}
*/
public function registerBundles()
public function registerBundles(): iterable
{
return [
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
Expand All @@ -29,12 +29,12 @@ public function registerContainerConfiguration(LoaderInterface $loader)
$loader->load(__DIR__ . '/config/config.yml');
}

public function getCacheDir()
public function getCacheDir(): string
{
return dirname(__DIR__) . '/../../var/cache';
}

public function getLogDir()
public function getLogDir(): string
{
return dirname(__DIR__) . '/../../var/logs';
}
Expand Down

0 comments on commit 3eec9a7

Please sign in to comment.