From d2e29d45ee1da093eb65457e8acf7ec20ced5a27 Mon Sep 17 00:00:00 2001
From: Bart Jaskulski <bjaskulski@protonmail.com>
Date: Tue, 5 Mar 2024 13:18:17 +0100
Subject: [PATCH] refactor: include `composer.json` in plugin distribution
 package

Following WordPress Plugin Review Team recommendation, allow original
`composer.json` file to be available in distribution package.

The reasoning of WP Team:

> We noticed that your plugin is using Composer to handle library
> dependencies, that's great as it will help maintaining and updating
> your plugin in the future while avoiding collisions with other plugins
> that are using same libraries. The composer.json file describes the
> dependencies of your project and may contain other metadata as
> well. It's a small file that typically can be found in the top-most
> directory of your plugin. As one of the strengths of open source is
> the ability to review, observe, and adapt code, we would like to ask
> you to include that file in your plugin, even if it is only used for
> development purposes. This will allow others to exercise the open
> source freedoms from which we all benefit.

It's best to comply with those recommendation to avoid bounce-backs in
the future during free plugin review, considering that `composer.json`
itself will not cause any harm and will not reveal any disclosed
information about our plugin architecture or company internals.

Following, I don't think it is necessary to include `composer.lock` file,
which holds the information of exact version of installed dependencies.

Signed-off-by: Bart Jaskulski <bjaskulski@protonmail.com>
---
 includes/deploy.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/includes/deploy.yml b/includes/deploy.yml
index fab3484..1950287 100644
--- a/includes/deploy.yml
+++ b/includes/deploy.yml
@@ -73,7 +73,7 @@ hooks docs refresh:
     - php -d memory_limit=-1 /usr/local/bin/composer install --no-dev --no-progress --optimize-autoloader --prefer-dist
     - rm auth.json
     - rm -rf build-coverage release tests docs .git .editorconfig .gitignore .gitlab-ci.yml apigen.neon phpunit.xml acceptance test_soap.php .gitlab
-    - rm -rf composer.json composer.lock auth.json phpcs.xml.dist phpunit-integration.xml phpunit-unit.xml composer.phar wp-cli.phar functional tmp_artifacts .tmp tools codeception.dist.yml .env.testing wp-install.sh
+    - rm -rf composer.lock auth.json phpcs.xml.dist phpunit-integration.xml phpunit-unit.xml composer.phar wp-cli.phar functional tmp_artifacts .tmp tools codeception.dist.yml .env.testing wp-install.sh
     - rm -rf phpcs.xml.dist phpunit-integration.xml phpunit-unit.xml wp-cli.phar functional tmp_artifacts scoper.inc.php phpstan.dist phpstan.neon.dist
     - rm -rf assets-src package.json package-lock.json .babelrc webpack.mix.js webpack.config.js README.md
 
-- 
GitLab