Skip to content

Commit

Permalink
Require Symfony 6.4+
Browse files Browse the repository at this point in the history
Add support for Symfony 7
Require DBAL 4+ from read-model update
  • Loading branch information
dave-redfern committed Mar 3, 2024
1 parent a46ee77 commit a99bd1c
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 53 deletions.
46 changes: 30 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,38 @@
name: tests

on:
push:

create:
tags:
- '*'

push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
create:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
testsuite:
name: Unittests
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
php-version: ['8.1', '8.2', '8.3']

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1

steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}

- name: Validate composer.json and composer.lock
run: composer validate
- name: Validate composer.json
run: composer validate

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Composer install
run: composer install --prefer-dist --no-progress

- name: Run test suite
run: vendor/bin/phpunit
- name: Run PHPUnit
run: vendor/bin/phpunit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ Network Trash Folder
Temporary Items
.apdisk

/.phpunit.cache
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Change Log
==========

2024-03-02
----------

* require Symfony 6.4+
* required doctrine/dbal 4+
* add support for Symfony 7

2023-01-19
----------

Expand Down
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
],
"require": {
"php": ">=8.1",
"somnambulist/read-models": "^4.0",
"symfony/framework-bundle": "^6.0"
"somnambulist/read-models": "^4.1",
"symfony/framework-bundle": "^6.4|^7.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"doctrine/doctrine-bundle": "^2.7",
"somnambulist/domain": "^4.6",
"symfony/dotenv": "^6.0",
"symfony/messenger": "^6.0",
"symfony/stopwatch": "^6.0",
"symfony/var-dumper": "^6.0",
"symfony/yaml": "^6.0"
"phpunit/phpunit": "^10.5",
"doctrine/doctrine-bundle": "^2.11",
"somnambulist/domain": "^6.0",
"symfony/dotenv": "^6.4",
"symfony/messenger": "^6.4",
"symfony/stopwatch": "^6.4",
"symfony/var-dumper": "^6.4",
"symfony/yaml": "^6.4"
},
"autoload": {
"psr-4": {
Expand Down
48 changes: 24 additions & 24 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" backupGlobals="false" colors="true" bootstrap="vendor/autoload.php">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src/</directory>
</include>
<exclude>
<directory>bin</directory>
<directory>tests</directory>
</exclude>
</coverage>
<php>
<ini name="error_reporting" value="-1"/>
<ini name="memory_limit" value="256M"/>
<server name="APP_ENV" value="test" force="true"/>
<server name="KERNEL_CLASS" value="Somnambulist\Bundles\ReadModelsBundle\Tests\Support\Kernel"/>
<server name="SHELL_VERBOSITY" value="-1"/>
<server name="SYMFONY_PHPUNIT_REMOVE" value=""/>
<server name="SYMFONY_PHPUNIT_VERSION" value="9"/>
</php>
<testsuites>
<testsuite name="Project Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
backupGlobals="false" colors="true" bootstrap="vendor/autoload.php" cacheDirectory=".phpunit.cache">
<php>
<ini name="error_reporting" value="-1"/>
<ini name="memory_limit" value="256M"/>
<server name="APP_ENV" value="test" force="true"/>
<server name="KERNEL_CLASS" value="Somnambulist\Bundles\ReadModelsBundle\Tests\Support\Kernel"/>
<server name="SHELL_VERBOSITY" value="-1"/>
<server name="SYMFONY_PHPUNIT_REMOVE" value=""/>
</php>
<testsuites>
<testsuite name="Project Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">src/</directory>
</include>
<exclude>
<directory>bin</directory>
<directory>tests</directory>
</exclude>
</source>
</phpunit>
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('somnambulist_read_models');
$rootNode = $treeBuilder->getRootNode();
Expand Down
2 changes: 1 addition & 1 deletion src/SomnambulistReadModelsBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class SomnambulistReadModelsBundle extends Bundle
{
public function boot()
public function boot(): void
{
$this->container->get(Manager::class);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Support/Stubs/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
app.type_casters.id:
class: Somnambulist\Components\AttributeModel\TypeCasters\SimpleValueObjectCaster
arguments:
$class: 'Somnambulist\Components\Domain\Entities\Types\Identity\Id'
$class: 'Somnambulist\Components\Models\Types\Identity\Id'
$types:
-
uuid_id
Expand Down

0 comments on commit a99bd1c

Please sign in to comment.