Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: middlewares/method-override
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.5.0
Choose a base ref
...
head repository: middlewares/method-override
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Dec 8, 2017

  1. prettify changelog

    oscarotero committed Dec 8, 2017
    Copy the full SHA
    f8b25a6 View commit details

Commits on Jan 13, 2018

  1. Code coverage tests

    oscarotero committed Jan 13, 2018
    Copy the full SHA
    7c2b2fe View commit details
  2. 100% code coverage

    oscarotero committed Jan 13, 2018
    Copy the full SHA
    1c78514 View commit details

Commits on Jan 14, 2018

  1. Added php 7.2 to travis

    oscarotero committed Jan 14, 2018
    Copy the full SHA
    de5c954 View commit details
  2. Updated license year

    oscarotero committed Jan 14, 2018
    Copy the full SHA
    a846030 View commit details
  3. Copy the full SHA
    d720623 View commit details
  4. Updated CHANGELOG

    oscarotero committed Jan 14, 2018
    Copy the full SHA
    1d4e61d View commit details

Commits on Jan 24, 2018

  1. Copy the full SHA
    1094a22 View commit details
  2. fixed typo in readme

    oscarotero committed Jan 24, 2018
    Copy the full SHA
    aa19c67 View commit details
  3. Updated CHANGELOG

    oscarotero committed Jan 24, 2018
    Copy the full SHA
    a398713 View commit details
  4. Code style fix

    oscarotero committed Jan 24, 2018
    Copy the full SHA
    2ebe8a8 View commit details
  5. Renamed options. v1.0.0

    oscarotero committed Jan 24, 2018
    Copy the full SHA
    56c4c41 View commit details
  6. updated the docs

    oscarotero committed Jan 24, 2018
    Copy the full SHA
    4f42826 View commit details
  7. changelog link

    oscarotero committed Jan 24, 2018
    Copy the full SHA
    f1b7d45 View commit details

Commits on Aug 2, 2018

  1. updated utils to 2.1

    oscarotero committed Aug 2, 2018
    Copy the full SHA
    500d878 View commit details

Commits on Aug 4, 2018

  1. Updated docs

    oscarotero committed Aug 4, 2018
    Copy the full SHA
    879205c View commit details
  2. changelog release data

    oscarotero committed Aug 4, 2018
    Copy the full SHA
    bb8757e View commit details

Commits on Oct 8, 2018

  1. Added phpstan

    oscarotero committed Oct 8, 2018
    Copy the full SHA
    588432e View commit details

Commits on Oct 11, 2018

  1. fixed phpstan

    oscarotero committed Oct 11, 2018
    Copy the full SHA
    49c3cd3 View commit details

Commits on Oct 12, 2018

  1. Copy the full SHA
    a6356ab View commit details

Commits on Nov 30, 2019

  1. v2

    oscarotero committed Nov 30, 2019
    Copy the full SHA
    b4bac20 View commit details
  2. fix docs

    oscarotero committed Nov 30, 2019
    Copy the full SHA
    232de3b View commit details

Commits on Dec 1, 2020

  1. Copy the full SHA
    73ea842 View commit details
  2. updated deps

    oscarotero committed Dec 1, 2020
    Copy the full SHA
    227edcc View commit details

Commits on Dec 2, 2020

  1. new version

    oscarotero committed Dec 2, 2020
    Copy the full SHA
    2a4a77b View commit details

Commits on Oct 29, 2021

  1. Copy the full SHA
    330f52b View commit details
Showing with 292 additions and 257 deletions.
  1. +8 −7 .gitattributes
  2. +76 −0 .github/workflows/main.yaml
  3. +2 −1 .gitignore
  4. +8 −128 .php_cs
  5. +0 −13 .travis.yml
  6. +45 −22 CHANGELOG.md
  7. +8 −0 CONTRIBUTING.md
  8. +1 −1 LICENSE
  9. +40 −26 README.md
  10. +14 −11 composer.json
  11. +24 −11 src/MethodOverride.php
  12. +66 −37 tests/MethodOverrideTest.php
15 changes: 8 additions & 7 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
* text=auto eol=lf

/tests export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
phpunit.xml export-ignore
phpcs.xml export-ignore
/tests export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.php_cs export-ignore
.travis.yml export-ignore
phpcs.xml.dist export-ignore
phpunit.xml.dist export-ignore
76 changes: 76 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: "testing"

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
qa:
name: Quality assurance
runs-on: ubuntu-latest

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

