Browse Source

Sync SimplePie (#6840)

FreshRSS upstream PR merged https://github.com/simplepie/simplepie/pull/883
Alexandre Alapetite 1 year ago
parent
commit
a792c195d2

+ 1 - 3
lib/.gitignore

@@ -23,10 +23,8 @@ phpmailer/phpmailer/src/OAuth*
 phpmailer/phpmailer/src/POP3.php
 simplepie/simplepie/.*
 !simplepie/simplepie/.editorconfig
-!simplepie/simplepie/.github/
-!simplepie/simplepie/.gitignore
-simplepie/simplepie/.github/*
 !simplepie/simplepie/.github/README.md
+!simplepie/simplepie/.gitignore
 simplepie/simplepie/autoloader.php
 simplepie/simplepie/build/
 simplepie/simplepie/compatibility_test/

+ 1 - 1
lib/composer.json

@@ -18,7 +18,7 @@
         "marienfressinaud/lib_opml": "0.5.1",
         "phpgt/cssxpath": "dev-master#45f3ac151fc21d459e2515c3aff97cd4bf877bf8",
         "phpmailer/phpmailer": "6.9.1",
-        "simplepie/simplepie": "dev-freshrss#e041dacffc6e29979437d1545773a3e0f716c486"
+        "simplepie/simplepie": "dev-freshrss#88f13f2df1ba17a7432a624d38884b1bd8f60e43"
     },
     "config": {
         "sort-packages": true,

+ 10 - 0
lib/simplepie/simplepie/phpcs.xml

@@ -7,6 +7,7 @@
 	<rule ref="PSR12">
 		<exclude name="PSR1.Files.SideEffects.FoundWithSymbols"/>
 		<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps"/>
+		<exclude name="PSR12.ControlStructures.ControlStructureSpacing.CloseParenthesisLine"/>
 		<exclude name="PSR12.ControlStructures.ControlStructureSpacing.FirstExpressionLine"/>
 		<exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace"/>
 	</rule>
@@ -16,4 +17,13 @@
 			<property name="absoluteLineLimit" value="400"/>
 		</properties>
 	</rule>
+	<rule ref="Generic.WhiteSpace.DisallowTabIndent.TabsUsed">
+		<exclude-pattern>./demo/</exclude-pattern>
+	</rule>
+	<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
+		<exclude-pattern>./library/</exclude-pattern>
+	</rule>
+	<rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
+		<exclude-pattern>./library/</exclude-pattern>
+	</rule>
 </ruleset>

+ 1 - 1
lib/simplepie/simplepie/src/SimplePie.php

@@ -1978,7 +1978,7 @@ class SimplePie
                     $this->data = [];
                 }
                 // Check if the cache has been updated
-                elseif (empty($this->data['cache_expiration_time']) || $this->data['cache_expiration_time'] < time()) { // FreshRSS https://github.com/simplepie/simplepie/pull/846
+                elseif (!isset($this->data['cache_expiration_time']) || $this->data['cache_expiration_time'] < time()) {
                     // Want to know if we tried to send last-modified and/or etag headers
                     // when requesting this file. (Note that it's up to the file to
                     // support this, but we don't always send the headers either.)