Skip to content

Commit

Permalink
Deploying version 1.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ianmjones committed Feb 22, 2018
1 parent 50991a4 commit 4a5a8c6
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 31 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions classes/amazon-s3-and-cloudfront.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
__( '<strong>Amazon Web Services Plugin No Longer Required</strong> &mdash; As of version 1.6 of WP Offload S3, the <a href="%1$s">Amazon Web Services</a> 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/',
Expand All @@ -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' ) ) {
Expand Down
2 changes: 1 addition & 1 deletion languages/amazon-s3-and-cloudfront-en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: amazon-s3-and-cloudfront\n"
"Report-Msgid-Bugs-To: [email protected]\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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
7 changes: 6 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
4 changes: 2 additions & 2 deletions vendor/Aws2/symfony/event-dispatcher/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
/**
Expand All @@ -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;
}
/**
Expand Down
2 changes: 1 addition & 1 deletion vendor/Aws2/symfony/event-dispatcher/LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion vendor/Aws2/vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitb127febfbbf51dd979ed3800a48c7fc1::getLoader();
return ComposerAutoloaderInit6aae2ad87930358e7c7b36cea3852fa0::getLoader();
14 changes: 5 additions & 9 deletions vendor/Aws2/vendor/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/Aws2/vendor/composer/LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 6 additions & 6 deletions vendor/Aws2/vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
}
Expand All @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions vendor/Aws2/vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions wordpress-s3.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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';

Expand Down

0 comments on commit 4a5a8c6

Please sign in to comment.