- name: Validate composer.json and composer.lock
run: composer validate

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress

- name: Coding Standard
run: composer run-script cs

tests:
name: Tests
runs-on: ubuntu-latest

strategy:
matrix:
php:
- 7.2
- 7.3
- 7.4
composer-args: [ "" ]
include:
- php: 8.0
composer-args: --ignore-platform-reqs
fail-fast: false

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

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}

- name: Cache PHP dependencies
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-php-${{ matrix.php }}-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-progress ${{ matrix.composer-args }}

- name: Tests
run: composer test

- name: Tests coverage
run: composer coverage
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
vendor
composer.lock
.php_cs.cache
coverage
*.cache
136 changes: 8 additions & 128 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -1,130 +1,10 @@
<?php

$finder = PhpCsFixer\Finder::create()
->files()
->name('*.php')
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
;

return PhpCsFixer\Config::create()
->setRules(array(
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => ['align_double_arrow' => false, 'align_equals' => false],
'blank_line_after_namespace' => true,
'blank_line_after_opening_tag' => false,
'blank_line_before_return' => false,
'braces' => ['allow_single_line_closure' => false],
'cast_spaces' => true,
'class_definition' => ['singleLine' => false, 'singleItemSingleLine' => true, 'multiLineExtendsEachSingleLine' => true],
'class_keyword_remove' => false,
'combine_consecutive_unsets' => true,
'concat_space' => false,
'declare_equal_normalize' => ['space' => 'single'],
'declare_strict_types' => false,
'elseif' => true,
'encoding' => true,
'full_opening_tag' => true,
'function_declaration' => true,
'function_typehint_space' => true,
'general_phpdoc_annotation_remove' => ['expectedExceptionMessageRegExp', 'expectedException', 'expectedExceptionMessage'],
'hash_to_slash_comment' => true,
'header_comment' => false,
'heredoc_to_nowdoc' => true,
'include' => true,
'indentation_type' => true,
'line_ending' => true,
'linebreak_after_opening_tag' => true,
'lowercase_cast' => true,
'lowercase_constants' => true,
'lowercase_keywords' => true,
'mb_str_functions' => false,
'method_argument_space' => true,
'method_separation' => true,
'native_function_casing' => true,
'native_function_invocation' => false,
'new_with_braces' => true,
'no_blank_lines_after_class_opening' => true,
'no_blank_lines_after_phpdoc' => false,
'no_blank_lines_before_namespace' => false,
'no_closing_tag' => true,
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_extra_consecutive_blank_lines' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block'],
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_mixed_echo_print' => ['use' => 'echo'],
'no_multiline_whitespace_around_double_arrow' => true,
'no_multiline_whitespace_before_semicolons' => true,
'no_short_bool_cast' => true,
'no_short_echo_tag' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_spaces_after_function_name' => true,
'no_spaces_around_offset' => true,
'no_spaces_inside_parenthesis' => true,
'no_trailing_comma_in_list_call' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_trailing_whitespace' => true,
'no_trailing_whitespace_in_comment' => true,
'no_unneeded_control_parentheses' => true,
'no_unused_imports' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'no_whitespace_before_comma_in_array' => true,
'no_whitespace_in_blank_line' => true,
'normalize_index_brace' => true,
'not_operator_with_space' => false,
'not_operator_with_successor_space' => false,
'object_operator_without_whitespace' => true,
'ordered_class_elements' => false,
'ordered_imports' => true,
'php_unit_fqcn_annotation' => true,
'php_unit_strict' => false,
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_align' => true,
'phpdoc_inline_tag' => true,
'phpdoc_no_access' => true,
'phpdoc_no_alias_tag' => ['property-read' => 'property', 'property-write' => 'property', 'type' => 'var'],
'phpdoc_no_empty_return' => true,
'phpdoc_no_package' => true,
'phpdoc_no_useless_inheritdoc' => true,
'phpdoc_order' => true,
'phpdoc_return_self_reference' => true,
'phpdoc_scalar' => true,
'phpdoc_separation' => false,
'phpdoc_single_line_var_spacing' => true,
'phpdoc_summary' => false,
'phpdoc_to_comment' => true,
'phpdoc_trim' => true,
'phpdoc_types' => true,
'phpdoc_var_without_name' => true,
'pow_to_exponentiation' => false,
'pre_increment' => true,
'protected_to_private' => true,
'return_type_declaration' => true,
'self_accessor' => true,
'semicolon_after_instruction' => true,
'short_scalar_cast' => true,
'single_blank_line_at_eof' => true,
'single_blank_line_before_namespace' => false,
'single_class_element_per_statement' => true,
'single_import_per_statement' => true,
'single_line_after_imports' => true,
'single_quote' => true,
'space_after_semicolon' => true,
'standardize_not_equals' => true,
'strict_param' => false,
'switch_case_semicolon_to_colon' => true,
'switch_case_space' => true,
'ternary_operator_spaces' => true,
'ternary_to_null_coalescing' => false,
'trailing_comma_in_multiline_array' => true,
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'visibility_required' => true,
'whitespace_after_comma_in_array' => true,
))
->setFinder($finder)
;
return My\PhpCsFixerConfig::create()
->setFinder(
PhpCsFixer\Finder::create()
->files()
->name('*.php')
->in(__DIR__.'/src')
->in(__DIR__.'/tests')
);
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

