Tags: simplepie/simplepie
Tags
Release 1.8.0 (#761) * bump version to 1.8.0 * Update CHANGELOG.md * Fix version tags in deprecated messages * fix version in old deprecation messages * Fix typo see comment from @jtojnar in #752 * Add comment for DataCache interface see comment from @jtojnar in #752 * Update CHANGELOG.md for #760, #764 and #765 * Update CHANGELOG.md for #762, #767 and #763 * Update CHANGELOG.md for #768 and #770 * Update release date * Update CHANGELOG.md for #769 and #771 * Update CHANGELOG.md for #766
PHP 8.2: explicitly declare properties (#705) * Locator: explicitly declare all properties Dynamic (non-explicitly declared) property usage is expected to be deprecated as of PHP 8.2 and will become a fatal error in PHP 9.0. There are a number of ways to mitigate this: * If it's an accidental typo for a declared property: fix the typo. * For known properties: declare them on the class. * For unknown properties: add the magic `__get()`, `__set()` et al methods to the class or let the class extend `stdClass` which has highly optimized versions of these magic methods build in. * For unknown _use of_ dynamic properties, the `#[AllowDynamicProperties]` attribute can be added to the class. The attribute will automatically be inherited by child classes. In this case, the `$dom` property is referenced multiple times throughout this class, so falls in the "known property" category. Refs: * https://wiki.php.net/rfc/deprecate_dynamic_properties * Sanitize: explicitly declare all properties Dynamic (non-explicitly declared) property usage is expected to be deprecated as of PHP 8.2 and will become a fatal error in PHP 9.0. There are a number of ways to mitigate this: * If it's an accidental typo for a declared property: fix the typo. * For known properties: declare them on the class. * For unknown properties: add the magic `__get()`, `__set()` et al methods to the class or let the class extend `stdClass` which has highly optimized versions of these magic methods build in. * For unknown _use of_ dynamic properties, the `#[AllowDynamicProperties]` attribute can be added to the class. The attribute will automatically be inherited by child classes. In this case, the `$registry` property is referenced multiple times throughout this class, so falls in the "known property" category. Refs: * https://wiki.php.net/rfc/deprecate_dynamic_properties * Autoloader: explicitly declare all properties Dynamic (non-explicitly declared) property usage is expected to be deprecated as of PHP 8.2 and will become a fatal error in PHP 9.0. There are a number of ways to mitigate this: * If it's an accidental typo for a declared property: fix the typo. * For known properties: declare them on the class. * For unknown properties: add the magic `__get()`, `__set()` et al methods to the class or let the class extend `stdClass` which has highly optimized versions of these magic methods build in. * For unknown _use of_ dynamic properties, the `#[AllowDynamicProperties]` attribute can be added to the class. The attribute will automatically be inherited by child classes. In this case, the `$path` property is referenced a couple of times throughout this class, so falls in the "known property" category. Refs: * https://wiki.php.net/rfc/deprecate_dynamic_properties * SimplePie_Cache_Redis: fix bug for using undefined property The `$ttl` property is not declared, not set on this cache, nor its parent, which means that it would always be passed as `null`. As the call to the `Redis::expire()` method is within a `if ($this->options['expire'])` condition and a similar call to the `Redis::expire()` method in the `SimplePie_Cache_Redis::save()` method, also uses `$this->options['expire']` for the "ttl" value, changing the passed parameter to `$this->options['expire']` seems the correct fix. Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
PreviousNext