Skip to content

Commit

Permalink
CI Version
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhelias committed Mar 22, 2023
1 parent c233138 commit 7f69186
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read

jobs:

test:
Expand All @@ -29,27 +26,27 @@ jobs:
composer-flags: '--prefer-stable --prefer-lowest'
can-fail: false
# LTS with latest stable PHP
- php: 8.2
- php: latest
symfony: 5.4.*
coverage: 'none'
composer-flags: '--prefer-stable'
can-fail: false
# Active release
- php: 8.2
- php: latest
symfony: 6.2.*
coverage: pcov
composer-flags: '--prefer-stable'
can-fail: false
# Development release
- php: 8.3
- php: nightly
symfony: 6.3.*@dev
coverage: 'none'
composer-flags: ''
can-fail: true

steps:
- name: Checkout
uses: action/checkout@v3
uses: actions/checkout@v3
with:
fetch-depth: 2

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"symfony/framework-bundle": "^5.4 || ^6.0",
"symfony/http-foundation": "^5.4 || ^6.0",
"symfony/http-kernel": "^5.4 || ^6.0",
"symfony/service-contracts": "^3.2"
"symfony/service-contracts": "^2.0 || ^3.2"
},
"require-dev": {
"doctrine/doctrine-bundle": "^2.8",
Expand Down
9 changes: 9 additions & 0 deletions tests/Fixtures/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
namespace Odandb\MonitoringMetricsBundle\Tests\Fixtures;

use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
use Doctrine\ORM\Configuration;
use Odandb\MonitoringMetricsBundle\MonitoringMetricsBundle;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Kernel as BaseKernel;

class Kernel extends BaseKernel
Expand All @@ -21,6 +23,13 @@ public function registerBundles(): iterable
];
}

public function prepareContainer(ContainerBuilder $container): void
{
parent::prepareContainer($container);

$container->setParameter('enable_lazy_ghost_objects', method_exists(Configuration::class, 'isLazyGhostObjectEnabled'));
}

public function registerContainerConfiguration(LoaderInterface $loader): void
{
$loader->load(__DIR__ . '/config.yaml');
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ doctrine:

orm:
auto_generate_proxy_classes: true
enable_lazy_ghost_objects: true
enable_lazy_ghost_objects: '%enable_lazy_ghost_objects%'
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
auto_mapping: true
mappings:
Expand Down

0 comments on commit 7f69186

Please sign in to comment.