67 changes: 45 additions & 22 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,75 @@
# Change Log

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [0.5.0] - 2017-11-13
## [2.0.1] - 2020-12-02
### Added
- Support for PHP 8

## [2.0.0] - 2019-11-30
### Added
- Added `responseFactory` option to the constructor

### Removed
- Support for PHP 7.0 and 7.1
- The `responseFactory()` option. Use the constructor argument.

* Removed support for PHP 5.x.
## [1.1.0] - 2018-08-04
### Added
- PSR-17 support
- New option `responseFactory`

### Changed
## [1.0.0] - 2017-01-24
### Added
- Improved testing and added code coverage reporting
- Added tests for PHP 7.2

* Replaced `http-interop/http-middleware` with `http-interop/http-server-middleware`.
### Changed
- Upgraded to the final version of PSR-15 `psr/http-server-middleware`
- Renamed the option `get()` to `getMethods()`
- Renamed the option `post()` to `postMethods()`

## [0.4.0] - 2017-09-21
### Fixed
- Updated license year

## [0.5.0] - 2017-11-13
### Changed
- Replaced `http-interop/http-middleware` with `http-interop/http-server-middleware`.

* Append `.dist` suffix to phpcs.xml and phpunit.xml files
* Changed the configuration of phpcs and php_cs
* Upgraded phpunit to the latest version and improved its config file
* Updated to `http-interop/http-middleware#0.5`

## [0.3.0] - 2016-12-26
### Removed
- Removed support for PHP 5.x.

## [0.4.0] - 2017-09-21
### Changed
- Append `.dist` suffix to phpcs.xml and phpunit.xml files
- Changed the configuration of phpcs and php_cs
- Upgraded phpunit to the latest version and improved its config file
- Updated to `http-interop/http-middleware#0.5`

* Updated tests
* Updated to `http-interop/http-middleware#0.4`
* Updated `friendsofphp/php-cs-fixer#2.0`
## [0.3.0] - 2016-12-26
### Changed
- Updated tests
- Updated to `http-interop/http-middleware#0.4`
- Updated `friendsofphp/php-cs-fixer#2.0`

## [0.2.0] - 2016-11-23

### Changed

* Updated to `http-interop/http-middleware#0.3`
- Updated to `http-interop/http-middleware#0.3`

## [0.1.1] - 2016-10-01

### Fixed

* Changed `composer.json` to include the latest version of `middlewares/utils 0.*`
- Changed `composer.json` to include the latest version of `middlewares/utils 0.*`

## 0.1.0 - 2016-10-01

First version

[2.0.1]: https://github.com/middlewares/method-override/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/middlewares/method-override/compare/v1.1.0...v2.0.0
[1.1.0]: https://github.com/middlewares/method-override/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/middlewares/method-override/compare/v0.5.0...v1.0.0
[0.5.0]: https://github.com/middlewares/method-override/compare/v0.4.0...v0.5.0
[0.4.0]: https://github.com/middlewares/method-override/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/middlewares/method-override/compare/v0.2.0...v0.3.0
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -45,3 +45,11 @@ Good pull requests – patches, improvements, new features – are a fantastic h
```sh
composer test
```

To get code coverage information execute the following comand:

```sh
composer coverage
```

Then, open the `./coverage/index.html` file in your browser.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017
Copyright (c) 2019

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Loading