Merge lp:~tcuthbert/wordpress/openstack-objectstorage into lp:~canonical-sysadmins/wordpress/openstack-objectstorage

Proposed by Thomas Cuthbert
Status: Merged
Approved by: Barry Price
Approved revision: 6
Merged at revision: 6
Proposed branch: lp:~tcuthbert/wordpress/openstack-objectstorage
Merge into: lp:~canonical-sysadmins/wordpress/openstack-objectstorage
Diff against target: 37 lines (+3/-3)
3 files modified
classes/swift.php (+1/-1)
src/OpenStack/ObjectStore/v1/Resource/StreamWrapper.php (+1/-1)
src/OpenStack/ObjectStore/v1/Resource/SwiftObject.php (+1/-1)
To merge this branch: bzr merge lp:~tcuthbert/wordpress/openstack-objectstorage
Reviewer Review Type Date Requested Status
Barry Price Approve
Canonical IS Reviewers Pending
Review via email: mp+384694@code.launchpad.net

Commit message

Rename to SwiftObject as Object is a reserved keyword in php7

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

6. By Thomas Cuthbert

Rename to SwiftObject as Object is a reserved keyword in php7

Revision history for this message
Barry Price (barryprice) wrote :

+1 LGTM

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 6

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'classes/swift.php'
--- classes/swift.php 2016-01-08 13:31:09 +0000
+++ classes/swift.php 2020-05-28 05:03:43 +0000
@@ -55,7 +55,7 @@
5555
56 function uploadFile( $bucket_name, $object_key, $content, $type ) {56 function uploadFile( $bucket_name, $object_key, $content, $type ) {
57 $container = $this->swift_get_client()->container($bucket_name);57 $container = $this->swift_get_client()->container($bucket_name);
58 $localObject = new \OpenStack\ObjectStore\v1\Resource\Object($object_key, $content, $type);58 $localObject = new \OpenStack\ObjectStore\v1\Resource\SwiftObject($object_key, $content, $type);
59 $container->save($localObject);59 $container->save($localObject);
60 }60 }
6161
6262
=== modified file 'src/OpenStack/ObjectStore/v1/Resource/StreamWrapper.php'
--- src/OpenStack/ObjectStore/v1/Resource/StreamWrapper.php 2015-02-11 15:35:31 +0000
+++ src/OpenStack/ObjectStore/v1/Resource/StreamWrapper.php 2020-05-28 05:03:43 +0000
@@ -845,7 +845,7 @@
845845
846 // For many modes, we just go ahead and create.846 // For many modes, we just go ahead and create.
847 if ($this->createIfNotFound) {847 if ($this->createIfNotFound) {
848 $this->obj = new Object($objectName);848 $this->obj = new SwiftObject($objectName);
849 $this->objStream = fopen('php://temp', 'rb+');849 $this->objStream = fopen('php://temp', 'rb+');
850850
851 $this->isDirty = true;851 $this->isDirty = true;
852852
=== renamed file 'src/OpenStack/ObjectStore/v1/Resource/Object.php' => 'src/OpenStack/ObjectStore/v1/Resource/SwiftObject.php'
--- src/OpenStack/ObjectStore/v1/Resource/Object.php 2015-02-11 15:35:31 +0000
+++ src/OpenStack/ObjectStore/v1/Resource/SwiftObject.php 2020-05-28 05:03:43 +0000
@@ -45,7 +45,7 @@
45 * Likewise, a Container instance can retrieve Object instances from the45 * Likewise, a Container instance can retrieve Object instances from the
46 * remote object store.46 * remote object store.
47 */47 */
48class Object48class SwiftObject
49{49{
50 const DEFAULT_CONTENT_TYPE = 'application/octet-stream';50 const DEFAULT_CONTENT_TYPE = 'application/octet-stream';
5151

Subscribers

People subscribed via source and target branches