diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index a3e48b9..0dbfc87 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -17,6 +17,7 @@ jobs: - "8.1" - "8.2" - "8.3" + - "8.4" dependencies: - "lowest" - "highest" diff --git a/composer.json b/composer.json index ddef3e9..7964507 100644 --- a/composer.json +++ b/composer.json @@ -2,18 +2,18 @@ "name": "magento/composer", "description": "Magento composer library helps to instantiate Composer application and run composer commands.", "type": "library", - "version": "1.10.0", + "version": "1.10.1-beta1", "license": [ "OSL-3.0", "AFL-3.0" ], "require": { - "php": "~7.4.0||~8.1.0||~8.2.0||~8.3.0", - "composer/composer": "^2.0", + "php": "~7.4.0||~8.1.0||~8.2.0||~8.3.0||~8.4.0", + "composer/composer": "^2.1.13", "symfony/console": "~4.4.0||~5.4.0||~6.4.0" }, "require-dev": { - "phpunit/phpunit": "^9" + "phpunit/phpunit": "^9.5.10 || ^10" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index a6c40a9..dc7c76e 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,27 +1,23 @@ - + bootstrap="vendor/autoload.php"> - + - ./tests/ - - - + + ./ - - ./tests - - - + + + ./tests + + diff --git a/src/MagentoComposerApplication.php b/src/MagentoComposerApplication.php index ef9ce98..4e6defc 100644 --- a/src/MagentoComposerApplication.php +++ b/src/MagentoComposerApplication.php @@ -65,9 +65,9 @@ class MagentoComposerApplication public function __construct( $pathToComposerHome, $pathToComposerJson, - Application $consoleApplication = null, - ConsoleArrayInputFactory $consoleArrayInputFactory = null, - BufferedOutput $consoleOutput = null + ?Application $consoleApplication = null, + ?ConsoleArrayInputFactory $consoleArrayInputFactory = null, + ?BufferedOutput $consoleOutput = null ) { $this->consoleApplication = $consoleApplication ? $consoleApplication : new Application(); $this->consoleArrayInputFactory = $consoleArrayInputFactory ? $consoleArrayInputFactory diff --git a/tests/Composer/InfoCommandTest.php b/tests/Composer/InfoCommandTest.php index d5e664c..3cf7999 100644 --- a/tests/Composer/InfoCommandTest.php +++ b/tests/Composer/InfoCommandTest.php @@ -74,7 +74,7 @@ public function testRunInstalled() * * @return array */ - public function getCommandOutputDataProvider() + public static function getCommandOutputDataProvider() { return [ 'Package not installed' => [ diff --git a/tests/Composer/MagentoComposerApplicationTest.php b/tests/Composer/MagentoComposerApplicationTest.php index 113a1ff..742856c 100644 --- a/tests/Composer/MagentoComposerApplicationTest.php +++ b/tests/Composer/MagentoComposerApplicationTest.php @@ -34,7 +34,8 @@ class MagentoComposerApplicationTest extends \PHPUnit\Framework\TestCase protected function setUp(): void { - $this->composerApplication = $this->createMock(\Composer\Console\Application::class); + $this->composerApplication = $this->getMockBuilder('Composer\Console\Application') + ->getMock(); $this->inputFactory = $this->createMock(\Magento\Composer\ConsoleArrayInputFactory::class); $this->consoleOutput = $this->createMock(\Symfony\Component\Console\Output\BufferedOutput::class);