Skip to content
Merged
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
24 changes: 6 additions & 18 deletions .github/workflows/test-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,10 @@ jobs:
fail-fast: false
matrix:
include:
- php-version: '7.2'
- php-version: '8.2'
dependency-versions: 'lowest'
tools: 'composer:v2'

- php-version: '7.4'
dependency-versions: 'highest'
tools: 'composer:v2'

- php-version: '8.0'
dependency-versions: 'highest'
tools: 'composer:v2'

- php-version: '8.1'
dependency-versions: 'highest'
tools: 'composer:v2'

- php-version: '8.2'
dependency-versions: 'highest'
tools: 'composer:v2'
Expand All @@ -51,7 +39,7 @@ jobs:

steps:
- name: Checkout project
uses: actions/checkout@v2
uses: actions/checkout@v6

- name: Install and configure PHP
uses: shivammathur/setup-php@v2
Expand All @@ -64,7 +52,7 @@ jobs:
run: composer config minimum-stability ${{ matrix.composer-stability }}

- name: Install composer dependencies
uses: ramsey/composer-install@v1
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{matrix.dependency-versions}}

Expand All @@ -77,16 +65,16 @@ jobs:

steps:
- name: Checkout project
uses: actions/checkout@v2
uses: actions/checkout@v6

- name: Install and configure PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.4
tools: 'composer:v2'

- name: Install composer dependencies
uses: ramsey/composer-install@v1
uses: ramsey/composer-install@v3
with:
dependency-versions: 'highest'

Expand Down
2 changes: 1 addition & 1 deletion Command/BuildCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function __construct(BuildRegistry $buildRegistry, ContainerInterface $co
$this->question = new QuestionHelper();
}

public function configure()
public function configure(): void
Copy link
Member Author

@alexander-schranz alexander-schranz Dec 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would break sulu 2.6 and older versions, so we need tag a new 0.6 version.

