Skip to content

Commit

Permalink
Merge branch 'develop' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
dkotter committed Jul 10, 2023
2 parents 3634ce5 + 2db87e5 commit 4d8ecbc
Show file tree
Hide file tree
Showing 24 changed files with 4,056 additions and 515 deletions.
2 changes: 2 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
/.wordpress-org
/node_modules
/tasks
/tests

# Files
.DS_Store
.eslintrc.json
.distignore
.gitignore
.wp-env.json
CHANGELOG.md
CODE_OF_CONDUCT.md
composer.json
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: E2E test

on:
push:
branches:
- develop
- trunk
pull_request:
branches:
- develop
jobs:
cypress:
name: ${{ matrix.core.name }}
runs-on: ubuntu-latest
env:
CYPRESS_MICROSOFT_AZURE_ACCOUNT_NAME: ${{ secrets.MICROSOFT_AZURE_ACCOUNT_NAME }}
CYPRESS_MICROSOFT_AZURE_ACCOUNT_KEY: ${{ secrets.MICROSOFT_AZURE_ACCOUNT_KEY }}
CYPRESS_MICROSOFT_AZURE_CONTAINER: ${{ secrets.MICROSOFT_AZURE_CONTAINER }}
CYPRESS_MICROSOFT_AZURE_USE_FOR_DEFAULT_UPLOAD: ${{ secrets.MICROSOFT_AZURE_USE_FOR_DEFAULT_UPLOAD }}
strategy:
matrix:
core:
- {name: 'WP latest', version: 'latest'}
- {name: 'WP minimum', version: 'WordPress/WordPress#5.7'}
- {name: 'WP trunk', version: 'WordPress/WordPress#master'}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: npm install
- name: Composer (optional)
run: composer install
continue-on-error: true
- name: Build (optional)
run: npm run build
continue-on-error: true
- name: Set the core version
run: ./tests/bin/set-core-version.js ${{ matrix.core.version }}
- name: Set up WP environment
run: npm run env:start
- name: Test
run: npm run cypress:run
3 changes: 3 additions & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": [ "." ]
}
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file, per [the Ke

## [Unreleased] - TBD

## [4.3.5] - 2023-07-10
### Added
- Update docs with information on migrating to a new Azure Storage Account and compatibility issues with Media Library editing tools (props [@gioamato](https://github.com/gioamato), [@jeffpaul](https://github.com/jeffpaul), [@rickalee](https://github.com/rickalee), [@colegeissinger](https://github.com/colegeissinger) via [#163](https://github.com/10up/windows-azure-storage/issues/163)).
- Setup E2E tests on Cypress (props [@barneyjeffries](https://github.com/barneyjeffries), [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul) via [#179](https://github.com/10up/windows-azure-storage/issues/179)).

### Changed
- Bump WordPress version "tested up to" 6.2 (props [@Sidsector9](https://github.com/Sidsector9), [@jeffpaul](https://github.com/jeffpaul) via [#183](https://github.com/10up/windows-azure-storage/pull/183)).

### Fixed
- Ensure things work properly on PHP 7.4 (props [@dkotter](https://github.com/dkotter), [@Sidsector9](https://github.com/Sidsector9), [@faisal-alvi](https://github.com/faisal-alvi) via [#177](https://github.com/10up/windows-azure-storage/pull/177)).

## [4.3.4] - 2023-01-12
**Note that this release bumps the WordPress minimum version from 4.0 to 5.7 and the PHP minimum version from 5.6 to 7.4.**

Expand Down Expand Up @@ -217,6 +228,7 @@ All notable changes to this project will be documented in this file, per [the Ke
- First release of Microsoft Azure Storage plugin for WordPress.

[Unreleased]: https://github.com/10up/windows-azure-storage/compare/trunk...develop
[4.3.5]: https://github.com/10up/windows-azure-storage/compare/4.3.4...4.3.5
[4.3.4]: https://github.com/10up/windows-azure-storage/compare/4.3.3...4.3.4
[4.3.3]: https://github.com/10up/windows-azure-storage/compare/4.3.2...4.3.3
[4.3.2]: https://github.com/10up/windows-azure-storage/compare/4.3.1...4.3.2
Expand Down
2 changes: 1 addition & 1 deletion CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The following individuals are responsible for curating the list of issues, respo

Thank you to all the people who have already contributed to this repository via bug reports, code, design, ideas, project management, translation, testing, etc.

[Microsoft Open Technologies (@msopentech)](https://github.com/msopentech), [10up (@10up)](https://github.com/10up), [Morgan Estes (@morganestes)](https://github.com/morganestes), [Steve Grunwell (@stevegrunwell)](https://github.com/stevegrunwell), [Lukas Pawlik (@lukaspawlik)](https://github.com/lukaspawlik), [Ritesh Patel (@Ritesh-patel)](https://github.com/Ritesh-patel), [Peter Sorensen (@psorensen)](https://github.com/psorensen), [Eugene Manuilov (@eugene-manuilov)](https://github.com/eugene-manuilov), [Allan Collins (@allan23)](https://github.com/allan23), [(@jpaarhuis)](https://github.com/jpaarhuis), [Thorsten Ott (@tott)](https://github.com/tott), [Scott Lee (@scottlee)](https://github.com/scottlee), [Emmanuel Fidelino (@EmmanF)](https://github.com/EmmanF), [Joey Blake (@joeyblake)](https://github.com/joeyblake), [(@mrgregwaugh)](https://github.com/mrgregwaugh), [Elliott Stocks (@elliott-stocks)](https://github.com/elliott-stocks), [Brad Parbs (@bradp)](https://github.com/bradp), [Bibin Kurian (@bibinkurian)](https://github.com/bibinkurian), [Anu Thomas Chandy (@anuchandy)](https://github.com/anuchandy), [Suman Chawla (@suchawla)](https://github.com/suchawla), [(@mksunitha)](https://profiles.wordpress.org/mksunitha/), [Justin Kopepasah (@kopepasah)](https://github.com/kopepasah), [John Watkins (@johnwatkins0)](https://github.com/johnwatkins0), [Eduard Florea (@eflorea)](https://github.com/eflorea), [Jay Wood (@jaywood)](https://github.com/jaywood), [Ravi Chandra (@ravichdev)](https://github.com/ravichdev), [Ricky Lee Whittemore (@rickalee)](https://github.com/rickalee), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Oscar Sanchez S. (@oscarssanchez)](https://github.com/oscarssanchez), [Ricardo Moraleida (@moraleida)](https://github.com/moraleida), [Kentaro Ohkouchi (@nanasess)](https://github.com/nanasess), [David Greenwald (@davidegreenwald)](https://github.com/davidegreenwald), [Shah Qureshi (@ShahAaron)](https://github.com/ShahAaron), [(@lostfields)](https://github.com/lostfields), [Matthew McAchran (@mmcachran)](https://github.com/mmcachran), [Jake Edwards (@ShadowXVII)](https://github.com/ShadowXVII), [Cole Geissinger (@colegeissinger)](https://github.com/colegeissinger), [(@cally423)](https://github.com/cally423), [(@FreuxF)](https://github.com/FreuxF), [Eric Greenfield (@saltnpixels)](https://github.com/saltnpixels), [Peter Wilson (@peterwilsoncc)](https://github.com/peterwilsoncc), [Max Lyuchin (@cadic)](https://github.com/cadic), [Marius L. Jensen (@Clorith)](https://github.com/Clorith), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Debabrata Karfa (@debabratakarfa)](https://github.com/debabratakarfa), [Sudip Dadhaniya (@sudip-10up)](https://github.com/sudip-10up), [Curtis Loisel (@csloisel)](https://github.com/csloisel), [Siddharth Thevaril (@Sidsector9)](https://github.com/Sidsector9), [Jayedul Kabir (@jayedul)](https://github.com/jayedul), [Darin Kotter (@dkotter)](https://github.com/dkotter), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi), [Andrew Herder (@superpowered)](https://github.com/superpowered).
[Microsoft Open Technologies (@msopentech)](https://github.com/msopentech), [10up (@10up)](https://github.com/10up), [Morgan Estes (@morganestes)](https://github.com/morganestes), [Steve Grunwell (@stevegrunwell)](https://github.com/stevegrunwell), [Lukas Pawlik (@lukaspawlik)](https://github.com/lukaspawlik), [Ritesh Patel (@Ritesh-patel)](https://github.com/Ritesh-patel), [Peter Sorensen (@psorensen)](https://github.com/psorensen), [Eugene Manuilov (@eugene-manuilov)](https://github.com/eugene-manuilov), [Allan Collins (@allan23)](https://github.com/allan23), [(@jpaarhuis)](https://github.com/jpaarhuis), [Thorsten Ott (@tott)](https://github.com/tott), [Scott Lee (@scottlee)](https://github.com/scottlee), [Emmanuel Fidelino (@EmmanF)](https://github.com/EmmanF), [Joey Blake (@joeyblake)](https://github.com/joeyblake), [(@mrgregwaugh)](https://github.com/mrgregwaugh), [Elliott Stocks (@elliott-stocks)](https://github.com/elliott-stocks), [Brad Parbs (@bradp)](https://github.com/bradp), [Bibin Kurian (@bibinkurian)](https://github.com/bibinkurian), [Anu Thomas Chandy (@anuchandy)](https://github.com/anuchandy), [Suman Chawla (@suchawla)](https://github.com/suchawla), [(@mksunitha)](https://profiles.wordpress.org/mksunitha/), [Justin Kopepasah (@kopepasah)](https://github.com/kopepasah), [John Watkins (@johnwatkins0)](https://github.com/johnwatkins0), [Eduard Florea (@eflorea)](https://github.com/eflorea), [Jay Wood (@jaywood)](https://github.com/jaywood), [Ravi Chandra (@ravichdev)](https://github.com/ravichdev), [Ricky Lee Whittemore (@rickalee)](https://github.com/rickalee), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Oscar Sanchez S. (@oscarssanchez)](https://github.com/oscarssanchez), [Ricardo Moraleida (@moraleida)](https://github.com/moraleida), [Kentaro Ohkouchi (@nanasess)](https://github.com/nanasess), [David Greenwald (@davidegreenwald)](https://github.com/davidegreenwald), [Shah Qureshi (@ShahAaron)](https://github.com/ShahAaron), [(@lostfields)](https://github.com/lostfields), [Matthew McAchran (@mmcachran)](https://github.com/mmcachran), [Jake Edwards (@ShadowXVII)](https://github.com/ShadowXVII), [Cole Geissinger (@colegeissinger)](https://github.com/colegeissinger), [(@cally423)](https://github.com/cally423), [(@FreuxF)](https://github.com/FreuxF), [Eric Greenfield (@saltnpixels)](https://github.com/saltnpixels), [Peter Wilson (@peterwilsoncc)](https://github.com/peterwilsoncc), [Max Lyuchin (@cadic)](https://github.com/cadic), [Marius L. Jensen (@Clorith)](https://github.com/Clorith), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Debabrata Karfa (@debabratakarfa)](https://github.com/debabratakarfa), [Sudip Dadhaniya (@sudip-10up)](https://github.com/sudip-10up), [Curtis Loisel (@csloisel)](https://github.com/csloisel), [Siddharth Thevaril (@Sidsector9)](https://github.com/Sidsector9), [Jayedul Kabir (@jayedul)](https://github.com/jayedul), [Darin Kotter (@dkotter)](https://github.com/dkotter), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi), [Andrew Herder (@superpowered)](https://github.com/superpowered), [Giovanbattista Amato (@gioamato)](https://github.com/gioamato), [Barney Jeffries (@barneyjeffries)](https://github.com/barneyjeffries), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh).

## Libraries

Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,24 @@ If a Storage account is created with the new Azure portal, authentication will f
### Responsive Images in WordPress 4.4
Images uploaded to the Azure Storage service will not automatically receive responsive versions. Images added through the WordPress Media Loader *should* get automatically converted to responsive images when inserted into a post or page. We are investigating options for full support of responsive images in the plugin.

### Media Library Editor
Media editing tools are currently not working. The edited images are not uploaded to Azure Storage. Will be fixed in future releases.

### Azure Storage Account Migration
At the moment, changing the Azure Storage account (and blob URLs) requires to manually update data in the WordPress database.

Data should be updated in these tables:
1. `wp_options` (or `wp-config.php` or Settings > Microsoft Azure): plugin settings
2. `wp_posts`:
- links in `post_content` of pages and posts (rows with `post_type` = `page` or `post`)
- `guid` of rows with `post_type` = `attachment`
4. `wp_postmeta`: `meta_value` of rows with `meta_key` = `_wp_attachment_metadata` or `windows_azure_storage_info`

**Note:** data in `wp_postmeta` is PHP serialized, it cannot be updated with simple search-and-replace. There are multiple ways to do it:
1. Using WP-CLI, detailed instructions [here](https://dba.stackexchange.com/questions/64675/replace-string-within-serialized-data/239923#239923).
2. Directly inside WordPress, using the [Better Search Replace plugin](https://wordpress.org/plugins/better-search-replace/).
3. Using an external tool that supports PHP serialization, like [Search Replace DB](https://github.com/interconnectit/Search-Replace-DB).

## Changelog

A complete listing of all notable changes to Microsoft Azure Storage are documented in [CHANGELOG.md](https://github.com/10up/windows-azure-storage/blob/develop/CHANGELOG.md).
Expand Down
9 changes: 6 additions & 3 deletions includes/class-windows-azure-generic-list-response.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ public function __construct( array $rest_response, Windows_Azure_Rest_Api_Client
*
* @return mixed Can return any type.
*/
public function current(): mixed {
#[\ReturnTypeWillChange]
public function current() {
if ( ! isset( $this->_items[ $this->_position ] ) ) {
return null;
} else {
Expand Down Expand Up @@ -172,7 +173,8 @@ public function next(): void {
*
* @return mixed scalar on success, or null on failure.
*/
public function key(): mixed {
#[\ReturnTypeWillChange]
public function key() {
return $this->_position;
}

Expand Down Expand Up @@ -216,7 +218,8 @@ public function get_all() {
*
* @return null|string Next portion of data marker.
*/
public function get_next_marker(): mixed {
#[\ReturnTypeWillChange]
public function get_next_marker() {
return $this->_next_marker;
}

Expand Down
2 changes: 1 addition & 1 deletion js/windows-azure-storage-admin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! - v4.3.4
/*! - v4.3.5
* https://github.com/10up/windows-azure-storage#readme
* Copyright (c) 2019; */
(function ( $, window, undefined ) {
Expand Down
2 changes: 1 addition & 1 deletion js/windows-azure-storage-media-browser.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! - v4.3.4
/*! - v4.3.5
* https://github.com/10up/windows-azure-storage#readme
* Copyright (c) 2019; */
window.wp = window.wp || {};
Expand Down
Loading

0 comments on commit 4d8ecbc

Please sign in to comment.