Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing composer require commands as somes packages of php-dev-tools are suggestions instead of requirements #1903

Merged
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
2 changes: 1 addition & 1 deletion modules/testing/advanced-checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ The main tools used for unit testing is [PHPUnit](https://phpunit.de/).
Like other PHP testing tools, it can be installed in your project with composer. Take care to install it in your **development dependencies** to avoid distributing in your production releases.

```bash
composer require --dev phpunit/phpunit:5.7
composer require --dev phpunit/phpunit
```

While newer versions of PHPUnit exist, the version chosen in your project must match the PHP compatibility range of the project, otherwise composer will refuse to install it. The version provided in the example above is the last one compatible with PHP 5.6.
Expand Down
6 changes: 4 additions & 2 deletions modules/testing/basic-checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,15 @@ Following the same rules as the core requires the configuration file to be avail
```bash
# Install dependencies
composer require --dev prestashop/php-dev-tools
composer require --dev friendsofphp/php-cs-fixer

# Set up configuration files
php vendor/bin/prestashop-coding-standards cs-fixer:init
```

These commands install and prepare your project for php-cs-fixer and the core standards. The commands have run successfully if a file `.php_cs.dist` exists in the root folder.

[PHP-CS-Fixer](https://packagist.org/packages/friendsofphp/php-cs-fixer) is used to check the code style, and is automatically included in your project if you required `prestashop/php-dev-tools` by following the commands above.
[PHP-CS-Fixer](https://packagist.org/packages/friendsofphp/php-cs-fixer) is used to check the code style. It is suggested by `prestashop/php-dev-tools` on [Packagist](https://packagist.org/packages/prestashop/php-dev-tools), and must be required via composer separately.

It provides two main features:

Expand Down Expand Up @@ -95,7 +96,7 @@ When the extension is open-source, sharing the license is one important task.
In these headers, details can be found about the author, the license, the original year of publication.
One command will apply the license header to all your files, or update it as necessary.

This tool is part of `prestashop/php-dev-tools` available on [Packagist](https://packagist.org/packages/prestashop/php-dev-tools), which can be required via composer.
This tool is suggested by `prestashop/php-dev-tools` on [Packagist](https://packagist.org/packages/prestashop/php-dev-tools), and must be required via composer separately.

### Example

Expand All @@ -108,6 +109,7 @@ To install and use the tool:
```bash
# Install header-stamp
composer require --dev prestashop/php-dev-tools
composer require --dev prestashop/header-stamp

# Apply header block
php vendor/bin/header-stamp --license=vendor/prestashop/header-stamp/assets/afl.txt --exclude=vendor,tests,_dev
Expand Down
Loading