Skip to content

Commit

Permalink
Merge branch 'wikimedia:master' into bugfix/218
Browse files Browse the repository at this point in the history
  • Loading branch information
raileanunalexandru committed Sep 6, 2024
2 parents f9eb290 + ab7cf5e commit 554e0b4
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 26 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ jobs:
fail-fast: false
matrix:
include:
# Includes php7.1-8.0, composer 2, php-xdebug, and more
# https://github.com/actions/virtual-environments/blob/ubuntu18/20210318.0/images/linux/Ubuntu1804-README.md#php
- os: ubuntu-18.04
php: "7.2"
- os: ubuntu-18.04
php: "7.3"
# Includes php7.4-8.x, composer 2, php-xdebug, and more
# https://github.com/actions/virtual-environments/blob/ubuntu20/20210318.0/images/linux/Ubuntu2004-README.md#php
- os: ubuntu-20.04
Expand All @@ -24,6 +18,8 @@ jobs:
php: "8.0"
- os: ubuntu-20.04
php: "8.1"
- os: ubuntu-20.04
php: "8.2"

name: Test PHP ${{ matrix.php }}
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -61,19 +57,23 @@ jobs:
run: composer update --no-interaction --no-progress --ansi

- run: composer test
- run: composer phan

- name: composer phan
# Phan fails on PHP 8.2 due to warnings; waiting on upstream releases to fix
if: ${{ matrix.php < 8.2 }}
run: composer phan

ocular-push:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
if: ${{ success() }} && github.repository == 'wikimedia/composer-merge-plugin'
needs: [run]

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

- name: Use PHP 7.2
run: sudo update-alternatives --set php /usr/bin/php7.2
- name: Use PHP 7.4
run: sudo update-alternatives --set php /usr/bin/php7.4

- name: Install dependencies
run: composer install --prefer-dist --no-progress
Expand Down
20 changes: 10 additions & 10 deletions .phan/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
$cfg = require __DIR__ . '/../vendor/mediawiki/mediawiki-phan-config/src/config.php';

$cfg['directory_list'] = array_merge(
$cfg['directory_list'],
[
'vendor/composer/composer/src/Composer/',
'vendor/composer/semver/src/',
$cfg['directory_list'],
[
'vendor/composer/composer/src/Composer/',
'vendor/composer/semver/src/',

]
]
);

$cfg['exclude_analysis_directory_list'] = array_merge(
$cfg['exclude_analysis_directory_list'],
[
'vendor/composer/composer/src/Composer/',
'vendor/composer/semver/src/',
]
$cfg['exclude_analysis_directory_list'],
[
'vendor/composer/composer/src/Composer/',
'vendor/composer/semver/src/',
]
);

return $cfg;
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ project]. We accept code and documentation contributions via Pull Requests on
GitHub as well.

- [PSR-2 Coding Standard][] is used by the project. The included test
configuration uses [PHP Code Sniffer][] to validate the conventions.
configuration uses [PHP_CodeSniffer][] to validate the conventions.
- Tests are encouraged. Our test coverage isn't perfect but we'd like it to
get better rather than worse, so please try to include tests with your
changes.
Expand All @@ -243,7 +243,7 @@ Composer Merge plugin is licensed under the MIT license. See the
[MediaWiki]: https://www.mediawiki.org/wiki/MediaWiki
[GitHub project]: https://github.com/wikimedia/composer-merge-plugin
[PSR-2 Coding Standard]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md
[PHP Code Sniffer]: http://pear.php.net/package/PHP_CodeSniffer
[PHP_CodeSniffer]: http://pear.php.net/package/PHP_CodeSniffer
[Latest Stable Version]: https://img.shields.io/packagist/v/wikimedia/composer-merge-plugin.svg?style=flat
[License]: https://img.shields.io/packagist/l/wikimedia/composer-merge-plugin.svg?style=flat
[Build Status]: https://github.com/wikimedia/composer-merge-plugin/actions/workflows/CI.yaml/badge.svg
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=7.2.0",
"php": ">=7.4.0",
"composer-plugin-api": "^1.1||^2.0"
},
"require-dev": {
"ext-json": "*",
"composer/composer": "^1.1||^2.0",
"mediawiki/mediawiki-phan-config": "0.11.1",
"php-parallel-lint/php-parallel-lint": "~1.3.1",
"phpspec/prophecy": "~1.15.0",
"phpunit/phpunit": "^8.5||^9.0",
"phpspec/prophecy-phpunit": "~2.0.1",
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "~3.7.1"
},
"autoload": {
Expand All @@ -44,7 +44,7 @@
"phpunit --log-junit=reports/unitreport.xml --coverage-text --coverage-html=reports/coverage --coverage-clover=reports/coverage.xml",
"phpcs --encoding=utf-8 --standard=PSR2 --report-checkstyle=reports/checkstyle-phpcs.xml --report-full --extensions=php src/* tests/phpunit/*"
],
"phan": "phan -d . --long-progress-bar",
"phan": "phan -d . --long-progress-bar --allow-polyfill-parser",
"phpcs": "phpcs --encoding=utf-8 --standard=PSR2 --extensions=php src/* tests/phpunit/*",
"phpunit": "phpunit",
"test": [
Expand Down
2 changes: 2 additions & 0 deletions tests/phpunit/LoggerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
use Composer\IO\IOInterface;
use Prophecy\Argument;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;

/**
* @covers \Wikimedia\Composer\Merge\V2\Logger
*/
class LoggerTest extends TestCase
{
use ProphecyTrait;

public function testVeryVerboseDebug()
{
Expand Down
3 changes: 3 additions & 0 deletions tests/phpunit/MergePluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
use Composer\Util\HttpDownloader;
use Prophecy\Argument;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use ReflectionClass;
use ReflectionProperty;
Expand All @@ -48,6 +49,7 @@
*/
class MergePluginTest extends TestCase
{
use ProphecyTrait;

/**
* @var Composer
Expand Down Expand Up @@ -1246,6 +1248,7 @@ public function provideOnPostPackageInstall()
*/
public function testHasBranchAlias($fireInit)
{
$this->markTestSkipped('https://github.com/wikimedia/composer-merge-plugin/issues/240');
$io = $this->io;
$dir = $this->fixtureDir(__FUNCTION__);

Expand Down
2 changes: 2 additions & 0 deletions tests/phpunit/PluginStateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@

use Composer\Composer;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;

/**
* @covers \Wikimedia\Composer\Merge\V2\PluginState
*/
class PluginStateTest extends TestCase
{
use ProphecyTrait;

public function testLocked()
{
Expand Down
2 changes: 2 additions & 0 deletions tests/phpunit/StabilityFlagsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
use Composer\Package\BasePackage;
use Composer\Package\Link;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;

/**
* @covers \Wikimedia\Composer\Merge\V2\StabilityFlags
*/
class StabilityFlagsTest extends TestCase
{
use ProphecyTrait;

/**
* @dataProvider provideExplicitStability
Expand Down

0 comments on commit 554e0b4

Please sign in to comment.