Skip to content
This repository has been archived by the owner on Jul 8, 2023. It is now read-only.

Commit

Permalink
Merge branch 'composer-2'
Browse files Browse the repository at this point in the history
  • Loading branch information
ezzatron committed Nov 23, 2020
2 parents d2837b3 + 9fee95e commit 9f34180
Show file tree
Hide file tree
Showing 24 changed files with 126 additions and 2,828 deletions.
8 changes: 0 additions & 8 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
.gitattributes export-ignore
.gitignore export-ignore
.php_cs export-ignore
.scrutinizer.yml export-ignore
.sensiolabs.yml export-ignore
.travis.yml export-ignore
appveyor.yml export-ignore
/scripts/ export-ignore
/test/ export-ignore
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI
on:
push:
pull_request:
schedule:
- cron: 0 14 * * 0 # Sunday 2PM UTC = Monday 12AM AEST
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['7.2', '7.3', '7.4']
name: PHP ${{ matrix.php }}
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php }}
extensions: mbstring
coverage: pcov
- name: Check PHP version
run: php -v
- name: Install dependencies
run: make vendor
- name: Make
run: make ci
- name: Upload coverage reports
if: success()
run: |
test ! -z "$TOKEN"
bash <(curl -s https://codecov.io/bash) -t "$TOKEN" -B "${{ github.ref }}"
env:
TOKEN: "${{ secrets.CODECOV_TOKEN }}"
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/coverage/
/test/bin/php-cs-fixer
/.makefiles/
/artifacts/
/composer.lock
/vendor/
/README.html
76 changes: 3 additions & 73 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -1,76 +1,6 @@
<?php

$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude(array(
'build',
'coverage',
'test/fixture',
'vendor',
'web',
));
$config = Eloquent\CodeStyle\Config::create(__DIR__);
$config->setCacheFile(__DIR__ . '/artifacts/lint/php-cs-fixer/cache');

return PhpCsFixer\Config::create()
->setRules(array(
'@PSR2' => true,

'array_syntax' => array('syntax' => 'short'),
'binary_operator_spaces' => false,
'blank_line_after_opening_tag' => true,
'blank_line_before_return' => true,
'braces' => false,
'cast_spaces' => true,
'class_definition' => array('singleLine' => false),
'concat_space' => array('spacing' => 'one'),
'declare_equal_normalize' => true,
'function_typehint_space' => true,
'hash_to_slash_comment' => true,
'heredoc_to_nowdoc' => true,
'include' => true,
'linebreak_after_opening_tag' => true,
'lowercase_cast' => true,
'method_separation' => true,
'native_function_casing' => true,
'new_with_braces' => true,
'no_blank_lines_after_class_opening' => true,
'no_blank_lines_after_phpdoc' => true,
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_extra_consecutive_blank_lines' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_mixed_echo_print' => true,
'no_multiline_whitespace_before_semicolons' => true,
'no_short_bool_cast' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_spaces_around_offset' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_unneeded_control_parentheses' => true,
'no_unused_imports' => true,
'no_whitespace_before_comma_in_array' => true,
'no_whitespace_in_blank_line' => true,
'normalize_index_brace' => true,
'object_operator_without_whitespace' => true,
'ordered_imports' => true,
'phpdoc_align' => true,
'phpdoc_indent' => true,
'phpdoc_no_package' => true,
'phpdoc_scalar' => true,
'phpdoc_to_comment' => true,
'phpdoc_trim' => true,
'phpdoc_types' => true,
'pre_increment' => true,
'return_type_declaration' => true,
'short_scalar_cast' => true,
'single_blank_line_before_namespace' => true,
'single_quote' => true,
'space_after_semicolon' => true,
'standardize_not_equals' => true,
'ternary_operator_spaces' => true,
'trailing_comma_in_multiline_array' => true,
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'whitespace_after_comma_in_array' => true,
))
->setFinder($finder);
return $config;
3 changes: 0 additions & 3 deletions .scrutinizer.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .sensiolabs.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Composer NPM bridge changelog

## 5.0.0 (2020-11-23)

- **[BC BREAK]** Dropped support for PHP <7.2.
- **[BC BREAK]** Dropped support for Composer <2.
- **[IMPROVED]** Added support for Composer 2 ([#22], [#24] - thanks
[@bryonbean]).

[#22]: https://github.com/eloquent/composer-npm-bridge/issues/22
[#24]: https://github.com/eloquent/composer-npm-bridge/pull/24
[@bryonbean]: https://github.com/bryonbean

## 4.1.0 (2018-12-06)

- **[IMPROVED]** The NPM bridge can now be completely disabled by setting the
Expand Down
21 changes: 9 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@

As a guideline, please follow this process when contributing:

1. [Fork the repository].
2. Create a branch from **master** (`git checkout -b branch-name master`).
3. Make the relevant code changes.
4. Use the various quality checks provided:
- Run the tests with `make test`.
- Generate a coverage report with `make coverage`, then open
`coverage/index.html`.
- Fix code style issues with `make lint`, but be sure to stage changes
first.
5. [Squash] commits if necessary (`git rebase -i master`).
6. Submit a pull request to the **master** branch.
1. [Fork the repository]
2. [Create a branch]
3. Make your changes
4. Use `make precommit` to run tests and code style checks
5. [Squash commits] if necessary
6. [Create a pull request]

[create a branch]: https://help.github.com/articles/about-branches
[create a pull request]: https://help.github.com/articles/creating-a-pull-request
[fork the repository]: https://help.github.com/articles/fork-a-repo
[squash]: http://git-scm.com/book/en/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages
[squash commits]: https://help.github.com/articles/about-git-rebase
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright © 2017 Erin Millard
Copyright © 2020 Erin Millard

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
25 changes: 5 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
test: install
php --version
PHP_ERROR_EXCEPTION_DEPRECATIONS=1 vendor/bin/phpunit --no-coverage
# Powered by https://makefiles.dev/

coverage: install
phpdbg --version
PHP_ERROR_EXCEPTION_DEPRECATIONS=1 phpdbg -qrr vendor/bin/phpunit
-include .makefiles/Makefile
-include .makefiles/pkg/php/v1/Makefile

open-coverage:
open coverage/index.html

lint: test/bin/php-cs-fixer
test/bin/php-cs-fixer fix --using-cache no

install:
composer install

.PHONY: test coverage open-coverage lint install

test/bin/php-cs-fixer:
curl -sSL https://cs.sensiolabs.org/download/php-cs-fixer-v2.phar -o test/bin/php-cs-fixer
chmod +x test/bin/php-cs-fixer
.makefiles/%:
@curl -sfL https://makefiles.dev/v1 | bash /dev/stdin "$@"
23 changes: 0 additions & 23 deletions appveyor.yml

This file was deleted.

17 changes: 7 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@
],
"type": "composer-plugin",
"require": {
"php": ">=7",
"composer-plugin-api": "^1"
"php": ">=7.2",
"composer-plugin-api": "^2"
},
"require-dev": {
"composer/composer": "dev-master",
"eloquent/phony-phpunit": "^3",
"composer/composer": "^2",
"eloquent/code-style": "^1",
"eloquent/phony-phpunit": "^6",
"friendsofphp/php-cs-fixer": "^2",
"errors/exceptions": "^0.2",
"phpunit/phpunit": "^6"
"phpunit/phpunit": "^8"
},
"autoload": {
"psr-4": {
Expand All @@ -29,10 +31,5 @@
},
"extra": {
"class": "Eloquent\\Composer\\NpmBridge\\NpmBridgePlugin"
},
"config": {
"platform": {
"php": "7.0.99999"
}
}
}
Loading

0 comments on commit 9f34180

Please sign in to comment.