From 4a5a8c6584f116b4c90e8e220187fbaae0a38bf9 Mon Sep 17 00:00:00 2001 From: "Ian M. Jones" Date: Thu, 22 Feb 2018 22:10:29 +0000 Subject: [PATCH] Deploying version 1.3.2 --- README.md | 7 ++++++- classes/amazon-s3-and-cloudfront.php | 4 ++-- languages/amazon-s3-and-cloudfront-en.pot | 2 +- readme.txt | 7 ++++++- .../ContainerAwareEventDispatcher.php | 2 +- vendor/Aws2/symfony/event-dispatcher/Event.php | 4 ++-- vendor/Aws2/symfony/event-dispatcher/LICENSE | 2 +- vendor/Aws2/vendor/autoload.php | 2 +- vendor/Aws2/vendor/composer/ClassLoader.php | 14 +++++--------- vendor/Aws2/vendor/composer/LICENSE | 2 +- vendor/Aws2/vendor/composer/autoload_real.php | 12 ++++++------ vendor/Aws2/vendor/composer/autoload_static.php | 6 +++--- wordpress-s3.php | 4 ++-- 13 files changed, 37 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 26444818..2a456d03 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ **Tags:** uploads, amazon, s3, amazon s3, mirror, admin, media, cdn, cloudfront **Requires at least:** 4.6 **Tested up to:** 4.9 -**Stable tag:** 1.3.1 +**Stable tag:** 1.3.2 **License:** GPLv3 Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally configure Amazon CloudFront for faster delivery. @@ -69,6 +69,11 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin ## Changelog ## +### WP Offload S3 Lite 1.3.2 - 2018-02-22 ### +* Bug fix: Fatal error: Uncaught Error: Call to undefined method Composer\Autoload\ClassLoader::setClassMapAuthoritative() +* Bug fix: AWS keys stored in database by Amazon Web Services plugin are not being migrated to new settings record +* Bug fix: Notice in settings page that Amazon Web Services plugin no longer required is not being shown when Amazon Web Services active + ### WP Offload S3 Lite 1.3.1 - 2018-02-20 ### * Bug fix: Fatal error in stream wrapper setup when AWS Keys not set diff --git a/classes/amazon-s3-and-cloudfront.php b/classes/amazon-s3-and-cloudfront.php index 8b7fd48d..2b56e3dc 100644 --- a/classes/amazon-s3-and-cloudfront.php +++ b/classes/amazon-s3-and-cloudfront.php @@ -4592,7 +4592,7 @@ public function settings_saved_notice() { private function handle_aws_access_key_migration() { add_action( 'aws_access_key_form_header', array( $this, 'handle_aws_access_key_form_header' ) ); - if ( class_exists( '\Amazon_Web_Services' ) ) { + if ( is_plugin_active( 'amazon-web-services/amazon-web-services.php' ) ) { $message = sprintf( __( 'Amazon Web Services Plugin No Longer Required — As of version 1.6 of WP Offload S3, the Amazon Web Services plugin is no longer required. We have removed the dependency by bundling a small portion of the AWS SDK into WP Offload S3. As long as none of your other active plugins or themes depend on the Amazon Web Services plugin, it should be safe to deactivate and delete it. %2$s', 'amazon-s3-and-cloudfront' ), 'https://wordpress.org/plugins/amazon-web-services/', @@ -4607,7 +4607,7 @@ private function handle_aws_access_key_migration() { if ( is_a( $this->aws, '\DeliciousBrains\WP_Offload_S3\Amazon_Web_Services' ) && $this->aws->needs_access_keys() ) { // Have access keys been defined in still active AWS plugin's database settings? - $aws_settings = get_site_option( \Amazon_Web_Services::SETTINGS_KEY ); + $aws_settings = get_site_option( 'aws_settings' ); // If both AWS keys set and we already have a bucket set, safe to use the AWS keys. if ( ! empty( $aws_settings['access_key_id'] ) && ! empty( $aws_settings['secret_access_key'] ) && false !== $this->get_setting( 'bucket' ) ) { diff --git a/languages/amazon-s3-and-cloudfront-en.pot b/languages/amazon-s3-and-cloudfront-en.pot index 05abe63b..3b6d15a2 100644 --- a/languages/amazon-s3-and-cloudfront-en.pot +++ b/languages/amazon-s3-and-cloudfront-en.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: amazon-s3-and-cloudfront\n" "Report-Msgid-Bugs-To: nom@deliciousbrains.com\n" -"POT-Creation-Date: 2018-02-20 23:01+0000\n" +"POT-Creation-Date: 2018-02-22 22:10+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/readme.txt b/readme.txt index 45e0717b..fb350408 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: bradt, deliciousbrains Tags: uploads, amazon, s3, amazon s3, mirror, admin, media, cdn, cloudfront Requires at least: 4.6 Tested up to: 4.9 -Stable tag: 1.3.1 +Stable tag: 1.3.2 License: GPLv3 Copies files to Amazon S3 as they are uploaded to the Media Library. Optionally configure Amazon CloudFront for faster delivery. @@ -65,6 +65,11 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin == Changelog == += WP Offload S3 Lite 1.3.2 - 2018-02-22 = +* Bug fix: Fatal error: Uncaught Error: Call to undefined method Composer\Autoload\ClassLoader::setClassMapAuthoritative() +* Bug fix: AWS keys stored in database by Amazon Web Services plugin are not being migrated to new settings record +* Bug fix: Notice in settings page that Amazon Web Services plugin no longer required is not being shown when Amazon Web Services active + = WP Offload S3 Lite 1.3.1 - 2018-02-20 = * Bug fix: Fatal error in stream wrapper setup when AWS Keys not set diff --git a/vendor/Aws2/symfony/event-dispatcher/ContainerAwareEventDispatcher.php b/vendor/Aws2/symfony/event-dispatcher/ContainerAwareEventDispatcher.php index bd052417..09a76fe2 100644 --- a/vendor/Aws2/symfony/event-dispatcher/ContainerAwareEventDispatcher.php +++ b/vendor/Aws2/symfony/event-dispatcher/ContainerAwareEventDispatcher.php @@ -58,7 +58,7 @@ public function removeListener($eventName, $listener) $this->lazyLoad($eventName); if (isset($this->listenerIds[$eventName])) { foreach ($this->listenerIds[$eventName] as $i => $args) { - list($serviceId, $method, $priority) = $args; + list($serviceId, $method) = $args; $key = $serviceId . '.' . $method; if (isset($this->listeners[$eventName][$key]) && $listener === array($this->listeners[$eventName][$key], $method)) { unset($this->listeners[$eventName][$key]); diff --git a/vendor/Aws2/symfony/event-dispatcher/Event.php b/vendor/Aws2/symfony/event-dispatcher/Event.php index 83637936..3747d890 100644 --- a/vendor/Aws2/symfony/event-dispatcher/Event.php +++ b/vendor/Aws2/symfony/event-dispatcher/Event.php @@ -80,7 +80,7 @@ public function setDispatcher(\DeliciousBrains\WP_Offload_S3\Aws2\Symfony\Compon */ public function getDispatcher() { - @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.4 and will be removed in 3.0. The event dispatcher instance can be received in the listener call instead.', E_USER_DEPRECATED); + @trigger_error('The ' . __METHOD__ . ' method is deprecated since Symfony 2.4 and will be removed in 3.0. The event dispatcher instance can be received in the listener call instead.', E_USER_DEPRECATED); return $this->dispatcher; } /** @@ -92,7 +92,7 @@ public function getDispatcher() */ public function getName() { - @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.4 and will be removed in 3.0. The event name can be received in the listener call instead.', E_USER_DEPRECATED); + @trigger_error('The ' . __METHOD__ . ' method is deprecated since Symfony 2.4 and will be removed in 3.0. The event name can be received in the listener call instead.', E_USER_DEPRECATED); return $this->name; } /** diff --git a/vendor/Aws2/symfony/event-dispatcher/LICENSE b/vendor/Aws2/symfony/event-dispatcher/LICENSE index 17d16a13..21d7fb9e 100644 --- a/vendor/Aws2/symfony/event-dispatcher/LICENSE +++ b/vendor/Aws2/symfony/event-dispatcher/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/Aws2/vendor/autoload.php b/vendor/Aws2/vendor/autoload.php index 0f596424..c5fd6733 100644 --- a/vendor/Aws2/vendor/autoload.php +++ b/vendor/Aws2/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInitb127febfbbf51dd979ed3800a48c7fc1::getLoader(); +return ComposerAutoloaderInit6aae2ad87930358e7c7b36cea3852fa0::getLoader(); diff --git a/vendor/Aws2/vendor/composer/ClassLoader.php b/vendor/Aws2/vendor/composer/ClassLoader.php index 2c72175e..8b309473 100644 --- a/vendor/Aws2/vendor/composer/ClassLoader.php +++ b/vendor/Aws2/vendor/composer/ClassLoader.php @@ -10,12 +10,12 @@ * file that was distributed with this source code. */ -namespace Composer\Autoload; +namespace DeliciousBrains\WP_Offload_S3\Aws2\Composer\Autoload; /** * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. * - * $loader = new \Composer\Autoload\ClassLoader(); + * $loader = new \DeliciousBrains\WP_Offload_S3\Aws2\Composer\Autoload\ClassLoader(); * * // register classes with namespaces * $loader->add('Symfony\Component', __DIR__.'/component'); @@ -374,13 +374,9 @@ private function findFileWithExtension($class, $ext) $first = $class[0]; if (isset($this->prefixLengthsPsr4[$first])) { - $subPath = $class; - while (false !== $lastPos = strrpos($subPath, '\\')) { - $subPath = substr($subPath, 0, $lastPos); - $search = $subPath.'\\'; - if (isset($this->prefixDirsPsr4[$search])) { - foreach ($this->prefixDirsPsr4[$search] as $dir) { - $length = $this->prefixLengthsPsr4[$first][$search]; + foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { + if (0 === strpos($class, $prefix)) { + foreach ($this->prefixDirsPsr4[$prefix] as $dir) { if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { return $file; } diff --git a/vendor/Aws2/vendor/composer/LICENSE b/vendor/Aws2/vendor/composer/LICENSE index f27399a0..1a281248 100644 --- a/vendor/Aws2/vendor/composer/LICENSE +++ b/vendor/Aws2/vendor/composer/LICENSE @@ -1,5 +1,5 @@ -Copyright (c) Nils Adermann, Jordi Boggiano +Copyright (c) 2016 Nils Adermann, Jordi Boggiano Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/Aws2/vendor/composer/autoload_real.php b/vendor/Aws2/vendor/composer/autoload_real.php index 2b389bf8..5212fcf1 100644 --- a/vendor/Aws2/vendor/composer/autoload_real.php +++ b/vendor/Aws2/vendor/composer/autoload_real.php @@ -2,13 +2,13 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitb127febfbbf51dd979ed3800a48c7fc1 +class ComposerAutoloaderInit6aae2ad87930358e7c7b36cea3852fa0 { private static $loader; public static function loadClassLoader($class) { - if ('Composer\Autoload\ClassLoader' === $class) { + if ('DeliciousBrains\WP_Offload_S3\Aws2\Composer\Autoload\ClassLoader' === $class) { require __DIR__ . '/ClassLoader.php'; } } @@ -19,15 +19,15 @@ public static function getLoader() return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitb127febfbbf51dd979ed3800a48c7fc1', 'loadClassLoader'), true, true); - self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInitb127febfbbf51dd979ed3800a48c7fc1', 'loadClassLoader')); + spl_autoload_register(array('ComposerAutoloaderInit6aae2ad87930358e7c7b36cea3852fa0', 'loadClassLoader'), true, true); + self::$loader = $loader = new \DeliciousBrains\WP_Offload_S3\Aws2\Composer\Autoload\ClassLoader(); + spl_autoload_unregister(array('ComposerAutoloaderInit6aae2ad87930358e7c7b36cea3852fa0', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { require_once __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInitb127febfbbf51dd979ed3800a48c7fc1::getInitializer($loader)); + call_user_func(\DeliciousBrains\WP_Offload_S3\Aws2\Composer\Autoload\ComposerStaticInit6aae2ad87930358e7c7b36cea3852fa0::getInitializer($loader)); } else { $classMap = require __DIR__ . '/autoload_classmap.php'; if ($classMap) { diff --git a/vendor/Aws2/vendor/composer/autoload_static.php b/vendor/Aws2/vendor/composer/autoload_static.php index c1a73308..d76d825e 100644 --- a/vendor/Aws2/vendor/composer/autoload_static.php +++ b/vendor/Aws2/vendor/composer/autoload_static.php @@ -2,9 +2,9 @@ // autoload_static.php @generated by Composer -namespace Composer\Autoload; +namespace DeliciousBrains\WP_Offload_S3\Aws2\Composer\Autoload; -class ComposerStaticInitb127febfbbf51dd979ed3800a48c7fc1 +class ComposerStaticInit6aae2ad87930358e7c7b36cea3852fa0 { public static $classMap = array ( 'ComposerLintTask' => __DIR__ . '/../..' . '/guzzle/guzzle/phing/tasks/ComposerLintTask.php', @@ -520,7 +520,7 @@ class ComposerStaticInitb127febfbbf51dd979ed3800a48c7fc1 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->classMap = ComposerStaticInitb127febfbbf51dd979ed3800a48c7fc1::$classMap; + $loader->classMap = ComposerStaticInit6aae2ad87930358e7c7b36cea3852fa0::$classMap; }, null, ClassLoader::class); } diff --git a/wordpress-s3.php b/wordpress-s3.php index 89cc7780..6ea21f6b 100644 --- a/wordpress-s3.php +++ b/wordpress-s3.php @@ -4,7 +4,7 @@ Plugin URI: http://wordpress.org/extend/plugins/amazon-s3-and-cloudfront/ Description: Automatically copies media uploads to Amazon S3 for storage and delivery. Optionally configure Amazon CloudFront for even faster delivery. Author: Delicious Brains -Version: 1.3.1 +Version: 1.3.2 Author URI: https://deliciousbrains.com/ Network: True Text Domain: amazon-s3-and-cloudfront @@ -26,7 +26,7 @@ // Then completely rewritten. */ -$GLOBALS['aws_meta']['amazon-s3-and-cloudfront']['version'] = '1.3.1'; +$GLOBALS['aws_meta']['amazon-s3-and-cloudfront']['version'] = '1.3.2'; require_once dirname( __FILE__ ) . '/classes/as3cf-compatibility-check.php';