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

Proposed by Thomas Cuthbert on 2020-05-28
Status: Merged
Approved by: Barry Price on 2020-05-28
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 2020-05-28 Approve on 2020-05-28
Canonical IS Reviewers 2020-05-28 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.

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

6. By Thomas Cuthbert on 2020-05-28

Rename to SwiftObject as Object is a reserved keyword in php7

Barry Price (barryprice) wrote :

+1 LGTM

review: Approve

Change successfully merged at revision 6

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'classes/swift.php'
2--- classes/swift.php 2016-01-08 13:31:09 +0000
3+++ classes/swift.php 2020-05-28 05:03:43 +0000
4@@ -55,7 +55,7 @@
5
6 function uploadFile( $bucket_name, $object_key, $content, $type ) {
7 $container = $this->swift_get_client()->container($bucket_name);
8- $localObject = new \OpenStack\ObjectStore\v1\Resource\Object($object_key, $content, $type);
9+ $localObject = new \OpenStack\ObjectStore\v1\Resource\SwiftObject($object_key, $content, $type);
10 $container->save($localObject);
11 }
12
13
14=== modified file 'src/OpenStack/ObjectStore/v1/Resource/StreamWrapper.php'
15--- src/OpenStack/ObjectStore/v1/Resource/StreamWrapper.php 2015-02-11 15:35:31 +0000
16+++ src/OpenStack/ObjectStore/v1/Resource/StreamWrapper.php 2020-05-28 05:03:43 +0000
17@@ -845,7 +845,7 @@
18
19 // For many modes, we just go ahead and create.
20 if ($this->createIfNotFound) {
21- $this->obj = new Object($objectName);
22+ $this->obj = new SwiftObject($objectName);
23 $this->objStream = fopen('php://temp', 'rb+');
24
25 $this->isDirty = true;
26
27=== renamed file 'src/OpenStack/ObjectStore/v1/Resource/Object.php' => 'src/OpenStack/ObjectStore/v1/Resource/SwiftObject.php'
28--- src/OpenStack/ObjectStore/v1/Resource/Object.php 2015-02-11 15:35:31 +0000
29+++ src/OpenStack/ObjectStore/v1/Resource/SwiftObject.php 2020-05-28 05:03:43 +0000
30@@ -45,7 +45,7 @@
31 * Likewise, a Container instance can retrieve Object instances from the
32 * remote object store.
33 */
34-class Object
35+class SwiftObject
36 {
37 const DEFAULT_CONTENT_TYPE = 'application/octet-stream';
38

Subscribers

People subscribed via source and target branches