Skip to content

Commit

Permalink
Merge pull request #252 from Kdecherf/fix/utm-query
Browse files Browse the repository at this point in the history
HttpClient: refactor the way we clean utm_ query params
  • Loading branch information
j0k3r authored Dec 10, 2021
2 parents 7514e82 + 8bcef77 commit 574142a
Show file tree
Hide file tree
Showing 18 changed files with 251 additions and 253 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
php:
- "7.3"
- "7.4"

steps:
- name: "Checkout"
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ jobs:
strategy:
matrix:
php:
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"

steps:
- name: "Checkout"
Expand Down Expand Up @@ -104,7 +102,7 @@ jobs:
strategy:
matrix:
php:
- "7.2"
- "7.4"

steps:
- name: "Checkout"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ That's why I made this fork:

### Requirements

- PHP >= 7.1
- PHP >= 7.4
- [Tidy](https://github.com/htacg/tidy-html5) & cURL extensions enabled

### Installation
Expand Down
13 changes: 12 additions & 1 deletion UPGRADE-2.0.md → UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
# UPGRADE FROM 1.x to 2.0
# FROM 2.x to 3.0

It should be easy if you didn't override or extend Graby.
I tried to typehint everything (method parameters, method return, variable, etc.).

So you must update methods you overriden.

### :warning: BC changes

- Support for PHP < 7.4 has been dropped

# FROM 1.x to 2.0

### :warning: BC changes

Expand Down
22 changes: 9 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=7.1.3",
"php": ">=7.4",
"ext-curl": "*",
"ext-tidy": "*",
"fossar/htmlawed": "^1.2.7",
Expand All @@ -29,25 +29,21 @@
"php-http/httplug": "^2.2",
"php-http/message": "^1.9",
"simplepie/simplepie": "^1.5",
"smalot/pdfparser": "^1.0",
"symfony/options-resolver": "^3.4|^4.4|^5.3",
"true/punycode": "^2.1"
"smalot/pdfparser": "^2.0",
"symfony/options-resolver": "^3.4|^4.4|^5.3|^6.0",
"true/punycode": "^2.1",
"guzzlehttp/psr7": "^1.5.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.0",
"guzzlehttp/guzzle": "^6.3.0",
"php-http/guzzle6-adapter": "^2.0",
"php-http/mock-client": "^1.4",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-deprecation-rules": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"symfony/phpunit-bridge": "^5.3"
},
"extra": {
"branch-alias": {
"dev-2.0": "2.0-dev"
}
"phpstan/phpstan": "^1.2",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"symfony/phpunit-bridge": "^6.0"
},
"autoload": {
"psr-4": {
Expand Down
22 changes: 17 additions & 5 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,27 @@ parameters:
-
message: '#Http\\Adapter\\Guzzle5\\Client\\|Http\\Adapter\\Guzzle6\\Client\\|Http\\Client\\Curl\\Client given#'
path: %currentWorkingDirectory%/tests/Extractor/HttpClientTest.php
# we don't want to BC by defining typehint everywhere
# TODO: remove when jumping to 3.0
-
message: '#typehint specified.#'
path: %currentWorkingDirectory%/src/
# phpstan does not seem to recognize the class override for JSLikeHTMLElement
-
message: '#Call to an undefined method DOMElement::setInnerHtml\(\)#'
path: %currentWorkingDirectory%/src/Extractor/ContentExtractor.php
-
message: '#\$innerHTML#'
path: %currentWorkingDirectory%
# can't find a way to cast or properly defined some return elements
-
message: '#DOMNode, object given#'
path: %currentWorkingDirectory%/src/Extractor/ContentExtractor.php
# other stuff I might have fucked up with DOM* classes
-
message: '#DOMNode::\$tagName#'
path: %currentWorkingDirectory%/src/
-
message: '#DOMNode::getElementsByTagName#'
path: %currentWorkingDirectory%/src/
-
message: '#expects DOMElement, DOMNode given#'
path: %currentWorkingDirectory%/src/Graby.php

inferPrivatePropertyTypeFromConstructor: true
checkMissingIterableValueType: false
Expand Down
5 changes: 5 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
</testsuite>
</testsuites>

<php>
<!-- until all deps are compatible with PHP 8.1 -->
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
</php>

<filter>
<whitelist>
<directory>./src</directory>
Expand Down
Loading

0 comments on commit 574142a

Please sign in to comment.