{
$this->setName('massive:build');
$this->setDescription('Execute build or build targets');
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/MassiveBuildExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public function load(array $configs, ContainerBuilder $container): void
$config = $this->processConfiguration($configuration, $configs);
$container->setParameter('massive_build.command.build.class', $config['command_class']);

$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
$loader->load('services.xml');
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
$loader->load('services.yaml');

foreach ($config['targets'] as $target => $config) {
$dependencies = \array_keys($config['dependencies']);
Expand Down
22 changes: 0 additions & 22 deletions Resources/config/services.xml

This file was deleted.

14 changes: 14 additions & 0 deletions Resources/config/services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
parameters:
massive_build.build.registry.class: Massive\Bundle\BuildBundle\Build\BuildRegistry

services:
massive_build.build.registry:
class: '%massive_build.build.registry.class%'

massive_build.command.build:
class: '%massive_build.command.build.class%'
arguments:
- '@massive_build.build.registry'
- '@service_container'
tags:
- { name: 'console.command' }
2 changes: 1 addition & 1 deletion Tests/Build/BuildRegistryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Massive\Bundle\BuildBundle\Build\BuilderInterface;
use Massive\Bundle\BuildBundle\Build\BuildRegistry;
use Massive\Bundle\BuildBundle\Tests\BaseTestCase;
use Massive\Bundle\BuildBundle\Tests\ProphecyTrait;
use Prophecy\PhpUnit\ProphecyTrait;

class BuildRegistryTest extends BaseTestCase
{
Expand Down
2 changes: 1 addition & 1 deletion Tests/Build/BuilderContextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use Massive\Bundle\BuildBundle\Build\BuilderContext;
use Massive\Bundle\BuildBundle\Tests\BaseTestCase;
use Massive\Bundle\BuildBundle\Tests\ProphecyTrait;
use Prophecy\PhpUnit\ProphecyTrait;

class BuilderContextTest extends BaseTestCase
{
Expand Down
2 changes: 1 addition & 1 deletion Tests/Command/BuildCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
use Massive\Bundle\BuildBundle\Command\BuildCommand;
use Massive\Bundle\BuildBundle\ContainerAwareInterface;
use Massive\Bundle\BuildBundle\Tests\BaseTestCase;
use Massive\Bundle\BuildBundle\Tests\ProphecyTrait;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Symfony\Component\Console\Tester\CommandTester;

class BuildCommandTest extends BaseTestCase
Expand Down
27 changes: 11 additions & 16 deletions Tests/Console/MassiveOutputFormatterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@

use Massive\Bundle\BuildBundle\Console\MassiveOutputFormatter;
use Massive\Bundle\BuildBundle\Tests\BaseTestCase;
use PHPUnit\Framework\Attributes\DataProvider;

class MassiveOutputFormatterTest extends BaseTestCase
{
/**
* @param string $message
* @param int $indent
* @param string $expected
*
* @dataProvider getDecorationDataProvider
*/
#[DataProvider('getDecorationDataProvider')]
public function testThatOutputWillBeDecorated($message, $indent, $expected)
{
$formatter = new MassiveOutputFormatter(true);
Expand All @@ -31,21 +31,18 @@ public function testThatOutputWillBeDecorated($message, $indent, $expected)
$this->assertEquals($expected, $result);
}

public function getDecorationDataProvider()
public static function getDecorationDataProvider()
{
return [
['Some string', 0, 'Some string'],
['Some string', 1, ' Some string'],
['Some string', 2, ' Some string'],
];
yield ['Some string', 0, 'Some string'];
yield ['Some string', 1, ' Some string'];
yield ['Some string', 2, ' Some string'];
}

/**
* @param string $message
* @param int $indent
*
* @dataProvider getNonDecorationDataProvider
*/
#[DataProvider('getNonDecorationDataProvider')]
public function testThatOutputWillNotBeDecorated($message, $indent)
{
$formatter = new MassiveOutputFormatter(false);
Expand All @@ -54,12 +51,10 @@ public function testThatOutputWillNotBeDecorated($message, $indent)
$this->assertEquals($message, $result);
}

public function getNonDecorationDataProvider()
public static function getNonDecorationDataProvider()
{
return [
['Some string', 0],
['Some string', 1],
['Some string', 2],
];
yield ['Some string', 0];
yield ['Some string', 1];
yield ['Some string', 2];
}
}
23 changes: 0 additions & 23 deletions Tests/ProphecyTrait.php

This file was deleted.

17 changes: 9 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@
],
"license": "MIT",
"require": {
"php": ">=7.2.0",
"symfony/console": "^4.3 || ^5.0 || ^6.0 || ^7.0",
"symfony/config": "^4.3 || ^5.0 || ^6.0 || ^7.0",
"symfony/dependency-injection": "^4.3 || ^5.0 || ^6.0 || ^7.0",
"symfony/framework-bundle": "^4.3 || ^5.0 || ^6.0 || ^7.0"
"php": ">=8.2",
"symfony/console": "^5.4 || ^6.0 || ^7.0 || ^8.0",
"symfony/config": "^5.4 || ^6.0 || ^7.0 || ^8.0",
"symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0 || ^8.0",
"symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^8.5",
"matthiasnoback/symfony-dependency-injection-test": "^4.0 || ^5.0",
"phpspec/prophecy": "^1.14"
"phpunit/phpunit": "^11.0 || ^12.0",
"matthiasnoback/symfony-dependency-injection-test": "^6.2",
"phpspec/prophecy": "^1.14",
"phpspec/prophecy-phpunit": "^2.0"
},
"autoload": {
"psr-4": {"Massive\\Bundle\\BuildBundle\\": "."},
Expand Down
23 changes: 13 additions & 10 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="./vendor/autoload.php" colors="true">

<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
>
<testsuites>
<testsuite name="">
<directory>./Tests</directory>
<testsuite name="default">
<directory>Tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<exclude>
<directory>./</directory>
</exclude>
</whitelist>
</filter>
<coverage>
<exclude>
<directory>.</directory>
</exclude>
</coverage>
</phpunit>