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

Update to v1.5.6 #3

Open
wants to merge 317 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
317 commits
Select commit Hold shift + click to select a range
398fe7d
Do not use magic values for state machine state (#735)
jtojnar Jul 7, 2022
da9890a
Use PSR-4 classes in Registry (#736)
Art4 Jul 7, 2022
a64bbd4
GH Actions: run tests against PHP 8.2 (#739)
jrfnl Jul 7, 2022
cce6ad2
Change code style to PSR-12 (#738)
Art4 Aug 26, 2022
8e2ae9e
Fix editorconfig regression (#745)
Alkarex Sep 22, 2022
33f86e6
Fix item get_base (#744)
Alkarex Sep 22, 2022
9e9add3
Release 1.7.0 (#733)
Art4 Sep 30, 2022
f85c331
Clarify branching strategy (#751)
Art4 Oct 23, 2022
33d85b8
Item::get_date: fix return type on unparsable date (#753)
jtojnar Oct 23, 2022
4f3cddf
remove ROADMAP.md (#748)
Art4 Oct 23, 2022
007619f
Fix error handling (#747)
cedric-anne Oct 23, 2022
2eaab53
Allow usage of PSR-16 cache implementation (#742)
Art4 Oct 23, 2022
258a1bb
Use native array_replace_recursive (#749)
Alkarex Oct 23, 2022
f4b9a5f
remove check for E_USER_DEPRECATED definition (#750)
Art4 Oct 23, 2022
d0552b0
Require PHP 7.2 or newer (#743)
Art4 Oct 24, 2022
bb38d74
Use Psr16 cache as Default, deprecate \SimplePie\Cache\Base implement…
Art4 Oct 30, 2022
4c5ac79
Type declarations in cache (#759)
Art4 Dec 2, 2022
fdf50d6
Remove BC code that never worked (#764)
Art4 Dec 2, 2022
72a0b8c
Parse\Date: Clean up regex structure (#765)
jtojnar Dec 2, 2022
7474018
Create interface RegistryAware (#760)
Art4 Dec 2, 2022
93fe459
Replace cache_name_function with NameFilter class (#762)
Art4 Dec 13, 2022
efe70f4
Declare strict_types=1 in every file (#763)
Art4 Dec 13, 2022
839d34c
GH Actions: update PHP versions in workflows (#767)
jrfnl Dec 13, 2022
a9f4a18
No URL Decode for enclosure links (#768)
Alkarex Jan 12, 2023
2740255
Sanitize thumbnail URL (#770)
Alkarex Jan 12, 2023
1ef386d
Fix case of multiple RSS2.0 enclosures (#769)
Alkarex Jan 19, 2023
52ac49f
Fix broken phpdoc references (#771)
jtojnar Jan 19, 2023
5430a1e
Registry: Allow using class-strings instead of magic strings (#766)
Art4 Jan 20, 2023
65b095d
Release 1.8.0 (#761)
Art4 Jan 20, 2023
24a8c57
Create interfaces for HTTP client and response
Art4 Jan 23, 2023
a5664cf
Add FileClient as new HTTP client implementation
Art4 Jan 23, 2023
221259b
Add Response tests for File class
Art4 Jan 23, 2023
3cda8f2
Use HTTP client inside SimplePie class
Art4 Jan 23, 2023
cd81336
Add support for HTTP client in Sanitize class
Art4 Jan 23, 2023
551ecc7
Use HTTP client in Locator class
Art4 Jan 23, 2023
8fc95ca
use Response methods instead of File attributes
Art4 Jan 23, 2023
c1a6ead
Add method Response::get_permanent_uri()
Art4 Jan 23, 2023
61cd544
Use Response methods instead of File attributes
Art4 Jan 23, 2023
9e3e13f
Improve Sniffer class
Art4 Jan 24, 2023
a6ccbd6
minor improvements
Art4 Jan 24, 2023
20302b8
Create Psr7Response and Psr18Client
Art4 Jan 25, 2023
c023ea3
Psr18Client follows redirects
Art4 Jan 26, 2023
48a34d7
Refactore header parsing in File
Art4 Jan 26, 2023
4ff0bc1
Merge branch 'split-file-into-client-and-response' into add-psr18-htt…
Art4 Jan 26, 2023
69cf5fb
Add tests with local files for FileClient
Art4 Jan 26, 2023
b5ae752
Add tests with local files for Psr18Client
Art4 Jan 26, 2023
188c154
Fix tests for PHP < 8.0
Art4 Jan 26, 2023
419b8e5
Fix Locator, add integration tests for basic functions
Art4 Jan 26, 2023
b0a0a0a
Merge branch 'split-file-into-client-and-response' into add-psr18-htt…
Art4 Jan 26, 2023
9dd5bf9
Add SimplePie::set_http_client(), add tests
Art4 Jan 27, 2023
9b5a099
Add integration test for loading a feed from cache
Art4 Jan 27, 2023
3bfd01c
Add integration tests for PSR-16 cache and PSR-18 client
Art4 Jan 27, 2023
b36e934
Add code examples in README.markdown for PSR-18 HTTP client and PSR-1…
Art4 Jan 27, 2023
9bf0596
Remove unused property
Art4 Jan 27, 2023
e597f27
Constructor improvement (#772)
ColonelMoutarde Jan 28, 2023
5c8a5a3
Fix params, fix url comment
Art4 Jan 30, 2023
32544d5
Deprecate method SimplePie\Sanitize::pass_file_data()
Art4 Jan 30, 2023
f235282
Make sure status_code is always setted
Art4 Jan 30, 2023
b8b2373
Merge branch 'split-file-into-client-and-response' into add-psr18-htt…
Art4 Jan 30, 2023
b7f4650
Deprecate method SimplePie\SimplePie::set_file()
Art4 Jan 30, 2023
54a99bd
set SimplePie->$file to private, improve user notices
Art4 Jan 30, 2023
d6d2224
Fix phpdoc
Art4 Jan 30, 2023
854da5d
Mark Response interface as internal
Art4 Jan 30, 2023
d894521
Add type hints in all classes (#775)
Art4 Jan 31, 2023
7fba7db
Remove package phpdoc annotation (#781)
jtojnar Jan 31, 2023
f86d4ef
Merge branch 'master' into split-file-into-client-and-response
Art4 Jan 31, 2023
c16ffc1
Remove `@package` and `@subpackage` tags
Art4 Jan 31, 2023
84404e4
Update to github actions/checkout v3 (#783)
Art4 Feb 13, 2023
7b0901c
Use single constant for default HTTP Accept header (#784)
Alkarex Feb 13, 2023
f12dbcc
Merge branch 'master' into split-file-into-client-and-response
Art4 Feb 13, 2023
082e7aa
Mark HttpException as final
Art4 Feb 13, 2023
74de990
Merge branch 'split-file-into-client-and-response' into add-psr18-htt…
Art4 Feb 13, 2023
27bee6e
Provide PSR implementations to Sanitize instead of internal HTTP Client
Art4 Feb 16, 2023
9059c41
Do not require internal Response interface in Sniffer
Art4 Feb 16, 2023
87f77e5
Accept internal Response implementations in Locator and Sniffer
Art4 Feb 16, 2023
803cc9a
Accept PSR implementations in Locator constructor, deprecate old argu…
Art4 Feb 16, 2023
b04b493
Make sure only throw HttpException in FileClient
Art4 Feb 16, 2023
136dab9
BC: Do not cache FileClient, or we wont be able to change the timeout
Art4 Feb 16, 2023
b9688df
Merge branch 'split-file-into-client-and-response' into add-psr18-htt…
Art4 Feb 16, 2023
16b440d
remove package phpdoc annotations
Art4 Feb 17, 2023
1a57dcd
Add Locator::set_http_client(), update CHANGELOG.md
Art4 Feb 17, 2023
69e6594
Restore BC in Locator::__construct()
Art4 Feb 17, 2023
374c7c7
Set new set_http_client() methods to final
Art4 Feb 17, 2023
d5b6344
tests/Locator: simplify File providers
jtojnar Mar 18, 2023
64c32f7
tests: Add type hints to data providers
jtojnar Mar 18, 2023
3dec137
Parse/Date: Comment out duplicate keys (#787)
jtojnar Mar 19, 2023
aa3436a
Clarify error type (#786)
jtojnar Mar 19, 2023
9fcf5bb
Cache/Memcache: Fix type annotation (#788)
jtojnar Mar 19, 2023
2e5df5f
Misc: Fix get_build when overridden (#789)
jtojnar Mar 19, 2023
ae6665d
tests/Unit/Parser: Check microformat h-feed parsing (#794)
jtojnar Mar 19, 2023
ff1b513
SimplePie: Deprecate multifeed support (#795)
jtojnar Mar 19, 2023
9881a87
Restriction: Turn relationship values into constants (#796)
jtojnar Mar 19, 2023
9521a8a
Replace the licence blurbs with SPDX comments (#798)
jtojnar Mar 19, 2023
8cbbdbe
Improve type annotations for data classes (#797)
jtojnar Mar 19, 2023
3c28077
File: Fix `permanent_url` with multiple permanent redirects (#812)
jtojnar Mar 19, 2023
0e352e9
tests/CacheTest: Use existing SuccessException fixture (#804)
jtojnar Mar 19, 2023
43d5e1e
Do not register the default class (#806)
jtojnar Mar 19, 2023
141ab9b
Locator: Fix type error when no extension (#803)
jtojnar Mar 19, 2023
95b8972
Remove redundant qualified names (#808)
jtojnar Mar 19, 2023
570bd57
Use more ::class constant instead of class-strings (#805)
jtojnar Mar 19, 2023
4357fd1
tests/Unit/SimplePieTest: Fix notices (#809)
jtojnar Mar 19, 2023
2904878
Parse/Date: Fix types and clean up (#790)
jtojnar Mar 19, 2023
0dadc1e
Locator: add type hints (#793)
jtojnar Mar 19, 2023
185a727
Use `idn_to_ascii` function instead of `idna_convert` library
jtojnar Feb 16, 2023
2c42c1d
Merge branch 'master' into split-file-into-client-and-response
Art4 Mar 20, 2023
a425aee
Replace copyright comments with spdx notes
Art4 Mar 20, 2023
3c3bf9a
Merge branch 'split-file-into-client-and-response' into add-psr18-htt…
Art4 Mar 20, 2023
c9a8f0e
Replace copyright comments with spdx notes
Art4 Mar 20, 2023
ae2dd09
SimplePie: Remove redundant instanceof (#814)
jtojnar Apr 2, 2023
f075406
Sanitize: Support passing curl_options (#817)
jtojnar Apr 2, 2023
953c567
tests/Unit/ParserTest: Skip when Mf2 library is not available (#818)
jtojnar Apr 2, 2023
8beff14
IRI: Fix types (#791)
jtojnar Apr 2, 2023
61be2e1
tests/CacheTest: Do not use trigger_error to ensure method not called…
jtojnar Apr 2, 2023
2d43f64
Cache/Psr16: work around invalid @throws annotation on PHP 7 (#816)
jtojnar Apr 2, 2023
48722ac
tests/Unit/SimplePieTest: Fix duplicate array index (#820)
jtojnar Apr 2, 2023
bd90a9f
ci: Run coding style checks (#825)
jtojnar Apr 2, 2023
da32663
tests/Integration/CachingTest: Do not access private properties throu…
jtojnar Apr 2, 2023
802e35f
tests: Do not use magic method for testing protected methods (#824)
jtojnar Apr 2, 2023
0f1c912
Item: Accept Sanitize object (#827)
jtojnar Apr 2, 2023
adc91d4
ci: Fix coding style (#828)
jtojnar Apr 2, 2023
58865af
Fix TypeError in Sanitize::replace_urls due to a link without host
jtojnar Apr 24, 2023
a03affa
Merge branch 'master' into split-file-into-client-and-response
Art4 May 19, 2023
26033c6
Fix code style
Art4 May 19, 2023
5361353
Merge branch 'split-file-into-client-and-response' into add-psr18-htt…
Art4 May 19, 2023
9660095
Fix tests
Art4 May 19, 2023
0c3fde1
fix code style
Art4 May 19, 2023
928fdc5
Move code style check into separate job
Art4 May 19, 2023
8cb5c44
Test single-file build with PHP 8.2
Art4 May 19, 2023
dba1fd7
Merge pull request #774 from Art4/split-file-into-client-and-response
mblaney May 21, 2023
2d534d4
Revert "Split SimplePie\File class into HTTP client and response"
jtojnar May 21, 2023
ec25094
SimplePie: Do not reduce timeout for cache verification
jtojnar Mar 20, 2023
bf1a1b8
Add integration tests for basic functions
Art4 Jan 26, 2023
e2759d8
Various minor clean ups
Art4 Mar 18, 2023
22946c1
tests/Unit/HTTP/ParserTest: Test duplicate headers
jtojnar May 21, 2023
3d506cf
HTTP/Parser: Support PSR-7 header format
jtojnar Mar 18, 2023
9ed0c13
Create interfaces for HTTP client and response
Art4 Mar 17, 2023
7455f9d
File: Implement `Response` interface
Art4 Jan 23, 2023
7cb7f26
Clean up use of File class
Art4 Feb 18, 2023
55db183
ci: Add PHPStan
jtojnar Feb 18, 2023
7ee176f
Use Response methods instead of File attributes
Art4 Jan 23, 2023
04cc215
Add FileClient as new HTTP client implementation
Art4 Mar 18, 2023
85e7845
Use HTTP client inside SimplePie class
Art4 Jan 23, 2023
7cca9c7
Add support for HTTP client in Sanitize class
Art4 Jan 23, 2023
e71ef25
Use HTTP client in Locator class
Art4 Jan 23, 2023
26e0d18
File: Mark public properties deprecated
jtojnar Mar 18, 2023
7a48ae6
Deprecate method SimplePie\Sanitize::pass_file_data()
Art4 Jan 30, 2023
1ece520
Merge branch 'master' into add-psr18-http-client-support
Art4 May 23, 2023
98ed1a7
Merge pull request #811 from jtojnar/phpstan
mblaney May 30, 2023
2610398
Merge pull request #813 from jtojnar/test-provider-generators
mblaney May 30, 2023
84f9828
Merge pull request #832 from jtojnar/fix-831
mblaney May 30, 2023
06b2687
Merge pull request #785 from jtojnar/idn
mblaney May 30, 2023
1d776d5
Merge pull request #815 from jtojnar/split-file-into-client-and-response
mblaney May 30, 2023
e356f5d
Merge pull request #835 from Art4/move-cs-check-into-own-job
mblaney May 30, 2023
67471c5
Merge branch 'master' into add-psr18-http-client-support
Art4 Jun 12, 2023
7554d6f
Fix parameter doc
Art4 Jun 12, 2023
1bd658b
Fixing issue with dead link in #839
Jun 28, 2023
4469ac9
Merge pull request #840 from theamoeba/839-dead-url-issue
mblaney Aug 6, 2023
cdad5e0
ci: Fix with PHPStan 1.10.22
jtojnar Aug 6, 2023
24ff643
ci: Fix tests on PHP 8.3
jtojnar Aug 6, 2023
bb01ef4
Merge pull request #841 from jtojnar/fix-ci
mblaney Aug 8, 2023
8bfa40d
Always return value in non-void functions
jtojnar May 30, 2023
bdd9a9e
Fix type annotations
jtojnar May 30, 2023
6e2a01b
SimplePie: Mark fetch_data as returning bool
jtojnar May 30, 2023
d0eb5c2
Do not use object properties for temporary values
jtojnar May 30, 2023
dd6c71e
Reset parser state to valid property values
jtojnar May 30, 2023
777ace9
Raise PHPStan to level 3
jtojnar May 30, 2023
da7d17f
Drop unreachable statements
jtojnar May 30, 2023
9f03aa5
Fix SimplePie::$all_discovered_feeds type
jtojnar May 30, 2023
17cabe2
Do not use aliases
jtojnar May 30, 2023
54a7c14
Item: Clean up duration parser
jtojnar May 30, 2023
b06815a
PHPStan: Ignore false conditionals in library/
jtojnar May 30, 2023
eb33c0a
Item: Clean up restrictions_parent in get_enclosures
jtojnar May 30, 2023
b24c002
Remove redundant is_object checks
jtojnar May 30, 2023
5e6ea6f
Sanitize: add types for https_domains
jtojnar May 30, 2023
e565927
PHPStan: Ignore conditionals enforcing PHPDoc types
jtojnar May 30, 2023
2726e5a
PHPStan: Ignore comparing substr return value with false
jtojnar May 31, 2023
5a9adcb
IRI: Move prop name out of conditional
jtojnar May 31, 2023
5fbb2c8
SimplePie: Remove pointless `$headers['link']['hub']` check
jtojnar May 31, 2023
dc9b5ff
Raise PHPStan to level 4
jtojnar May 31, 2023
5b40d3d
tests: Remove unused AllTests
jtojnar May 31, 2023
e4f6ae4
Fix more type annotations
jtojnar May 31, 2023
65c133a
Misc::get_curl_version(): Clean up
jtojnar May 31, 2023
f5c99dd
Use real callables for XML handlers
jtojnar May 31, 2023
833ffb8
PHPStan: Ignore incompatible PHPUnit argument type on PHP ≤ 7.4
jtojnar Jun 8, 2023
9b3964a
Raise PHPStan to level 5
jtojnar May 31, 2023
0d4bedb
tests: Add some missing type hints
jtojnar Jun 9, 2023
5e69132
tests: Remove redundant type checks
jtojnar Jun 9, 2023
12c1147
tests: Clean up section comments
jtojnar Jun 9, 2023
c60efa1
Sanitize: Simplify sentinel values
jtojnar Jun 12, 2023
9540d3a
Sanitize: Do not explode add_attributes
jtojnar Jun 12, 2023
0d3f427
LocatorTests: Do not pass wrong values to Locator
jtojnar Jun 12, 2023
152f181
Remove redundant checks
jtojnar Aug 8, 2023
a2ee1d7
Add more type annotations
jtojnar Jun 12, 2023
f2f0678
Raise PHPStan to level 6
jtojnar Jun 12, 2023
c799dd8
tests/ItemTest: Fix type hint in data provider
jtojnar Jun 12, 2023
a998d64
Merge branch 'master' into add-psr18-http-client-support
Art4 Aug 9, 2023
65bc7d6
Merge pull request #837 from jtojnar/phpstan-3
mblaney Aug 25, 2023
53d005b
Merge branch 'master' into add-psr18-http-client-support
Art4 Aug 25, 2023
3811a7d
run php-cs-fixer
Art4 Aug 25, 2023
33e27f8
Fix PHPStan errors
Art4 Aug 25, 2023
9a820ac
Psr7Response should always return full stream as body content
Art4 Aug 25, 2023
7201979
finetune tests
Art4 Aug 25, 2023
aceabdd
fix tests
Art4 Aug 25, 2023
c7330e6
ignore not fixable phpstan errors
Art4 Aug 25, 2023
8f45077
Merge pull request #777 from Art4/add-psr18-http-client-support
mblaney Aug 26, 2023
a774a7a
update to yoast/phpunit-polyfills v2
Art4 Sep 1, 2023
3a1a38b
remove ExpectPHPException trait
Art4 Sep 1, 2023
38e026f
fix non-static dataProviders for PHPUnit 10
Art4 Sep 1, 2023
e1d7b8d
replace expectDeprecation() and expectError() in CacheTest
Art4 Sep 1, 2023
9b07139
Fix error trim() on false
Art4 Sep 1, 2023
5c18940
replace expectNotice() and expectDeprecation() with workarounds
Art4 Sep 11, 2023
32af9ef
add compat with PHP < 8.0, fix phpstan errors
Art4 Sep 11, 2023
d6ac821
replace yoast/phpunit-polyfills with phpunit/phpunit
Art4 Sep 11, 2023
77b6ff6
migrate phpunit.xml.dist to phpunit 10
Art4 Sep 11, 2023
facbe97
Add command to create code coverage report with phpunit
Art4 Sep 12, 2023
be9a239
Merge pull request #848 from Art4/phpunit-10
mblaney Sep 20, 2023
6d40e1b
refactor: drop call to xml_set_object()
Girgias Oct 7, 2023
290e930
Merge pull request #851 from Girgias/remove-xml-set-object-call
mblaney Nov 2, 2023
44cd22f
ci: Fix coding style
jtojnar Nov 6, 2023
1ec20d6
Merge pull request #853 from jtojnar/fix-ci
mblaney Dec 19, 2023
34d7767
ci: Fix php-cs-fixer
jtojnar Apr 10, 2024
e61d7e5
Fix typos
szepeviktor May 13, 2024
813d3b1
PHPDoc avoid aliases for scalar types
Alkarex Jun 18, 2024
464601a
Fix PHPStan for PHP 7.3
Alkarex Jun 18, 2024
3bf0734
Comments
Alkarex Jun 18, 2024
d77d59b
Typo
Alkarex Jun 18, 2024
215365a
Simplify comment
Alkarex Jun 19, 2024
1147f7c
Minor format
Alkarex Jun 19, 2024
55578b4
Simplified comment
Alkarex Jun 19, 2024
349f4e8
Merge pull request #865 from szepeviktor/typos
mblaney Jul 22, 2024
ac09709
Merge pull request #862 from jtojnar/ci
mblaney Jul 22, 2024
b9e2529
Merge pull request #869 from FreshRSS/fix-phpstan-php7
mblaney Jul 22, 2024
90cc990
Extract long repeating sanitization bases into variable
Jul 22, 2024
5ac703b
Merge branch 'master' into phpdoc-fix-types
Alkarex Jul 22, 2024
4899a66
Merge pull request #868 from FreshRSS/phpdoc-fix-types
mblaney Jul 23, 2024
9385c54
Merge pull request #871 from jtojnar/sanitize-cleanup
mblaney Jul 24, 2024
9de4916
Fix CI for PHPStan 1.12
Alkarex Sep 25, 2024
c8c0e4c
PHP 8.4 | Fix implicitly nullable parameters
jrfnl Sep 12, 2024
926974a
PHP 8.4 | Fix passing E_USER_ERROR to trigger_error() [1]
jrfnl Sep 12, 2024
24786a7
PHP 8.4 | Fix passing E_USER_ERROR to trigger_error() [2]
jrfnl Sep 12, 2024
7f2fd6c
PHP 8.4 | Fix passing E_USER_ERROR to trigger_error() [3]
jrfnl Sep 12, 2024
2a05361
QA: replace another call to `trigger_error()` with `exit`
jrfnl Sep 12, 2024
ae20e0e
Composer: prevent a lock file from being created
jrfnl Sep 26, 2024
6b97dec
ci: Add PHP 8.4
jtojnar Aug 27, 2024
194f8ff
Set cache_expiration_time when storing data to cache
Alkarex Sep 29, 2024
77d89e6
phpstan: Rename config to use dist suffix
jtojnar Sep 29, 2024
bba928e
Gzdecode: Deprecate our gzip implementation
jtojnar Sep 30, 2024
176abc4
IRI: Simplify parse_iri()
jtojnar Sep 29, 2024
52c764f
SimplePie: Fix encode argument of strip_htmltags
jtojnar Sep 30, 2024
72b4293
GH Actions: PHP 8.4 has been released
jrfnl Nov 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
28 changes: 28 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# https://EditorConfig.org

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{css,js,json,sql}]
indent_style = tab

[*.html]
indent_size = 2
indent_style = space

[*.{markdown,md}]
indent_size = 4
indent_style = space
max_line_length = off
trim_trailing_whitespace = false

[*.php]
indent_size = 4
indent_style = space

[*.{yaml,yml}]
indent_size = 2
indent_style = space
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* text=auto eol=lf
/.github export-ignore
/build export-ignore
/compatibility_test export-ignore
/demo export-ignore
Expand Down
118 changes: 118 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: CI

on:
# Run on all pushes and on all pull requests.
push:
pull_request:
# Allow manually triggering the workflow.
workflow_dispatch:

jobs:
check-code-style:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php: ['8.2']

name: "Check code style | PHP ${{ matrix.php }}"

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install PHP with latest composer
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: error_reporting=-1, display_errors=On, log_errors_max_len=0
coverage: none
tools: none

# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-composer-dependencies
- name: "Install Composer dependencies"
uses: "ramsey/composer-install@v2"

- name: "Check coding style"
run: composer cs

test:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php:
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
- '8.4'

name: "PHP: ${{ matrix.php }}"

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install PHP with latest composer
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: error_reporting=-1, display_errors=On, log_errors_max_len=0
coverage: none
tools: none

# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-composer-dependencies
- name: "Install Composer dependencies"
uses: "ramsey/composer-install@v2"

- name: Run unit tests
run: composer test

- name: Run static analysis
run: composer phpstan -- --error-format=github

test-compiled:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php: ['8.2']

name: "Test single-file build | PHP ${{ matrix.php }}"

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: error_reporting=-1, display_errors=On, log_errors_max_len=0
coverage: none
tools: none

# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-composer-dependencies
- name: "Install Composer dependencies"
uses: "ramsey/composer-install@v2"
with:
composer-options: --ignore-platform-reqs

- name: Run build script
run: php build/compile.php

- name: Rename src and library folders
run: mv src src.bak && mv library library.bak

- name: Run unit tests using compiled file
run: bin/phpunit --bootstrap=build/bootstrap.php
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Releases

on:
push:
tags:
- '*'

jobs:

build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
ini-values: error_reporting=-1, display_errors=On, log_errors_max_len=0
coverage: none
tools: none

- name: Run build script
run: php build/compile.php

- uses: ncipollo/release-action@v1
with:
artifacts: "SimplePie.compiled.php"
allowUpdates: true
token: ${{ secrets.GITHUB_TOKEN }}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
*sandbox*
demo/cache/*
SimplePie.compiled.php
bin/
vendor/
composer.lock
phpstan.neon
phpunit.xml
.php-cs-fixer.cache
.phpunit.cache/
21 changes: 21 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

$finder = (new PhpCsFixer\Finder())
->in('build')
->in('library')
->in('src')
->in('tests')
;

return (new PhpCsFixer\Config())
->setRules([
'@PSR12' => true,
'@PHP71Migration' => true,
'@PHP71Migration:risky' => true,
'no_alias_functions' => true,
'void_return' => false,
'@PHPUnit84Migration:risky' => true,
])
->setRiskyAllowed(true)
->setFinder($finder)
;
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

Loading