Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Dummy plugin demonstrating dependency collision issue.

Notifications You must be signed in to change notification settings

WP-Brothers/wp-monta-testcase

Repository files navigation

Monta Dependency Collision testcase

Plugin demonstrating dependency collision with prepackaged vendor

Getting started

Prerequisites

  • PHP 8.0.22
  • Composer ^2
  • Phive ^1

Installation

Add the private composer repository in the repositories array in your site composer.json.

Minimal site composer.json example:

{
  "name": "site/example",
  "repositories": [
    {
      "type": "composer",
      "url": "https://composer.sbdev.nl/"
    }
  ],
  "require": {
    "composer/installers": "^1",
    "socialbrothers/wp-monta-testcase": "*"
  },
  "extra": {
    "installer-paths": {
      "wp-content/plugins/{$name}/": [
        "type:wordpress-plugin"
      ]
    }
  }
}

A composer managed WordPress environment is required to install this plugin through composer. This package is hosted on the private SocialBrothers composer repo, to install from this repository a valid auth.json with credentials for this server is required.

composer require socialbrothers/wp-monta-testcase

Usage

...

Development

Note on development dependencies

To minimize the chance of namespace or dependency collision some dev-dependencies are provided as phar archives using phive, which is an alternative package manager that focusses on providing dependencies as phar archives.

Install Phive by running these steps in your terminal.

wget -O phive.phar https://phar.io/releases/phive.phar
wget -O phive.phar.asc https://phar.io/releases/phive.phar.asc
gpg --keyserver hkps://keys.openpgp.org --recv-keys 0x9D8A98B29B2D5D79
gpg --verify phive.phar.asc phive.phar
chmod +x phive.phar
sudo mv phive.phar /usr/local/bin/phive

For alternative installation methods check phar.io.

Running unit tests

The shell command shown below will execute the default PHPUnit testsuite with code coverage as defined in phpunit.xml.

composer test

Formatting project

The shell command shown below will run php-cs-fixer with the config defined in .php-cs-fixer.php.

composer format

Analysing project

The shell command shown below will analyse the project using phpstan with the config defined in phpstan.neon.

composer analyse

About

Dummy plugin demonstrating dependency collision issue.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages