502 Commits

Author SHA1 Message Date
  J. King dab4cb21e6 Geekttrss seems to work 1 week ago
  J. King d836d6a243 Add more clients to the untested list 1 week ago
  J. King 50b2ca4500 Document tokens and metadata in the manual 1 week ago
  J. King 9c0a3b7a57 Fix typo 2 weeks ago
  J. King 3ba82b7c6d Fix CLI bootstrap problem 2 weeks ago
  J. King fa6d641634 Implement CLI for tokens 2 weeks ago
  J. King 3795b1ccd8 Simplify CLI command processing 2 weeks ago
  J. King e8ed716ae6 Fix errors in CLI documentation 2 weeks ago
  J. King 97d1de46f8 Fill in upgrade notes 2 weeks ago
  J. King 68422390da Implement CLI for user metadata 2 weeks ago
  J. King b7c7915a65 Enforce admin rquirements in NCNv1 2 weeks ago
  J. King a760bf2ded Implement "t" and "f" booleans in TT-RSS 2 weeks ago
  J. King 9ad4a37ddf Tests and fixes for Miniflux with PDO 2 weeks ago
  J. King 687995c497 More potential Miniflux Web clints 2 weeks ago
  J. King 29761d767a Update documentation 2 weeks ago
  J. King dad74c2616 Implement Fever icons 2 weeks ago
  J. King 90034ac1f8 Style fixes 2 weeks ago
  J. King 211cea648e Implement TT-RSS API level 15 2 weeks ago
  J. King f2e5d567ec Update sample Web server configuration 2 weeks ago
  J. King eae0ba4b68 Tests fortoken operations 2 weeks ago
  J. King 9cc779a717 Import/export tests 2 weeks ago
  J. King 37fd2ad4e9 Tests for new exception features 2 weeks ago
  J. King 6c2de89f3e Revert copy-paste corruption 2 weeks ago
  J. King 54a6fcc0d6 Consolidate object factoriesinto one place 2 weeks ago
  J. King a0d563e468 Update dependencies 2 weeks ago
  J. King b4ae988b79 Prototype OPML handling 2 weeks ago
  J. King 681654f249 Documentation update 2 weeks ago
  J. King dd29ef6c1b Add feed refreshing stubs 2 weeks ago
  J. King ab1cf7447b Implement article marking 2 weeks ago
  J. King 334a585cb8 Implement single-entry querying 2 weeks ago
  J. King a7d05a7717 Feed- and category-specific entry list routes 2 weeks ago
  J. King 00ad1cc5b9 Last tests for article querying 2 weeks ago
  J. King d4a6909cf6 Positional article queries tests 3 weeks ago
  J. King e42e25d333 More article query tests 3 weeks ago
  J. King f7b3a473a9 Clarify ordering syntax rationale 3 weeks ago
  J. King af51377fe9 First set of article query tests 3 weeks ago
  J. King 23ca6bb77b Count articles without offset or limit 3 weeks ago
  J. King 0e7abfa8f9 Largely complete article querying 3 weeks ago
  J. King a43f8797c5 Add ability to sort by folder ID or name 3 weeks ago
  J. King ed27e0aaaa Sort nulls consistently 3 weeks ago
  J. King 9d7ada7f59 Partial implementation of article sorting 3 weeks ago
  J. King 007183450a Context and column list for article queries 3 weeks ago
  J. King 197cbba77d Document article column definitions 3 weeks ago
  J. King ddbcb598e8 Match more closely Miniflux query string behaviour 3 weeks ago
  J. King bb89083444 Perform strict validation of query parameters 3 weeks ago
  J. King 1e924bed83 Partial query string normalization 3 weeks ago
  J. King 3b2190ca10 Include folder names directly in subscription list 3 weeks ago
  J. King ad094f5217 Don't return icons without types at all 4 weeks ago
  J. King cd5f13f4b9 Tests for icon querying 4 weeks ago
  J. King 76f1cc8e91 Adjust users of subscriptionIcon 4 weeks ago
  J. King cc2672fb0a Improve icon fetching interface 4 weeks ago
  J. King 1eea3b3a4c Fix feed update test 4 weeks ago
  J. King 8e749bb73c Report 404 on icons for absence of data 1 month ago
  J. King bdf9c0e9d2 Prototype feed icon querying 1 month ago
  J. King 9197a8d08b Implement feed deletion 1 month ago
  J. King 8eebb75b18 Implement feed editing 1 month ago
  J. King 5a8a044a92 Implement single-feed querying 1 month ago
  J. King a646ad77b7 Use a read transaction when computing filter rules 1 month ago
  J. King cca4b205e4 Correct error output of getCategoryFeeds 1 month ago
  J. King a34edcb0d1 Last tests for feed creation 1 month ago
  J. King 7893b5f59d More feed adding tests 1 month ago
  J. King 36cc4928b9 Test feed fetching errors for Miniflux 1 month ago
  J. King 727864f401 Implement feed listing by category 1 month ago
  J. King 4972c79e32 Allow simpler feed exception creation 1 month ago
  J. King 6936f365e4 Add calls coming in next version of Miniflux 1 month ago
  J. King fd25be5c27 Basic tests for feed creation 1 month ago
  J. King e7b2f54183 Prototype feed creation 1 month ago
  J. King 14d2d19ae1 Tests for Miniflux feed listing 1 month ago
  J. King 2cf4bf0d4d Prototype Miniflux feed listing 1 month ago
  J. King 86897af0b3 Add ability to enable scraper 1 month ago
  J. King 7897585d98 Test scraping 1 month ago
  J. King 76f70119fd More work on scraping 1 month ago
  J. King 4cb23dd198 Partial implementation of proper content scraping 1 month ago
  J. King e74b44cc39 Change favicon to icon_url and add icon_id 1 month ago
  J. King 2536c9fe03 Last tests for article filters 1 month ago
  J. King 9f2b8d4f83 Imprement setting of filter rules 1 month ago
  J. King 618fd67f80 Set marks for filtered articles on feed refresh 1 month ago
  J. King 7a6186f2d7 Update Miniflux documentation 1 month ago
  J. King 097362881b Tests for filtering during feed parsing 1 month ago
  J. King a4146ec129 Start on test for filtering during feed parsing 1 month ago
  J. King 9e29235d87 Don't fetch from example.com during tests 1 month ago
  J. King 549c7bdc72 Style fixes 1 month ago
  J. King 4f34b4ff29 Rule refactoring 1 month ago
  J. King c1eff8479c Simplify configuration property caching 1 month ago
  J. King 6dba8aa66b Fixes for rules 1 month ago
  J. King 461e256052 Work around MySQL syntax weirdness 1 month ago
  J. King 47ae65b9d3 Function to apply filter rules 1 month ago
  J. King b12f87e231 Support Xdebug 3.x for coverage 1 month ago
  J. King ffc5579a7a Partial implementation of filter rule handling 1 month ago
  J. King 7e17332714 Implement marking all as read for Miniflux 1 month ago
  J. King 31f0539dc0 Implement Miniflux user deletion 1 month ago
  J. King bf95b134bd Fix up error codes for category changes 1 month ago
  J. King 197922f92f Implement Miniflux user creation 1 month ago
  J. King ee0c3c9449 Tests and fixes for user modification 1 month ago
  J. King cc648e1c3a Update tooling 1 month ago
  J. King 67f577d573 Bump emulated Miniflux version 1 month ago
  J. King f58005640a Prototype user modification 1 month ago
  J. King 2946d950f2 Forbid more user names 1 month ago
  J. King 405f3af257 Invalidate sessions and Fever passwords when renaming users 2 months ago
  J. King 5ec04d33c6 Add backend functionality to rename users 2 months ago
  J. King 88cf3c6dae Test filter rule retrieval 2 months ago
  J. King d66cf32c1f Style fixes 2 months ago
  J. King a81760e39d Aggressivly clean up hidden articles 2 months ago
  J. King ade0402210 Adjust TT-RSS to ignore hidden items 2 months ago
  J. King f33359f3e3 Move some Miniflux features to abstract handler 2 months ago
  J. King b7ce6f5c79 Adjust Fever to ignore hidden items 2 months ago
  J. King b2fae336e8 Adjust Nextcloud News to ignore hidden items 2 months ago
  J. King f0bfe1fdff Simplify editionLatest Database method 2 months ago
  J. King 8527c83976 Exclude hiddens from subscription unread count 2 months ago
  J. King 97010d8822 Tests for marking articles hidden 2 months ago
  J. King 86c4a30744 Adjust articleStarred function to discount hidden 2 months ago
  J. King ffc98daff3 Adjust article marking tests to account for new hidden mark 2 months ago
  J. King 8ae3740d5f Implement querying articles by hidden mark 2 months ago
  J. King d5cd5b6a17 Implement hidden marks 2 months ago
  J. King c43d0dcae3 Groundwork for filtering rules 2 months ago
  J. King 95a2018e75 Implement caategory marking as read 2 months ago
  J. King 5124f76b70 Implementcategory deletion 2 months ago
  J. King eb079166de Tests for category renaming 2 months ago
  J. King 3ebb46f48e Some work on categories 2 months ago
  J. King 2e6c5d2ad2 Query Miniflux categories 2 months ago
  J. King 4b73698381 More user query tests 2 months ago
  J. King ebdfad535c More Miniflux user tests 2 months ago
  J. King 7c841b5fc2 Test for listing users 2 months ago
  J. King 5c83655541 Add modification timestamp to user metadata 2 months ago
  J. King d85988f09d Prototype Miniflux user querying 2 months ago
  J. King 2eedf7d38c Finally fix MySQL 2 months ago
  J. King e9d449a8ba Fix user manager and tests 2 months ago
  J. King ce68566fcb Hopefully fix MySQL 2 months ago
  J. King a431243421 Fixes for MySQL and PostgreSQL 2 months ago
  J. King fcf1260dab Adjust database portion of user property manager 2 months ago
  J. King 978929aabd WIP redesign of user properties 2 months ago
  J. King 0f3e0411f0 Document some differences frrom Miniflux 2 months ago
  J. King 94154d4354 Implement Miniflux feed discovery 2 months ago
  J. King 669e17a1f6 Add ability to discover multiple feeds 2 months ago
  J. King 2a0d6e6599 OPTIONS tests 2 months ago
  J. King 7fa5523a7d Simplify handling of invalid paths and methods 2 months ago
  J. King def07bb1ad Tests for Miniflux authentication 2 months ago
  J. King 8c059773bb Update tooling 2 months ago
  J. King 90117b5cd7 Fix Miniflux strip value 3 months ago
  J. King 06dee77bac First tests for Miniflux 3 months ago
  J. King f6cd2b87ce Port token data from Microsub branch 3 months ago
  J. King d4bcdcdadd Fix TTRSS coverage 3 months ago
  J. King d3ebb1bd56 Last set of tests for user management. Fixes #180 3 months ago
  J. King e16df90bae Style fixes 3 months ago
  J. King 180b4ecc9b More user tests 3 months ago
  J. King 27d9c046d5 More work on user management 3 months ago
  J. King 7f2117adaa Differentiate between duplicate/missing users and other failure modes 3 months ago
  J. King 351f972512 Tests for internal user driver 3 months ago
  J. King 4baf5fa2f9 Tests for new user functionality in Database 3 months ago
  J. King dde9d7a28a Refinements to user manager 3 months ago
  J. King eb2fe522bf Last bits of the new user metadata handling 3 months ago
  J. King 5a17efc7b5 Clean up user driver API 3 months ago
  J. King 771f79323c Strip out remnants of the authorizer 3 months ago
  J. King 576d7e16a8 Fix handling of bytea-typed nulls 3 months ago
  J. King 1b1789988a More client compatibility updates 3 months ago
  J. King 532ce4a502 Prototype changes to user management 3 months ago
  J. King ee050e505c Add more Android clients to manual 3 months ago
  J. King 9fb185a8e2 Add TT-RSS Web client to manual 3 months ago
  J. King b62c11a43e Lasts tests for icon cache; fixes #177 3 months ago
  J. King 1d3725341a Fix detection of Xdebug for coverage 3 months ago
  J. King 311910795a More tests for icon cache 3 months ago
  J. King 3d3c20de5c Don't anticipate API features 3 months ago
  J. King 4d532cba3f Initial Miniflux documentation 3 months ago
  J. King e861cca53d Integrate schema change necessary for microsub 3 months ago
  J. King b24c469dca Update changelog 3 months ago
  J. King 8f739cec85 Excluse empty-string URLs from icons table 3 months ago
  J. King 424b14d2b4 Clean up use of subscriptionFavicon 3 months ago
  J. King dd1a80f279 Consolidate subscription icon querying 3 months ago
  J. King 4fc208d940 More consistent icon API 3 months ago
  J. King c3a57ca68b Tests for icon cache population 3 months ago
  J. King bd650765e1 Generalize icon fetching tests 3 months ago
  J. King 50fd127ac4 Test for icon fetching 3 months ago
  J. King 7c40c81fb3 Add icons to the database upon feed update 3 months ago
  J. King c25782f98c Partial icon handling skeleton 3 months ago
  J. King af675479b8 Remove excess whitespace 3 months ago
  J. King 2438f35f3d Add icon cache to database 3 months ago
  J. King 5e60da00a9 Merge branch 'master' into miniflux 3 months ago
  J. King b5f959aabf Fix blob tests 3 months ago
  J. King 41bcffd6fb Correctly query PostgreSQL byte arrays 3 months ago
  J. King c21ae3eca9 Correctly send binary data to PostgreSQL 3 months ago
  J. King c92bb12a11 Prototype Miniflux dispatcher 3 months ago
  J. King 905f8938e2 Typo 3 months ago
  J. King 8ad7fc81a8 Initially mapping out of Miniflux API 3 months ago
  J. King 16d2e01668 New schema for PostgreSQL and MySQL 3 months ago
  J. King 4db1b95cf4 Add numeric IDs and other Miniflux data to SQLite schema 3 months ago
  J. King 3ac010d5b6 Fix tests in absence of database extensions 3 months ago
  J. King b58a326461 Prepare for schema changes 3 months ago
  J. King e9682bc601 Correct typos 4 months ago
  J. King 5a09dcb3ed Update changelog 4 months ago
  J. King e3ebd89aa8 Add NewsFlash to supported clients 4 months ago
  J. King 0117e7f9bf Relax Fever's HTTP correctness for client compat 4 months ago
  J. King 7ef02e1d65 Revert wishful thinking 4 months ago
  J. King 3d909da1e5 Update iOS/macOS client URLs 4 months ago
  J. King 6520ed38fb Update dependencies 4 months ago
  J. King 9b11001402 Fix sample Nginx configuration 4 months ago
  J. King 2e0ed5e923 Add reference to MariaDB missing features 5 months ago
  J. King afbf3be031 Use 'union all' instead of 'union' in queries 5 months ago
  J. King 6ee7ca4aa4 Update PicoFeed to latest release version 5 months ago
  J. King 9bc1373998 Version bump 5 months ago
  J. King 0f3ada598e Work around Picofeed bug 5 months ago
  J. King d29917caf8 Update Yarn again 5 months ago
  J. King e75d15e552 Update dependencies 5 months ago
  J. King 77aef9c995 Yarn update 7 months ago
  J. King ee549cdee7 Appease GitHub (yet again) 8 months ago
  J. King 2620314583 GitHub should now be kept in sync at all times 10 months ago
  J. King 20fe65b67e Make changelog point to manual instead of readme 10 months ago
  J. King 66a4f71ef3 Minor simplification 10 months ago
  J. King 5f35a680e3 Appease GitHub (again) 11 months ago
  J. King c1e27684d4 Appease GitHub 11 months ago
  J. King 1268e5fd73 Finally fix DST error in tests 11 months ago
  J. King 7777ff962f Group more style rules under PSR-12 1 year ago
  J. King e60f7ea03f Add class constant visibility 1 year ago
  J. King bc53a2d24a Style fixes 1 year ago
  J. King a7f69c845f Use a more specific house style 1 year ago
  J. King 3aa17ee70f Whitespace 1 year ago
  J. King e8091fa740 Speed up coverage slightly. 1 year ago
  J. King 9696d55b31 Prepare ugfix release 1 year ago
  J. King 670fb61299 Merge branch 'php7.1' 1 year ago
  J. King 1d514e4739 Remove forked picofeed repository 1 year ago
  J. King cf4a9e6436 Use archived copy of MySQL critique 1 year ago
  J. King 39a1895867 Refine and cover new Guzzle error handling 1 year ago
  J. King cb41912f36 Merge branch 'master' into php7.1 1 year ago
  J. King d7e10e40ee Prefer PCOV for code coverage 1 year ago
  J. King 04878bda9d Documentation changes 1 year ago
  J. King 06d3af0ac3 Fix remaining Picofeed-related test failures 1 year ago
  J. King 9cb7cf485d Style fix 1 year ago
  J. King e29c573210 Update tools 1 year ago
  J. King 49d003082d Fix problems with nicolus/picofeed 1 year ago
  J. King e583ffea67 Start on integrating well-maintained picofeed fork 1 year ago
  J. King b5f118e8cb Cleanup 1 year ago
  J. King bbace7a0ac Use void and nullable return types where practical 1 year ago
  J. King 5838af892f Replace references to Zend with Laminas 1 year ago
  J. King 0565553d4a Change PHP requirement in manual 1 year ago
  J. King 9e1087914c Change tool dependencies to "dev" type 1 year ago
  J. King 2fa2799b64 Require PHP 7.1 in Composer 1 year ago
  J. King 14ef33879b Re-arrange database tests by engine 1 year ago
  J. King c4ee7254cd Refactor some tests to use data providers 1 year ago
  J. King fb2602fe04 Don't load actual configuration during CLI tests 1 year ago
  J. King 38501ce4f2 Add Newsie to documented clients 1 year ago
  J. King cca56b09fc Order failing tests first 1 year ago
  J. King 4421a9e510 Offload coveraage whitelisting to xdebug 1 year ago
  J. King 524b1ca140 Merge branch 'master' into phpunit-8 1 year ago
  J. King 3ee89bf669 Version bump 1 year ago
  J. King c9d4540616 Merge branch 'mysql' 1 year ago
  J. King 3cb8dfafe2 Change download URL in manual 1 year ago
  J. King bbe70b6abc Corect CamelCase references to Nextcloud 1 year ago
  J. King 794fb506a5 Widen URL field 1 year ago
  J. King 484510cf8c Expand text fields other than user id and feed URL 1 year ago
  J. King e3144ecbf5 Update tool dependencies 1 year ago
  J. King 5df89009e6 Merge branch 'master' of https://code.mensbeam.com/MensBeam/arsse 1 year ago
  J. King 15de8c2320 Fix PostgreSQL connection error message 1 year ago
  J. King f4b08170bf Fix MySQL schema 1 year ago
  J. King 568e6e4660 Delete dangling MySQL records when updating 1 year ago
  J. King 737dd9f6b8 Fix foreign keys in MySQL 1 year ago
  J. King c1a3e64bfa Fix new tests to work with PHPUnit 8 1 year ago
  J. King de424e42f6 Merge branch 'master' into phpunit-8 1 year ago
  J. King c6b79d49ba Documentation corrections 1 year ago
  J. King 5ede4cbdb2 Clarify coverage requirements 1 year ago
  J. King bbc96e4f37 Remove reference to obsolete CSS-only manual task 1 year ago
  J. King 733f0d7fd5 Fix typo 1 year ago
  J. King 0e5b242c67 Version bump 1 year ago
  J. King c59cdfef76 Whitespace fixes 1 year ago
  J. King 71c7cd8fb1 Full coverage! Fixes #66 1 year ago
  J. King 728eecfbb5 Additional service tests 1 year ago
  J. King bad86cedb3 Tests for bootstrapper 1 year ago
  J. King 7ac4fb4715 Clarify PDO workaround for SQLite 1 year ago
  J. King 3ef1177f06 Remove driver lists 1 year ago
  J. King b6dd8ab20d Improvements to and proper tests for query builder 1 year ago
  J. King c706a76057 Simplify array flattening 1 year ago
  J. King c3643fba10 Tests for URL::absolute() 1 year ago
  J. King 64c3ec3571 Coverage fixes and OPML bugfix 1 year ago
  J. King 17a2fa96f8 Upgrade to PHPUnit 8 1 year ago
  J. King b8b8a6aa70 Also adjust test for MySQL connection failure 1 year ago
  J. King cb1039326c Fix PostgreSQL tests when using "trust" authentication 1 year ago
  J. King cf5c08459f Remove unused Daux libs 1 year ago
  J. King 5d70f9fc11 Update dependencies 1 year ago
  J. King 9461cefc35 Upgrade Daux to 0.11 1 year ago
  J. King 1809fb254e Deal with trailing whitespace in media types 1 year ago
  J. King 4f5a8e3180 Make media type checking more robust 1 year ago
  J. King 5f993187ea Be explicit with HTTP challenge character encoding 1 year ago
  J. King c5337b37b4 Consolidate creation of synthetic server requests 1 year ago
  J. King 67bde97e0c Update changelog 1 year ago
  J. King a143c86136 Set up test better 1 year ago
  J. King 3da884dfbc Don't embed ito SQL strings with question marks 1 year ago
  J. King be5ad50f54 Tests for text search clause generator 1 year ago
  J. King fb6e2babb9 Change some conditions to asserts 1 year ago
  J. King d0f780d4e6 Unit tests for IN() clause generator 1 year ago
  J. King 3aac583c00 Add Microsub to possible future APIs 1 year ago
  J. King 5620070106 Update changelog 1 year ago
  J. King b0517ddda1 Merge branch 'urlnorm' 1 year ago
  J. King c9e86e71c4 More style fixes 1 year ago
  J. King 53aa7a4d0d Style fixes 1 year ago
  J. King d9c769d40e Remove Target class 1 year ago
  J. King 6235cb0be6 Fix errors in last commit 1 year ago
  J. King 29667464a1 Remove unnecessary namespace imports 1 year ago
  J. King 0eb0fbcc0d Also normalize relative URLs 1 year ago
  J. King 3439895779 Normalize URLs before establishing feed uniqueness 1 year ago
  J. King a175561574 Documentation corrections 1 year ago
  J. King bd71ddb929 Percent-encoding and IPv6 normalization 1 year ago
  J. King 03262e7f44 Typo fix 1 year ago
  J. King f159965b56 Add more cautious about using MySQL 1 year ago
  J. King 3f3a571fc1 Go back to mainline Daux 1 year ago
  J. King 12fe786a2f Cleanup 1 year ago
  J. King d4802bcdb6 Handle IDNs 1 year ago
  J. King dc750acf07 Handle ports, paths, and credentials correctly 1 year ago
  J. King 13c27c2536 Start on URL normalizer 1 year ago
  J. King f688155ca4 Note manual in changelog 1 year ago
  J. King e5696fdf44 Merge branch 'manual' 1 year ago
  J. King bab4174a17 Move database driver helps out of test cases 1 year ago
  J. King fa3cfcd589 Correct error in stand-alone Nginx sample 1 year ago
  J. King 5bf791709b Add an index for the "Getting Started" section; other tweaks 1 year ago
  J. King 3ea2eeb817 Clarify the list of requirements is informational 1 year ago
  J. King d5af499a6e Typo 1 year ago
  J. King 1ce54372b7 Add a mission statement of sorts 1 year ago
  J. King e122f97036 Standardize section capitalization 1 year ago
  J. King d7f1963d7f Move untested clients to an untested section 1 year ago
  J. King 2c1dcdcd6d Update Daux theme using custom changes for now 1 year ago
  Dustin Wilson a24bfa0683 Code blocks are now properly themed 1 year ago
  J. King f102992d20 Typos 1 year ago
  J. King a563d174d5 Tooling documentation 1 year ago
  J. King 3ff93113fa Documentation on repo structure 1 year ago
  J. King 934c762cb8 Avoid problematic use of realpath 1 year ago
  J. King 06b9049515 Update Daux and manual theme 1 year ago
  J. King ca49785f6f Anticipate the next release of Daux 1 year ago
  J. King 2a19777537 Update Daux 1 year ago
  J. King 294f3648a2 Fix JS bug in Daux 1 year ago
  J. King 440ea11e27 Clarify highlight.js download process 1 year ago
  Dustin Wilson 705e506bfc Manual theme design iteration 1 year ago
  Dustin Wilson edf92b603b Preliminary work on manual theme design 1 year ago
  J. King 16530b9a66 Probably test for feed redirection bug 1 year ago
  J. King cfef75ccba Don't update the feed URL when fetching 1 year ago
  J. King 265f3a1b6d Correct error in Nginx example 1 year ago
  J. King 262980d564 Process color() functions in stylesheet 1 year ago
  J. King b8b559b0f8 Correct spuriously failing tests 1 year ago
  J. King 150e301378 Fix manual cleanup 1 year ago
  J. King ba05d53626 Rededicate the README file as a programmer's guide 1 year ago
  J. King 987ee631ab Add manual to packaging 1 year ago
  J. King f360c64327 Slight fixes to Robo and PHPUnit 1 year ago
  J. King 246263fa04 Fill out general info 1 year ago
  J. King e7e4c823e4 Clean up theme files after generation 1 year ago
  J. King c334390db1 Robo task for rebuilding stylesheet only 1 year ago
  J. King 6f8182b940 Working theme builder 1 year ago
  J. King b3566f8d48 Use Robo to extract zip archive 1 year ago
  J. King b514ac983b Rely on Zip extension for extracting highlight.js 1 year ago
  J. King 7dee5498d8 Procedure for downloading highlight.js 1 year ago
  J. King bacce0461a Fix JS dependency graph 1 year ago
  J. King 8bbcae4aa4 First attempt at a custom Daux theme 1 year ago
  J. King c935091d99 Fix bad link 1 year ago
  J. King 3507a74ab0 Upgrade notes 1 year ago
  J. King 67cdf52d3a Typo 1 year ago
  J. King 899f28dda5 Documentation for service and cron 1 year ago
  J. King 1ef669a464 Documentation for user management and OPML 1 year ago
  J. King daa3be90c6 Grammar fix 1 year ago
  J. King 91b9bf808d Correct outdated requirements 1 year ago
  J. King 7f9f11bbf4 Consolidate configuration samples 1 year ago
  J. King e76871c567 Changelog so far 1 year ago
  J. King d9d9394c97 Information on the configuration file 1 year ago
  J. King 5402a1688b Configuration sample for Apache 1 year ago
  J. King 87cd879d8f More Fever details 1 year ago
  J. King 580342006e Sample configuration for Nginx 1 year ago
  J. King 6705ea1585 Re-organize sections 1 year ago
  J. King 4fd060f001 Various documentation tweaks 1 year ago
  J. King 7d82725a03 Add Liferea to clients list 1 year ago
  J. King a7ae38589b Database documentation corrections 1 year ago
  J. King 05fe34fec2 Sdd note about cron 1 year ago
  J. King 4837aa2d3d Minor enhancements to instructions 1 year ago
  J. King 5897562685 Installation instructions 1 year ago
  J. King f2b456d709 Start on installation page 1 year ago
  J. King 96342eccb1 Tweaks 1 year ago
  J. King 6bb382e7c4 Documentation for databases 1 year ago
  J. King f0c99edd22 Various corrections 1 year ago
  J. King 8a184ae99d Move inline style rules out to a stylesheet 1 year ago
  J. King eb120b4629 Fetch in three hours if caching is via etag 1 year ago
  J. King 137be8bde2 Fix whitespace 1 year ago
  J. King 45a43488ee Increase compatibility with misbehaving Fever clients 1 year ago
  J. King db5bcb78a3 Fix lookup of evergreen tokens 1 year ago
  J. King 85fa1e48ab Add Fever to list of protocols 1 year ago
  J. King f50a78eafa Add basic Fever data; expand client list 1 year ago
  J. King d6220c1bbb Merge branch 'master' into manual 1 year ago
  J. King 77b719660b Date 0.8.0 release 1 year ago
  J. King 9f7e1c915c Start after PostgreSQL and MySQL when relevant 1 year ago
  J. King 4282ba1c26 Version bump 1 year ago
  J. King f7240301e4 Basic database maintenance 1 year ago
  J. King cef31907d3 Cron functionality is not new 1 year ago
  J. King 422eaf9605 Invalidate sessions on password change; closes #170 1 year ago
  J. King be92d2f052 Documentation update; fixes #168 1 year ago
  J. King faf524c54f CLI test for import 1 year ago
  J. King 13b76dea0c Tests for generic importing 1 year ago
  J. King 0e95892aea Do not necessarily ignore blank tags in import 1 year ago
  J. King 2aa16f3405 Merge branch 'fever' into opml 1 year ago
  J. King 56bb460820 Test answering OPTIONS requests in Fever 1 year ago
  J. King 61b942df70 Defer Fever favicons to a future release 1 year ago
  J. King 0480465e7e Test Fever XML responses 1 year ago
  J. King 8f9678b8a4 Tests for baasic import errors 1 year ago
  J. King 103755cfb4 Test fixture for import tests 1 year ago
  J. King 30cede9ea4 Make OPML parser protected 1 year ago
  J. King 61fe673e20 Skeleton for import tests 1 year ago
  J. King cb71a9efd7 Make database connections for testing configurable 1 year ago
  J. King 2628ff7bf4 Make database test helpers generic 1 year ago
  J. King 12ef3e649f Mock AbstractImportExport directly 1 year ago
  J. King 7046ce163c More format-neutral code out of OPML class 1 year ago
  J. King 92b1626dba Remove most unused features of the query builder 1 year ago
  J. King 62fe3a7298 Fix case of vfsstream tool dependency 1 year ago
  J. King 54aaab50b5 Update tools 1 year ago
  J. King c1e13e6199 Tests for file imports 1 year ago
  J. King be5a1fb94f Mixed content test for OPML 1 year ago
  J. King 0f7d49c21e More OPML tests and fixes 1 year ago
  J. King 644750487c Command line documentation and fixes 1 year ago
  J. King a30114807f Tests and fixed for OPML feed parsing 1 year ago
  J. King cdd9f4dfbe More OPML parser tests 1 year ago
  J. King 5ba009cfed First set of OPML parser tests 1 year ago
  J. King 6ef13d0880 Style fixes 1 year ago
  J. King b9821d925a CLI for OPML import, and proper exceptions 1 year ago
  J. King 67492cd7ef Prototype OPML importer routine 1 year ago
  J. King 3899ee6b4e Allow for replacing label and tag associations 1 year ago
  J. King 2af223753d Function to add a feed without a subscription 1 year ago
  J. King ceecd58393 OPML parsing comments and minr fixes 1 year ago
  J. King 825c286e5b Prototype OPML import parser 1 year ago
  J. King 2d18be959c Tests for undoing read marks 1 year ago
  J. King daeff63239 Test basic Fever responses 1 year ago
  J. King c55a960b85 Slight cleanup 1 year ago
  J. King efd8492573 Tests for various invalid requests 1 year ago
  J. King 8532c581a8 Handle OPTIONS requests in Fever 1 year ago
  J. King afb95e53b0 Initial implementation of read-undo 1 year ago
  J. King 52bc5fbda6 Tests for simple marking 1 year ago
  J. King be4f3b0657 Merge branch 'master' into fever 1 year ago
  J. King 61abf7ee7c Upgrade to Diactoros 2.x 1 year ago
  J. King 15915a4393 Initial implementation of simple marks 1 year ago
  J. King c783ec4357 Prototype XML output for Fever 1 year ago
  J. King 98fc3f4940 Test for hot links 1 year ago
  J. King e8f4732b1f Tests for saved and unread item ID lists 1 year ago
  J. King 4ce371ece6 Tests and fixes for Fever item listing 1 year ago
  J. King e3d2215920 Style fixes 1 year ago
  J. King 0ef606aa03 Return string list of item IDs 1 year ago
  J. King 0752e9cf3d Implement Fever sync 1 year ago
  J. King 982f09c9aa Upgrade notes 1 year ago
  J. King 7c85e837df Documentation update 1 year ago
  J. King c6d241e653 Implement Fever item list 1 year ago
  J. King 12f23ddc16 Updated tests for arbitrary sorting 1 year ago
  J. King f72c85c9f6 Hopefully working but maybe broken custom sorting 1 year ago
  J. King 156ce2d099 Fix Unix Robo script 1 year ago
  J. King 4b133bddd6 Prototype arbitrary result ordering 1 year ago
  J. King 74fc39fca0 Implement multi-folder context option 1 year ago
  J. King cce1089e10 Handle edge case with folder 0 1 year ago
  J. King 98f6fca7e3 Enforce minimum array size (for now) 1 year ago
  J. King ef1b761f95 Implement most multiple-item context options 1 year ago
  J. King ba32ad2f17 Add context options for multiple tags, labels, etc 1 year ago
  J. King 77efaa7b41 CLI command for exporting OPML and sundry cleanup 1 year ago
  J. King deea294f8a Add export-to-file wrapper for OPML 1 year ago
  J. King 35e79d53a9 OPML export fixes, with tests 1 year ago
  J. King 17fd909335 Add DOM extension as a direct dependency 1 year ago
  J. King d63edf541f Insert folders into OPML before subscriptions 1 year ago
  J. King 25b7b47e0a Prototype OPML exporter 1 year ago
  J. King 5d994f3dad Normalize Fever input consistently 1 year ago
  J. King de615c671a Tests and fixed for Fever feeds and groups 1 year ago
  J. King 7faec3b0db Fever fixes 1 year ago
  J. King d8407330a0 Add a function to get when feeds were last updated 1 year ago
  J. King acb3973149 Prototype implementation of Fever groups and feeds 1 year ago
  J. King 9c61f967e3 Correct CLI password clearing 1 year ago
  J. King 54be5997d1 CLI tests for password changing and clearing 1 year ago
  J. King a7fe879174 Fix CLI auth test 1 year ago
  J. King bf3bf9589f Merge branch 'master' into fever 1 year ago
  J. King 8020457820 Update dependencies 1 year ago
  J. King b8640d73f9 Update PHPUnit 1 year ago
  J. King 22c2629078 Partial tests for new CLI features 1 year ago
  J. King f4d4feb69c Suppress TLS error from mock server 1 year ago
  J. King 7d95e8fc09 Split Fever user management from protocol handler 1 year ago
  J. King 1ce95ef4d9 Add means of testing Fever authentication 1 year ago
  J. King e45ba3f0ea Add means of unsetting a password in the backend 1 year ago
  J. King 5bf0b67ec3 Increase file descriptor limit for Robo on Linux 1 year ago
  J. King 94314f3e6d Fix test errors when PostgreSQL or MySQL are not available 1 year ago
  J. King fe008d4343 A few more Fever authentication tests 1 year ago
  J. King 3b28634447 Verify even in exceptional cases 1 year ago
  J. King 07122b524a Rename Fever user functions for consistency 1 year ago
  J. King f51d20a863 Unix Robo fixes 1 year ago
  J. King 9ebaa20633 Tests for Fever password creation and removal 1 year ago
  J. King 9168155244 Add method to unset a Fever password 1 year ago
  J. King 1e2d595992 Full set of authentication tests for Fever 1 year ago
  J. King d59223bbcb First authentication test for Fever 1 year ago
  J. King c32fdf59cd Add details on HTTP authentication in client list 1 year ago
  J. King b02c910b1e Make token creation check that the user exists 1 year ago
  J. King 3aa2b62d02 Basic Fever skeleton 1 year ago
  J. King 38bdde1167 Add access tokens to the db, with relevant code 1 year ago
  J. King 5de1844f6d Add article selection by tag 2 years ago
  J. King e6f70527cf Simplify tag summary 2 years ago
  J. King ff0c9a3a55 Add functionality for interacting with subscription tags 2 years ago
  J. King 4945f8baa3 Clarify various SQL queries 2 years ago
  J. King ed22090e49 Work around various SQLite-related problems 2 years ago
  J. King fb1bdbfb37 Database schema for subscription tags 2 years ago
  J. King 9ef4b4fdfb Update TT-RSS documentation 2 years ago
  J. King 75cba3ca10 Fix fragment identifiers in manual internal links 2 years ago
  J. King a467115d59 Document TTRSS authentication modes better 2 years ago
  J. King 5885e14566 Add more compatible clients 2 years ago
  Dustin Wilson ee8701320d Added clients to documentation 2 years ago
  J. King e07253867c Add served manual to Robo tasks 2 years ago
  J. King 6ce1f68ed7 Document supported protocols 2 years ago
  J. King 94ba58fa60 Use latest version of Daux 2 years ago
  J. King f5c5d49d97 Document SQL timeout changes 2 years ago
  J. King 41daf4d176 Merge branch 'master' into manual 2 years ago
  J. King 00ca726e12 Partial first draft of a manual, generated using Daux 2 years ago
  J. King 4191f77094 Add daux as a dev dependency 2 years ago
  J. King 6cd81e5656 Temporary list of macOS and iOS clients 2 years ago
331 changed files with 23482 additions and 7596 deletions
Split View
  1. +3
    -1
      .gitignore
  2. +58
    -4
      .php_cs.dist
  3. +91
    -9
      CHANGELOG
  4. +75
    -164
      README.md
  5. +118
    -42
      RoboFile.php
  6. +61
    -0
      UPGRADING
  7. +4
    -3
      arsse.php
  8. +13
    -6
      composer.json
  9. +894
    -90
      composer.lock
  10. +23
    -0
      dist/apache.conf
  11. +2
    -2
      dist/arsse.service
  12. +0
    -13
      dist/nginx-fcgi.conf
  13. +48
    -24
      dist/nginx.conf
  14. +15
    -0
      docs/config.json
  15. +15
    -0
      docs/en/010_About.md
  16. +16
    -0
      docs/en/020_Getting_Started/010_Requirements.md
  17. +41
    -0
      docs/en/020_Getting_Started/020_Download_and_Installation.md
  18. +107
    -0
      docs/en/020_Getting_Started/030_Web_Server_Configuration.md
  19. +16
    -0
      docs/en/020_Getting_Started/040_Database_Setup/000_SQLite.md
  20. +37
    -0
      docs/en/020_Getting_Started/040_Database_Setup/010_PostgreSQL.md
  21. +42
    -0
      docs/en/020_Getting_Started/040_Database_Setup/020_MySQL.md
  22. +11
    -0
      docs/en/020_Getting_Started/040_Database_Setup/index.md
  23. +418
    -0
      docs/en/020_Getting_Started/050_Configuration.md
  24. +3
    -0
      docs/en/020_Getting_Started/index.md
  25. +88
    -0
      docs/en/025_Using_The_Arsse/010_Managing_Users.md
  26. +54
    -0
      docs/en/025_Using_The_Arsse/020_Importing_and_Exporting.md
  27. +49
    -0
      docs/en/025_Using_The_Arsse/030_Keeping_Newsfeeds_Up_to_Date.md
  28. +12
    -0
      docs/en/025_Using_The_Arsse/040_Upgrading_to_a_New_Version.md
  29. +20
    -0
      docs/en/025_Using_The_Arsse/index.md
  30. +61
    -0
      docs/en/030_Supported_Protocols/005_Miniflux.md
  31. +38
    -0
      docs/en/030_Supported_Protocols/010_Nextcloud_News.md
  32. +95
    -0
      docs/en/030_Supported_Protocols/020_Tiny_Tiny_RSS.md
  33. +44
    -0
      docs/en/030_Supported_Protocols/030_Fever.md
  34. +8
    -0
      docs/en/030_Supported_Protocols/index.md
  35. +472
    -0
      docs/en/040_Compatible_Clients.md
  36. +1
    -0
      docs/index.md
  37. +2
    -0
      docs/theme/arsse/arsse.css
  38. +9
    -0
      docs/theme/arsse/config.json
  39. +2
    -0
      docs/theme/arsse/daux.min.js
  40. BIN
      docs/theme/arsse/fonts/cabin-bold.woff
  41. BIN
      docs/theme/arsse/fonts/cabin-bold.woff2
  42. BIN
      docs/theme/arsse/fonts/cabin-italic.woff
  43. BIN
      docs/theme/arsse/fonts/cabin-italic.woff2
  44. BIN
      docs/theme/arsse/fonts/cabin-regular.woff
  45. BIN
      docs/theme/arsse/fonts/cabin-regular.woff2
  46. BIN
      docs/theme/arsse/fonts/leaguegothic.woff
  47. BIN
      docs/theme/arsse/fonts/leaguegothic.woff2
  48. +328
    -0
      docs/theme/src/arsse.scss
  49. +34
    -5
      lib/AbstractException.php
  50. +5
    -2
      lib/Arsse.php
  51. +326
    -64
      lib/CLI.php
  52. +60
    -67
      lib/Conf.php
  53. +5
    -5
      lib/Context/Context.php
  54. +74
    -5
      lib/Context/ExclusionContext.php
  55. +1344
    -597
      lib/Database.php
  56. +3
    -3
      lib/Db/AbstractDriver.php
  57. +1
    -1
      lib/Db/AbstractResult.php
  58. +24
    -39
      lib/Db/AbstractStatement.php
  59. +21
    -12
      lib/Db/Driver.php
  60. +25
    -11
      lib/Db/MySQL/Driver.php
  61. +2
    -4
      lib/Db/MySQL/PDODriver.php
  62. +1
    -3
      lib/Db/MySQL/Result.php
  63. +4
    -8
      lib/Db/MySQL/Statement.php
  64. +2
    -2
      lib/Db/PDODriver.php
  65. +1
    -3
      lib/Db/PDOResult.php
  66. +3
    -3
      lib/Db/PDOStatement.php
  67. +17
    -10
      lib/Db/PostgreSQL/Driver.php
  68. +2
    -5
      lib/Db/PostgreSQL/PDODriver.php
  69. +26
    -0
      lib/Db/PostgreSQL/PDOResult.php
  70. +14
    -0
      lib/Db/PostgreSQL/PDOStatement.php
  71. +15
    -3
      lib/Db/PostgreSQL/Result.php
  72. +5
    -6
      lib/Db/PostgreSQL/Statement.php
  73. +0
    -2
      lib/Db/ResultAggregate.php
  74. +1
    -3
      lib/Db/ResultEmpty.php
  75. +0
    -4
      lib/Db/SQLState.php
  76. +2
    -0
      lib/Db/SQLite3/AbstractPDODriver.php
  77. +17
    -12
      lib/Db/SQLite3/Driver.php
  78. +2
    -1
      lib/Db/SQLite3/ExceptionBuilder.php
  79. +3
    -6
      lib/Db/SQLite3/PDODriver.php
  80. +1
    -1
      lib/Db/SQLite3/PDOStatement.php
  81. +1
    -3
      lib/Db/SQLite3/Result.php
  82. +6
    -10
      lib/Db/SQLite3/Statement.php
  83. +9
    -9
      lib/Db/Statement.php
  84. +13
    -0
      lib/Factory.php
  85. +80
    -37
      lib/Feed.php
  86. +36
    -7
      lib/Feed/Exception.php
  87. +167
    -0
      lib/ImportExport/AbstractImportExport.php
  88. +2
    -2
      lib/ImportExport/Exception.php
  89. +155
    -0
      lib/ImportExport/OPML.php
  90. +5
    -5
      lib/Lang.php
  91. +5
    -5
      lib/Misc/Date.php
  92. +22
    -0
      lib/Misc/HTTP.php
  93. +23
    -81
      lib/Misc/Query.php
  94. +170
    -0
      lib/Misc/URL.php
  95. +50
    -28
      lib/Misc/ValueInfo.php
  96. +37
    -26
      lib/REST.php
  97. +9
    -13
      lib/REST/AbstractHandler.php
  98. +432
    -0
      lib/REST/Fever/API.php
  99. +34
    -0
      lib/REST/Fever/User.php
  100. +19
    -0
      lib/REST/Miniflux/ErrorResponse.php

+ 3
- 1
.gitignore View File

@ -2,12 +2,15 @@
/vendor/
/vendor-bin/*/vendor
/node_modules
/documentation/
/manual/
/tests/coverage/
/arsse.db*
/config.php
/.php_cs.cache
/yarn-error.log
/tests/.phpunit.result.cache
# Windows files
@ -23,7 +26,6 @@ $RECYCLE.BIN/
.DS_Store
.AppleDouble
.LSOverride
Icon
._*
.Spotlight-V100
.Trashes


+ 58
- 4
.php_cs.dist View File

@ -3,6 +3,7 @@
* Copyright 2017 J. King, Dustin Wilson et al.
* See LICENSE and AUTHORS files for details */
declare(strict_types=1);
namespace JKingWeb\Arsse;
const BASE = __DIR__.DIRECTORY_SEPARATOR;
@ -15,10 +16,63 @@ $paths = [
BASE."tests",
];
$rules = [
// house rules where PSR series is silent
'align_multiline_comment' => ['comment_type' => "phpdocs_only"],
'array_syntax' => ['syntax' => "short"],
'binary_operator_spaces' => [
'default' => "single_space",
'operators' => ['=>' => "align_single_space"],
],
'cast_spaces' => ['space' => "single"],
'concat_space' => ['spacing' => "none"],
'list_syntax' => ['syntax' => "short"],
'magic_constant_casing' => true,
'magic_method_casing' => true,
'modernize_types_casting' => true,
'native_function_casing' => true,
'native_function_type_declaration_casing' => true,
'no_binary_string' => true,
'no_blank_lines_after_phpdoc' => true,
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
'no_extra_blank_lines' => true, // this could probably use more configuration
'no_mixed_echo_print' => ['use' => "echo"],
'no_short_bool_cast' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_unneeded_control_parentheses' => true,
'no_unneeded_curly_braces' => true,
'no_unused_imports' => true,
'no_whitespace_before_comma_in_array' => true,
'normalize_index_brace' => true,
'object_operator_without_whitespace' => true,
'pow_to_exponentiation' => true,
'set_type_to_cast' => true,
'standardize_not_equals' => true,
'trailing_comma_in_multiline_array' => true,
'unary_operator_spaces' => true,
'yoda_style' => false,
// PSR standard to apply
'@PSR2' => true,
'braces' => ['position_after_functions_and_oop_constructs' => "same"],
'function_declaration' => ['closure_function_spacing' => "none"],
];
// PSR-12 rules; php-cs-fixer does not yet support PSR-12 natively
'compact_nullable_typehint' => true,
'declare_equal_normalize' => ['space' => "none"],
'function_typehint_space' => true,
'lowercase_cast' => true,
'lowercase_static_reference' => true,
'no_alternative_syntax' => true,
'no_empty_statement' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_whitespace_in_blank_line' => true,
'return_type_declaration' => ['space_before' => "none"],
'single_trait_insert_per_statement' => true,
'short_scalar_cast' => true,
'visibility_required' => ['elements' => ["const", "property", "method"]],
// house exceptions to PSR rules
'braces' => ['position_after_functions_and_oop_constructs' => "same"],
'function_declaration' => ['closure_function_spacing' => "none"],
'new_with_braces' => false, // no option to specify absence of braces
];
$finder = \PhpCsFixer\Finder::create();
foreach ($paths as $path) {
@ -28,4 +82,4 @@ foreach ($paths as $path) {
$finder = $finder->in($path);
}
}
return \PhpCsFixer\Config::create()->setRules($rules)->setFinder($finder);
return \PhpCsFixer\Config::create()->setRiskyAllowed(true)->setRules($rules)->setFinder($finder);

+ 91
- 9
CHANGELOG View File

@ -1,3 +1,85 @@
Version 0.9.0 (????-??-??)
==========================
New features:
- Support for the Miniflux protocol (see manual for details)
- Support for API level 15 of Tiny Tiny RSS
- Support for feed icons in Fever
- Command-line functionality for managing user metadata
- Command-line functionality for managing Miniflux login tokens
Bug fixes:
- Use icons specified in Atom feeds when available
- Do not return null as subscription unread count
- Explicitly forbid U+003A COLON and control characters in usernames, for
compatibility with RFC 7617
- Accept "t" and "f" as booleans in Tiny Tiny RSS
Changes:
- Administrator account requirements for Nextcloud News functionality are
now enforced
Version 0.8.5 (2020-10-27)
==========================
Bug fixes:
- Relax Fever HTTP correctness, to fix some clients
- Add the QUERY_STRING FastCGI parameter to the sample Nginx configuration
Version 0.8.4 (2020-09-09)
==========================
Bug fixes:
- Don't crash updating feeds cached without ETag (regression since 0.8.3)
Version 0.8.3 (2020-02-16)
==========================
Changes:
- Officially require PHP 7.1 (accidentally required since version 0.8.0)
- Various internal changes pursuant to use of PHP 7.1
Version 0.8.2 (2019-12-07)
==========================
Bug fixes:
- Enforce foreign key constraints in MySQL
- Widen most text fields for MySQL
Version 0.8.1 (2019-10-28)
==========================
Bug fixes:
- Don't crash updating feeds cached solely via ETag
- Don't fail importing new folders from OPML files
- Don't fail adding a feed which collides with another via redirection
- Don't fail on very long text-search queries containing question marks
when using PostgreSQL or MySQL
- Specify HTTP authentication encoding as UTF-8
Changes:
- Include a user manual
- Normalize newsfeed URLs before checking for duplicates
Version 0.8.0 (2019-07-26)
==========================
New features:
- Support for the Fever protocol (see manual for details)
- Command line functionality for clearing a password, disabling the account
- Command line options for dealing with Fever passwords
- Command line functionality for importing and exporting OPML
- Command line documentation of all commands and options
Bug fixes:
- Treat command line option -h the same as --help
- Sort Tiny Tiny RSS special feeds according to special ordering
- Invalidate sessions when passwords are changed
- Correct example systemd unit to start after PostgreSQL and MySQL
Changes:
- Perform regular database maintenance to improve long-term performance
Version 0.7.1 (2019-03-25)
==========================
@ -65,17 +147,17 @@ Bug fixes:
- Print command-line error messages more sensibly
- Allow exporting default configuration to standard output
- Fail correctly on authentication failure
- Prefer JSON data over GET parameters in NextCloud News
- Prefer JSON data over GET parameters in Nextcloud News
Changes:
- Simplify user management backend to minimize opportunity for bugs
- Document previously unknown NextCloud News behaviour
- Document previously unknown Nextcloud News behaviour
Version 0.4.0 (2018-10-26)
==========================
New features:
- Support for HTTP authentication in Tiny Tiny RSS (see README.md for details)
- Support for HTTP authentication in Tiny Tiny RSS (see manual for details)
- New userHTTPAuthRequired and userSessionEnforced settings
Version 0.3.1 (2018-07-22)
@ -86,7 +168,7 @@ Bug fixes:
- Minor fixes to code and documentation
Changes:
- Disable memory and time limits to avoid deadlocks with NextCloud News
- Disable memory and time limits to avoid deadlocks with Nextcloud News
Version 0.3.0 (2018-01-12)
==========================
@ -112,7 +194,7 @@ Bug fixes:
- Rename feeds correctly via TTRSS protocol
- Toggle marks correctly via TTRSS protocol
- Sort everything case-insensitively
- Be even stricter about output data types in NextCloud News
- Be even stricter about output data types in Nextcloud News
Changes:
- Do not omit read feeds from TTRSS' getCounters, to fix some clients
@ -121,13 +203,13 @@ Version 0.2.0 (2017-11-30)
==========================
New features:
- Support for the Tiny Tiny RSS protocol (see README.md for details)
- Support for the Tiny Tiny RSS protocol (see manual for details)
- Support for HTTP OPTIONS requests in all protocols
Bug fixes:
- Perform feed discovery *correctly*
- Expose the incorrectDbCharset boolean in the NextCloud News server status
- Give NextCloud News articles' guidHash attribute the correct type (string)
- Expose the incorrectDbCharset boolean in the Nextcloud News server status
- Give Nextcloud News articles' guidHash attribute the correct type (string)
Changes:
- Overhaul input type normalization to minimize bug opportunities
@ -136,7 +218,7 @@ Version 0.1.1 (2017-09-30)
==========================
Bug fixes:
- Perform feed discovery like NextCloud News does
- Perform feed discovery like Nextcloud News does
- Respond correctly to HEAD requests
- Various minor fixes


