Skip to content

Commit

Permalink
Framework: Remove deprecations slated for 2.5.0 removal (#5833)
Browse files Browse the repository at this point in the history
* Blocks: Extend deprecation timeline for Editable to 2.6

Documentation page is still active, despite having been removed: https://wordpress.org/gutenberg/handbook/block-api/editable-api/

* Framework: Remove deprecations slated for 2.5 removal
  • Loading branch information
aduth authored Mar 28, 2018
1 parent 464b8c6 commit b6b826c
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 152 deletions.
62 changes: 0 additions & 62 deletions blocks/hooks/deprecated.js

This file was deleted.

1 change: 0 additions & 1 deletion blocks/hooks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
import './align';
import './anchor';
import './custom-class-name';
import './deprecated';
import './generated-class-name';
import './layout';
71 changes: 0 additions & 71 deletions blocks/hooks/test/deprecated.js

This file was deleted.

2 changes: 1 addition & 1 deletion blocks/library/paragraph/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ export const settings = {
},
},
save( { attributes } ) {
return attributes.content;
return <RawHTML>{ attributes.content }</RawHTML>;
},
migrate( attributes ) {
return {
Expand Down
2 changes: 1 addition & 1 deletion blocks/rich-text/editable.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Editable extends RichText {
constructor() {
super( ...arguments );
deprecated( 'Editable', {
version: '2.5',
version: '2.6',
alternative: 'wp.blocks.RichText',
plugin: 'Gutenberg',
} );
Expand Down
6 changes: 3 additions & 3 deletions blocks/test/fixtures/core__paragraph__deprecated.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"attributes": {
"content": [
{
"_owner": null,
"_store": {},
"key": "html",
"ref": null,
"props": {
"children": "Unwrapped is <em>still</em> valid."
},
"ref": null
"_owner": null,
"_store": {}
}
],
"dropCap": false
Expand Down
11 changes: 0 additions & 11 deletions data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import memoize from 'memize';
/**
* WordPress dependencies
*/
import { deprecated } from '@wordpress/utils';
import { Component, getWrapperDisplayName } from '@wordpress/element';

/**
Expand Down Expand Up @@ -424,13 +423,3 @@ export function toAsyncIterable( object ) {
}
}() );
}

export const query = ( mapSelectToProps ) => {
deprecated( 'wp.data.query', {
version: '2.5',
alternative: 'wp.data.withSelect',
plugin: 'Gutenberg',
} );

return withSelect( mapSelectToProps );
};
5 changes: 3 additions & 2 deletions docs/deprecated.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
Gutenberg's deprecation policy is intended to support backwards-compatibility for two minor releases, when possible. The current deprecations are listed below and are grouped by _the version at which they will be removed completely_. If your plugin depends on these behaviors, you must update to the recommended alternative before the noted version.

## 2.6.0
- `wp.blocks.getBlockDefaultClassname` function removed. Please use `wp.blocks.getBlockDefaultClassName` instead.

- `wp.blocks.getBlockDefaultClassname` function removed. Please use `wp.blocks.getBlockDefaultClassName` instead.
- `wp.blocks.Editable` component removed. Please use the `wp.blocks.RichText` component instead.

## 2.5.0

- Returning raw HTML from block `save` is unsupported. Please use the `wp.element.RawHTML` component instead.
- `wp.blocks.Editable` component removed. Please use the `wp.blocks.RichText` component instead.
- `wp.data.query` higher-order component removed. Please use `wp.data.withSelect` instead.

## 2.4.0
Expand Down

0 comments on commit b6b826c

Please sign in to comment.