Skip to content

Commit

Permalink
Bump minimum PHP version to 8.1 and Symfony to 5.4 (#39)
Browse files Browse the repository at this point in the history
* Bump minimum PHP version to 8.1 and Symfony to 5.4
* Use PHP attribute to define Symfony console command
  • Loading branch information
benr77 authored Dec 13, 2024
1 parent 316b16e commit 41e4cb1
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,10 @@ jobs:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest, windows-latest ]
php: [ '7.4', '8.0', '8.1', '8.2', '8.3' ]
symfony: [ '4.4.*', '5.4.*', '6.4.*', '7.1.*' ]
php: [ '8.1', '8.2', '8.3', '8.4' ]
symfony: [ '5.4.*', '6.4.*', '7.2.*' ]
exclude:
- { php: '7.4', symfony: '6.4.*' }
- { php: '8.0', symfony: '6.4.*' }
- { php: '7.4', symfony: '7.1.*' }
- { php: '8.0', symfony: '7.1.*' }
- { php: '8.1', symfony: '7.1.*' }
- { php: '8.1', symfony: '7.2.*' }

steps:
- name: Checkout
Expand All @@ -49,6 +45,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: latest
- uses: ramsey/composer-install@v3
- run: vendor/bin/ecs

Expand All @@ -57,5 +56,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: latest
- uses: ramsey/composer-install@v3
- run: vendor/bin/phpstan
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
"issues": "https://github.com/headsnet/domain-event-bundle/issues"
},
"require": {
"php": "^7.4 || ^8.0.2 || ^8.1",
"php": "^8.1",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.0 || ^2.0",
"doctrine/doctrine-bundle": "^2.0",
"ramsey/uuid-doctrine": "^1.5",
"symfony/event-dispatcher": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/lock": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/messenger": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/property-access": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/serializer": "^4.4 || ^5.0 || ^6.0 || ^7.0"
"symfony/event-dispatcher": "^5.4 || ^6.4 || ^7.0",
"symfony/framework-bundle": "^5.4 || ^6.4 || ^7.0",
"symfony/lock": "^5.4 || ^6.4 || ^7.0",
"symfony/messenger": "^5.4 || ^6.4 || ^7.0",
"symfony/property-access": "^5.4 || ^6.4 || ^7.0",
"symfony/serializer": "^5.4 || ^6.4 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
Expand Down
10 changes: 5 additions & 5 deletions src/Console/EventNameCheckCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
use Doctrine\Common\Collections\Criteria;
use Doctrine\ORM\EntityManagerInterface;
use Headsnet\DomainEventsBundle\Domain\Model\StoredEvent;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;

#[AsCommand(
name: 'headsnet:domain-events:name-check',
description: 'Check and/or update legacy event class names stored in the database.'
)]
final class EventNameCheckCommand extends Command
{
/**
* @var string
*/
protected static $defaultDescription = 'Check and/or update legacy event class names stored in the database.';

private EntityManagerInterface $em;

/**
Expand Down
1 change: 0 additions & 1 deletion src/Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
class="Headsnet\DomainEventsBundle\Console\EventNameCheckCommand">
<argument type="service" id="doctrine.orm.default_entity_manager"/>
<argument>%headsnet_domain_events.legacy_map%</argument>
<tag name="console.command" command="headsnet:domain-events:name-check"/>
</service>

</services>
Expand Down

0 comments on commit 41e4cb1

Please sign in to comment.