+ 75
- 164
README.md View File

@ -1,208 +1,119 @@
# The Advanced RSS Environment
The Arsse is a news aggregator server which implements multiple synchronization protocols, including [version 1.2][NCNv1] of [NextCloud News][NCN]' protocol and the [Tiny Tiny RSS][TTRSS] protocol (details below). Unlike most other aggregator servers, The Arsse does not include a Web front-end (though one is planned as a separate project), and it relies on existing protocols to maximize compatibility with existing clients.
The Arsse is a news aggregator server, written in PHP, which implements multiple synchronization protocols. Unlike most other aggregator servers, The Arsse does not include a Web front-end (though one is planned as a separate project), and it relies on existing protocols to maximize compatibility with existing clients.
At present the software should be considered in an "alpha" state: though its core subsystems are covered by unit tests and should be free of major bugs, not everything has been rigorously tested. Additionally, many features one would expect from other similar software have yet to be implemented. Areas of future work include:
Information on how to install and use the software can be found in [the manual](https://thearsse.com/manual/), which is available online as well as with every copy of the software. This readme file instead focuses on how to set up a programming environment to modify the source code.
- Providing more sync protocols (Google Reader, Fever, others)
- Better packaging and configuration samples
- A user manual
# Installing from source
## Requirements
The main repository for The Arsse can be found at [code.mensbeam.com](https://code.mensbeam.com/MensBeam/arsse/), with a mirror also available [at GitHub](https://github.com/mensbeam/arsse/). The GitHub mirror does not accept bug reports, but the two should otherwise be equivalent.
The Arsse has the following requirements:
[Composer](https://getcomposer.org/) is required to manage PHP dependencies. After cloning the repository or downloading a source code tarball, running `composer install` will download all the required dependencies, and will advise if any PHP extensions need to be installed. If not installing as a programming environment, running `composer install --no-dev` is recommended.
- A Linux server utilizing systemd and Nginx (tested on Ubuntu 16.04)
- PHP 7.0.7 or later with the following extensions:
- [intl](http://php.net/manual/en/book.intl.php), [json](http://php.net/manual/en/book.json.php), [hash](http://php.net/manual/en/book.hash.php), and [pcre](http://php.net/manual/en/book.pcre.php)
- [dom](http://php.net/manual/en/book.dom.php), [simplexml](http://php.net/manual/en/book.simplexml.php), and [iconv](http://php.net/manual/en/book.iconv.php) (for picoFeed)
- One of:
- [sqlite3](http://php.net/manual/en/book.sqlite3.php) or [pdo_sqlite](http://php.net/manual/en/ref.pdo-sqlite.php) for SQLite databases
- [pgsql](http://php.net/manual/en/book.pgsql.php) or [pdo_pgsql](http://php.net/manual/en/ref.pdo-pgsql.php) for PostgreSQL 10 or later databases
- [mysqli](http://php.net/manual/en/book.mysqli.php) or [pdo_mysql](http://php.net/manual/en/ref.pdo-mysql.php) for MySQL 8.0.7 or later databases
- Privileges to create and run daemon processes on the server
# Repository structure
## Installation
## Library code
At present, installation of The Arsse is rather manual. We hope to improve this in the future, but for now the steps below should help get you started. The instructions and configuration samples assume you will be using Ubuntu 16.04 (or equivalent Debian) and Nginx; we hope to expand official support for different configurations in the future as well.
The code which runs The Arsse, contained in `/arsse.php`, is only a short stub: the application itself is composed of the classes found under `/lib/`, with the main ones being:
### Initial setup
| Path | Description |
|----------------|---------------------------------------------------------|
| `CLI.php` | The command-line interface, including its documentation |
| `Conf.php` | Configuration handling |
| `Database.php` | High-level database interface |
| `Db/` | Low-level database abstraction layer |
| `REST/` | Protocol implementations |
| `REST.php` | General protocol handler for CORS, HTTP auth, etc. |
| `Arsse.php` | Singleton glueing the parts together |
1. Extract the tar archive to `/usr/share`
2. If desired, create `/usr/share/arsse/config.php` using `config.defaults.php` as a guide. The file you create only needs to contain non-default settings. The `userPreAuth` setting may be of particular interest
3. Copy `/usr/share/arsse/dist/arsse.service` to `/lib/systemd/system`
4. In a terminal, execute the following to start the feed fetching service:
The `/lib/Database.php` file is the heart of the application, performing queries on behalf of protocol implementations or the command-line interface.
``` sh
sudo systemctl enable arsse
sudo systemctl start arsse
```
Also necessary to the functioning of the application is the `/vendor/` directory, which contains PHP libraries which The Arsse depends upon. These are managed by Composer.
### Configuring the Web server and PHP
## Supporting data files
Sample configuration parameters for Nginx can be found in `arsse/dist/nginx.conf` and `arsse/dist/nginx-fcgi.conf`; the samples assume [a server group](http://nginx.org/en/docs/http/ngx_http_upstream_module.html#upstream) has already been defined for PHP. How to configure an Nginx service to use PHP and install the required PHP extensions is beyond the scope of this document, however.
The `/locale/` and `/sql/` directories contain human-language files and database schemata, both of which are occasionally used by the application in the course of execution. The `/www/` directory serves as a document root for a few static files to be made available to users by a Web server.
### Adding users
The `/dist/` directory, on the other hand, contains samples of configuration for Web servers and init systems. These are not used by The Arsse itself, but are merely distributed with it for reference.
The Arsse includes a `user add <username> [<password>]` console command to add users to the database; for example running `php arsse.php user add admin password` will add the user `admin` with the password `pasword` to the database. Other commands for managing users are also available.
## Documentation
Alternatively, if the Web server is configured to handle authentication, you may set the configuration option `userPreAuth` to `true` and The Arsse will defer to the Web server and automatically add any missing users as it encounters them.
The source text for The Arsse's manual can be found in `/docs/`, with pages written in [Markdown](https://spec.commonmark.org/current/) and converted to HTML [with Daux](#building-the-manual). If a static manual is generated its files will appear under `/manual/`.
## Installation from source
In addition to the manual the files `/README.md` (this file), `/CHANGELOG`, `/UPGRADING`, `/LICENSE`, and `/AUTHORS` also document various things about the software, rather than the software itself.
If installing from the Git repository rather than a download package, you will need to follow extra steps before the instructions in the section above.
## Tests
First, you must install [Composer] to fetch required PHP libraries. Once Composer is installed, dependencies may be downloaded with the following command:
The `/tests/` directory contains everything related to automated testing. It is itself organized as follows:
``` sh
php composer.phar install -o --no-dev --no-scripts
```
| Path | Description |
|--------------------|------------------------------------------------------------------------------------|
| `cases/` | The test cases themselves, organized in roughly the same structure as the code |
| `coverage/` | (optional) Generated code coverage reports |
| `docroot/` | Sample documents used in some tests, to be returned by the PHP's basic HTTP server |
| `lib/` | Supporting classes which do not contain test cases |
| `bootstrap.php` | Bootstrap script, equivalent to `/arsse.php`, but for tests |
| `phpunit.dist.xml` | PHPUnit configuration file |
| `server.php` | Simple driver for the PHP HTTP server used during testing |
Second, you may wish to create an example configuration file using the following command:
PHPUnit's configuration can be customized by copying its configuration file to `/tests/phpunit.xml` and modifying the copy accordingly.
``` sh
php ./arsse.php conf save-defaults "./config.defaults.php"
```
## Tooling
## License
The `/vendor-bin/` directory houses the files needed for the tools used in The Arsse's programming environment. These are managed by the Composer ["bin" plugin](https://github.com/bamarni/composer-bin-plugin) and are not used by The Arsse itself. The following files are also related to various programming tools:
The Arsse is made available under the permissive MIT license. See the `LICENSE` and `AUTHORS` files included with the distribution or source code for exact legal text and copyright holders. Dependencies included in the distribution may be governed by other licenses.
| Path | Description |
|-------------------|----------------------------------------------------------|
| `/.gitattributes` | Git settings for handling files |
| `/.gitignore` | Git file exclusion patterns |
| `/.php_cs.dist` | Configuration for [php-cs-fixer](https://cs.symfony.com) |
| `/.php_cs.cache` | Cache for php-cs-fixer |
| `/composer.json` | Configuration for Composer |
| `/composer.lock` | Version synchronization data for Composer |
| `/RoboFile.php` | Task definitions for [Robo](https://robo.li/) |
| `/robo` | Simple wrapper for executing Robo on POSIX systems |
| `/robo.bat` | Simple wrapper for executing Robo on Windows |
## Contributing
In addition the files `/package.json`, `/yarn.lock`, and `/postcss.config.js` as well as the `/node_modules/` directory are used by [Yarn](https://yarnpkg.com/) and [PostCSS](https://postcss.org/) when modifying the stylesheet for The Arsse's manual.
Please refer to `CONTRIBUTING.md` for guidelines on contributing code to The Arsse.
# Common tasks
## Database compatibility notes
We use a tool called [Robo](https://robo.li/) to simplify the execution of common tasks. It is installed with The Arsse's other dependencies, and its configured tasks can be listed by executing `./robo` without arguments.
Functionally there is no reason to prefer either SQLite or PostgreSQL over the other. SQLite is significantly simpler to set up in most cases, requiring only read and write access to a containing directory in order to function; PostgreSQL may perform better than SQLite when serving hundreds of users or more, though this has not been tested.
## Running tests
MySQL, on the other hand, is **not recommended** due to its relatively constrained index prefix limits which may cause some newsfeeds which would otherwise work to be rejected. If using MySQL, special care should also be taken when performing schema upgrades, as errors during the process can leave the database in a half-upgraded state which The Arsse cannot itself recover from.
The Arsse has an extensive [PHPUnit](https://phpunit.de/) test suite; tests can be run by executing `./robo test`, which can be supplemented with any arguments understoof by PHPUnit. For example, to test only the Tiny Tiny RSS protocol, one could run `./robo test --testsuite TTRSS`.
Note that MariaDB is not compatible with The Arsse: its support for common table expressions is, as of this writing, not sufficient for our needs.
There is also a `test:quick` Robo task which excludes slower tests, and a `test:full` task which includes redundant tests in addition to the standard test suite
## Protocol compatibility notes
### Test coverage
### General
Computing the coverage of tests can be done by running `./robo coverage`, after which an HTML-format coverage report will be written to `/tests/coverage/`. Either [PCOV](https://github.com/krakjoe/pcov), [Xdebug](https://xdebug.org), or [phpdbg](https://php.net/manual/en/book.phpdbg.php) is required for this. PCOV is generally recommended as it is faster than Xdebug; phpdbg is faster still, but less accurate. If using either PCOV or Xdebug, the extension need not be enabled globally; PHPUnit will enable it when needed.
#### Type casting
## Enforcing coding style
The Arsse does not guarantee it will handle type casting of input in the same way as reference implementations for its supported protocols. As a general rule, clients should endeavour to send only correct input.
The [php-cs-fixer](https://cs.symfony.com) tool, executed via `./robo clean`, can be used to rewrite code to adhere to The Arsse's coding style. The style largely follows [PSR-2](https://www.php-fig.org/psr/psr-2/) with some exceptions:
The Arsse does, however, guarantee _output_ to be of the same type. If it is not, this is [a bug][newIssue] and should be reported.
- Classes, methods, and functions should have their opening brace on the same line as the signature
- Anonymous functions should have no space before the parameter list
#### Content sanitization
## Building the manual
The Arsse makes use of the [picoFeed] newsfeed parsing library to sanitize article content. The exact sanitization parameters may differ from those of reference implementations for protocols The Arsse supports.
The Arsse's user manual, made using [Daux](https://daux.io/), can be compiled by running `./robo manual`, which will output files to `/manual/`. It is also possible to serve the manual from a test HTTP server on port 8085 by running `./robo manual:live`.
### NextCloud News v1.2
### Rebuilding the manual theme
As a general rule, The Arsse should yield the same output as the reference implementation for all valid inputs (otherwise you've found [a bug][newIssue]), but there are exception, either because the NextCloud News (hereafter "NCN") [protocol description][NCNv1] is at times ambiguous or incomplete, or because implementation details necessitate it differ; this section along with the General section above detail these differences.
The manual employs a custom theme derived from the standard Daux theme. If the standard Daux theme receives improvements, the custom theme can be rebuilt by running `./robo manual:theme`. This requires that [NodeJS](https://nodejs.org) and [Yarn](https://yarnpkg.com/) be installed, but JavaScript tools are not required to modify The Arsse itself, nor the content of the manual.
#### Differences
## Packaging a release
- Article GUID hashes are not hashes like in NCN; they are integers rendered as strings
- Article fingerprints are a combination of hashes rather than a single hash
- When marking articles as starred the feed ID is ignored, as they are not needed to establish uniqueness
- The feed updater ignores the `userId` parameter: feeds in The Arsse are deduplicated, and have no owner
- The `/feeds/all` route lists only feeds which should be checked for updates, and it also returns all `userId` attributes as empty strings: feeds in The Arsse are deduplicated, and have no owner
- The API's "updater" routes do not require administrator priviledges as The Arsse has no concept of user classes
- The "updater" console commands mentioned in the protocol specification are not implemented, as The Arsse does not implement the required NextCloud subsystems
- The `lastLoginTimestamp` attribute of the user metadata is always the current time: The Arsse's implementation of the protocol is fully stateless
- Syntactically invalid JSON input will yield a `400 Bad Request` response instead of falling back to GET parameters
- Folder names consisting only of whitespace are rejected along with the empty string
- Feed titles consisting only of whitespace or the empty string are rejected with a `422 Unprocessable Entity` reponse instead of being accepted
- Bulk-marking operations without a `newestItemId` argument result in a `422 Unprocessable Entity` reponse instead of silently failing
- Creating a feed in a folder which does not exist places the feed in the root folder rather than suppressing the feed
- Moving a feed to a folder which does not exist results in a `422 Unprocessable Entity` reponse rather than suppressing the feed
Producing a release package is done by running `./robo package`. This performs the following operations:
### Tiny Tiny RSS
- Duplicates a working tree with the commit (usually a release tag) to package
- Generates the manual
- Installs runtime Composer dependencies with an optimized autoloader
- Deletes numerous unneeded files
- Exports the default configuration of The Arsse to a file
- Compresses the remaining files into a tarball
As a general rule, The Arsse should yield the same output as the reference implementation for all valid inputs (otherwise you've found [a bug][newIssue]), but there are exception, either because the Tiny Tiny RSS (hereafter "TTRSS") [protocol description][TTRSS] is incomplete, erroneous, or out of date, or because TTRSS itself is buggy, or because implementation details necessitate The Arsse differ; this section along with the General section above detail these differences.
#### Extended functionality
The Arsse supports both [the set of extensions][ext-feedreader] to the TTRSS protocol defined by [FeedReader], as well as [the `getCompactHeadlines` operation][ext-newsplus] defined by [News+].
We are not aware of any other extensions to the TTRSS protocol. If you know of any more, please [let us know][newIssue].
#### Missing features
- The `getPref` operation is not implemented; it returns `UNKNOWN_METHOD`
- The `shareToPublished` operation is not implemented; it returns `UNKNOWN_METHOD`
- Setting an article's "published" flag with the `updateArticle` operation is not implemented and will gracefully fail
- The `sanitize`, `force_update`, and `has_sandbox` parameters of the `getHeadlines` operation are ignored
- String `feed_id` values for the `getCompactHeadlines` operation are not supported and will yield an `INCORRECT_USAGE` error
- Articles are limited to a single attachment rather than multiple attachments
#### Differences
- Input that cannot be parsed as JSON normally returns a `NOT_LOGGED_IN` error; The Arsse returns a non-standard `MALFORMED_INPUT` error instead
- Feed, category, and label names are normally unrestricted; The Arsse rejects empty strings, as well as strings composed solely of whitespace
- Discovering multiple feeds during `subscribeToFeed` processing normally produces an error; The Arsse instead chooses the first feed it finds
- Providing the `setArticleLabel` operation with an invalid label normally silently fails; The Arsse returns an `INVALID_USAGE` error instead
- Processing of the `search` parameter of the `getHeadlines` operation differs in the following ways:
- Values other than `"true"` or `"false"` for the `unread`, `star`, and `pub` special keywords treat the entire token as a search term rather than as `"false"`
- Invalid dates are ignored rather than assumed to be `"1970-01-01"`
- Only a single negative date is allowed (this is a known bug rather than intentional)
- Dates are always relative to UTC
- Full-text search is not yet employed with any database, including PostgreSQL
- Article hashes are normally SHA1; The Arsse uses SHA256 hashes
- Article attachments normally have unique IDs; The Arsse always gives attachments an ID of `"0"`
- The default sort order of the `getHeadlines` operation normally uses custom sorting for "special" feeds; The Arsse's default sort order is equivalent to `feed_dates` for all feeds
- The `getCounters` operation normally omits members with zero unread; The Arsse includes everything to appease some clients
#### Other notes
- TTRSS accepts base64-encoded passwords, though this is undocumented; The Arsse accepts base64-encoded passwords as well
- TTRSS sometimes returns an incorrect count from the `setArticleLabel` operation; The Arsse returns a correct count in all cases
- TTRSS sometimes returns out-of-date cached information; The Arsse does not use caches as TTRSS does, so information is always current
- TTRSS returns results for _feed_ ID `-3` when providing the `getHeadlines` operation with _category_ ID `-3`; The Arsse retuns the correct results
- The protocol doucmentation advises not to use `limit` or `skip` together with `unread_only` for the `getFeeds` operation as it produces unpredictable results; The Arsse produces predictable results by first retrieving all unread feeds and then applying `skip` and `limit`
- The protocol documentation on values for the `view_mode` parameter of the `getHeadlines` operation is out of date; The Arsse matches the actual implementation and supports the undocumented `published` and `has_note` values exposed by the Web user interface
- The protocol documentation makes mention of a `search_mode` parameter for the `getHeadlines` operation, but this seems to be ignored; The Arsse does not implement it
- The protocol documentation makes mention of an `output_mode` parameter for the `getCounters` operation, but this seems to be ignored; The Arsse does not implement it
- The documentation for the `getCompactHeadlines` operation states the default value for `limit` is 20, but the reference implementation defaults to unlimited; The Arsse also defaults to unlimited
- It is assumed TTRSS exposes other undocumented behaviour; unless otherwise noted The Arsse only implements documented behaviour
#### Interaction with HTTP authentication
Tiny Tiny RSS itself is unaware of HTTP authentication: if HTTP authentication is used in the server configuration, it has no effect on authentication in the API. The Arsse, however, makes use of HTTP authentication for NextCloud News, and can do so for TTRSS as well. In a default configuration The Arsse functions in the same way as TTRSS: HTTP authentication and API authentication are completely separate and independent. Alternative behaviour is summarized below:
- With default settings:
- Clients may optionally provide HTTP credentials
- API authentication proceeds as normal
- All feed icons are visible to unauthenticated clients
- If the `userHTTPAuthRequired` setting is `true`:
- Clients must pass HTTP authentication
- API authentication proceeds as normal
- Feed icons are visible only to their owners
- If the `userSessionEnforced` setting is `false`:
- Clients may optionally provide HTTP credentials
- If HTTP authentication succeeded API authentication is skipped: tokens are issued upon login, but ignored for HTTP-authenticated requests
- All feed icons are visible to unauthenticated clients
- If the `userHTTPAuthRequired` setting is `true` and the `userSessionEnforced` setting is `false`:
- Clients must pass HTTP authentication
- API authentication is skipped: tokens are issued upon login, but thereafter ignored
- Feed icons are visible only to their owners
- If the `userPreAuth` setting is `true`:
- The Web server asserts HTTP authentication was successful
- API authentication only checks that HTTP and API user names match
- Feed icons are visible only to their owners
- If the `userPreAuth` setting is `true` and the `userSessionEnforced` setting is `false`:
- The Web server asserts HTTP authentication was successful
- API authentication is skipped: tokens are issued upon login, but thereafter ignored
- Feed icons are visible only to their owners
In all cases, supplying invalid HTTP credentials will result in a 401 response.
[newIssue]: https://code.mensbeam.com/MensBeam/arsse/issues/new
[Composer]: https://getcomposer.org/
[picoFeed]: https://github.com/miniflux/picoFeed/
[NCN]: https://github.com/nextcloud/news
[NCNv1]: https://github.com/nextcloud/news/blob/master/docs/externalapi/Legacy.md
[CORS]: https://fetch.spec.whatwg.org/#http-cors-protocol
[TTRSS]: https://git.tt-rss.org/git/tt-rss/wiki/ApiReference
[FeedReader]: https://jangernert.github.io/FeedReader/
[News+]: https://github.com/noinnion/newsplus/
[ext-feedreader]: https://github.com/jangernert/FeedReader/tree/master/data/tt-rss-feedreader-plugin
[ext-newsplus]: https://github.com/hrk/tt-rss-newsplus-plugin
Due to the first step, [Git](https://git-scm.com/) is required to package a release.

+ 118
- 42
RoboFile.php View File

@ -2,12 +2,21 @@
use Robo\Result;
class RoboFile extends \Robo\Tasks {
const BASE = __DIR__.\DIRECTORY_SEPARATOR;
const BASE_TEST = self::BASE."tests".\DIRECTORY_SEPARATOR;
const BASE = __DIR__.\DIRECTORY_SEPARATOR;
const BASE_TEST = BASE."tests".\DIRECTORY_SEPARATOR;
define("IS_WIN", defined("PHP_WINDOWS_VERSION_MAJOR"));
define("IS_MAC", php_uname("s") === "Darwin");
/**
* Runs the typical test suite
function norm(string $path): string {
$out = realpath($path);
if (!$out) {
$out = str_replace(["/", "\\"], \DIRECTORY_SEPARATOR, $path);
}
return $out;
}
class RoboFile extends \Robo\Tasks {
/** Runs the typical test suite
*
* Arguments passed to the task are passed on to PHPUnit. Thus one may, for
* example, run the following command and get the expected results:
@ -15,28 +24,27 @@ class RoboFile extends \Robo\Tasks {
* ./robo test --testsuite TTRSS --exclude-group slow --testdox
*
* Please see the PHPUnit documentation for available options.
*/
*/
public function test(array $args): Result {
return $this->runTests("php", "typical", $args);
return $this->runTests(escapeshellarg(\PHP_BINARY), "typical", $args);
}
/**
* Runs the full test suite
/** Runs the full test suite
*
* This includes pedantic tests which may help to identify problems.
* See help for the "test" task for more details.
*/
*/
public function testFull(array $args): Result {
return $this->runTests("php", "full", $args);
return $this->runTests(escapeshellarg(\PHP_BINARY), "full", $args);
}
/**
* Runs a quick subset of the test suite
*
* See help for the "test" task for more details.
*/
*/
public function testQuick(array $args): Result {
return $this->runTests("php", "quick", $args);
return $this->runTests(escapeshellarg(\PHP_BINARY), "quick", $args);
}
/** Produces a code coverage report
@ -45,14 +53,14 @@ class RoboFile extends \Robo\Tasks {
* tests/coverage/. Additional reports may be produced by passing
* arguments to this task as one would to PHPUnit.
*
* Robo first tries to use phpdbg and will fall back to Xdebug if available.
* Because Xdebug slows down non-coverage tasks, however, phpdbg is highly
* recommended if debugging facilities are not otherwise needed.
*/
* Robo first tries to use pcov and will fall back first to xdebug then
* phpdbg. Neither pcov nor xdebug need to be enabled to be used; they
* only need to be present in the extension load path to be used.
*/
public function coverage(array $args): Result {
// run tests with code coverage reporting enabled
$exec = $this->findCoverageEngine();
return $this->runTests($exec, "coverage", array_merge(["--coverage-html", self::BASE_TEST."coverage"], $args));
return $this->runTests($exec, "coverage", array_merge(["--coverage-html", BASE_TEST."coverage"], $args));
}
/** Produces a code coverage report, with redundant tests
@ -63,16 +71,16 @@ class RoboFile extends \Robo\Tasks {
* run all tests which may cover code.
*
* See also help for the "coverage" task for more details.
*/
*/
public function coverageFull(array $args): Result {
// run tests with code coverage reporting enabled
$exec = $this->findCoverageEngine();
return $this->runTests($exec, "typical", array_merge(["--coverage-html", self::BASE_TEST."coverage"], $args));
return $this->runTests($exec, "typical", array_merge(["--coverage-html", BASE_TEST."coverage"], $args));
}
/** Runs the coding standards fixer */
public function clean($opts = ['demo|d' => false]): Result {
$t = $this->taskExec(realpath(self::BASE."vendor/bin/php-cs-fixer"));
$t = $this->taskExec(norm(BASE."vendor/bin/php-cs-fixer"));
$t->arg("fix");
if ($opts['demo']) {
$t->args("--dry-run", "--diff")->option("--diff-format", "udiff");
@ -81,24 +89,39 @@ class RoboFile extends \Robo\Tasks {
}
protected function findCoverageEngine(): string {
if ($this->isWindows()) {
$dbg = dirname(\PHP_BINARY)."\\phpdbg.exe";
$dbg = file_exists($dbg) ? $dbg : "";
} else {
$dbg = trim(`which phpdbg`);
}
if ($dbg) {
return escapeshellarg($dbg)." -qrr";
$dir = rtrim(ini_get("extension_dir"), "/").\DIRECTORY_SEPARATOR;
$ext = IS_WIN ? "dll" : (IS_MAC ? "dylib" : "so");
$php = escapeshellarg(\PHP_BINARY);
$code = escapeshellarg(BASE."lib");
if (extension_loaded("pcov")) {
return "$php -d pcov.enabled=1 -d pcov.directory=$code";
} elseif (extension_loaded("xdebug")) {
return "$php -d xdebug.mode=coverage";
} elseif (file_exists($dir."pcov.$ext")) {
return "$php -d extension=pcov.$ext -d pcov.enabled=1 -d pcov.directory=$code";
} elseif (file_exists($dir."xdebug.$ext")) {
return "$php -d zend_extension=xdebug.$ext -d xdebug.mode=coverage";
} else {
return escapeshellarg(\PHP_BINARY);
if (IS_WIN) {
$dbg = dirname(\PHP_BINARY)."\\phpdbg.exe";
$dbg = file_exists($dbg) ? $dbg : "";
} else {
$dbg = trim(`which phpdbg 2>/dev/null`);
}
if ($dbg) {
return escapeshellarg($dbg)." -qrr";
} else {
return $php;
}
}
}
protected function isWindows(): bool {
return defined("PHP_WINDOWS_VERSION_MAJOR");
protected function blackhole(bool $all = false): string {
$hole = IS_WIN ? "nul" : "/dev/null";
return $all ? ">$hole 2>&1" : "2>$hole";
}
protected function runTests(string $executor, string $set, array $args) : Result {
protected function runTests(string $executor, string $set, array $args): Result {
switch ($set) {
case "typical":
$set = ["--exclude-group", "optional"];
@ -115,10 +138,10 @@ class RoboFile extends \Robo\Tasks {
default:
throw new \Exception;
}
$execpath = realpath(self::BASE."vendor-bin/phpunit/vendor/phpunit/phpunit/phpunit");
$confpath = realpath(self::BASE_TEST."phpunit.xml");
$this->taskServer(8000)->host("localhost")->dir(self::BASE_TEST."docroot")->rawArg("-n")->arg(self::BASE_TEST."server.php")->background()->run();
return $this->taskExec($executor)->arg($execpath)->option("-c", $confpath)->args(array_merge($set, $args))->run();
$execpath = norm(BASE."vendor-bin/phpunit/vendor/phpunit/phpunit/phpunit");
$confpath = realpath(BASE_TEST."phpunit.dist.xml") ?: norm(BASE_TEST."phpunit.xml");
$this->taskServer(8000)->host("localhost")->dir(BASE_TEST."docroot")->rawArg("-n")->arg(BASE_TEST."server.php")->rawArg($this->blackhole())->background()->run();
return $this->taskExec($executor)->option("-d", "zend.assertions=1")->arg($execpath)->option("-c", $confpath)->args(array_merge($set, $args))->run();
}
/** Packages a given commit of the software into a release tarball
@ -130,18 +153,22 @@ class RoboFile extends \Robo\Tasks {
* Note that while it is possible to re-package old versions, the resultant tarball
* may not be equivalent due to subsequent changes in the exclude list, or because
* of new tooling.
*/
*/
public function package(string $version = null): Result {
// establish which commit to package
$version = $version ?? $this->askDefault("Commit to package:", "head");
$archive = self::BASE."arsse-$version.tar.gz";
$version = $version ?? $this->askDefault("Commit to package:", "HEAD");
$archive = BASE."arsse-$version.tar.gz";