Convert enchant resources to opaque objects#5577
Closed
kocsismate wants to merge 1 commit intophp:masterfrom
Closed
Convert enchant resources to opaque objects#5577kocsismate wants to merge 1 commit intophp:masterfrom
kocsismate wants to merge 1 commit intophp:masterfrom
Conversation
Additionally, deprecate ENCHANT_MYSPELL and ENCHANT_ISPELL constants. Co-authored-by: Remi Collet <remi@php.net>
8db5d60 to
ba1bc4d
Compare
kocsismate
commented
May 28, 2020
|
|
||
| /** @param resource $broker */ | ||
| function enchant_broker_free($broker): bool {} | ||
| final class EnchantDict |
Member
Author
There was a problem hiding this comment.
Could we use EnchantDictionary instead? The usage of the Dict abbreviation doesn't seem to fit PHP's recent naming strategy.
Member
Author
There was a problem hiding this comment.
I used EnchantDictionary
nikic
approved these changes
May 29, 2020
| RETURN_RES(dict->rsrc); | ||
| object_init_ex(return_value, enchant_dict_ce); | ||
| dict = Z_ENCHANT_DICT_P(return_value); | ||
| dict->pdict =pdict; |
Member
There was a problem hiding this comment.
Suggested change
| dict->pdict =pdict; | |
| dict->pdict = pdict; |
Member
Author
There was a problem hiding this comment.
Fixed this (as well as adding an upgrading notes) when committing to master
|
|
||
| /** @param resource $broker */ | ||
| function enchant_broker_free($broker): bool {} | ||
| final class EnchantDict |
Member
Author
|
I'm wondering if it is still ok to deprecate |
Member
|
@kocsismate It's okay, imho. |
jrfnl
added a commit
to PHPCompatibility/PHPCompatibility
that referenced
this pull request
Aug 10, 2020
> Deprecate enchant_broker_set_dict_path, enchant_broker_get_dict_path > enchant_dict_add_to_personal and enchant_dict_is_in_session Ref: https://github.com/php/php-src/blob/c0172aa2bdb9ea223c8491bdb300995b93a857a0/NEWS#L71 > - enchant_broker_set_dict_path and enchant_broker_get_dict_path > not available in libenchant < 1.5 nor in libenchant-2 > - enchant_dict_add_to_personal, use enchant_dict_add instead > - enchant_dict_is_in_session, use enchant_dict_is_added instead > - enchant_broker_free and enchant_broker_free_dict, unset the object instead Refs: * https://github.com/php/php-src/blob/c0172aa2bdb9ea223c8491bdb300995b93a857a0/UPGRADING#L662-L666 * php/php-src#5492 * php/php-src@66d42e9 * php/php-src#5577 * php/php-src@cd3e04d Includes unit tests.
jrfnl
added a commit
to PHPCompatibility/PHPCompatibility
that referenced
this pull request
Aug 10, 2020
> ENCHANT_MYSPELL and ENCHANT_ISPELL constants Refs: * https://github.com/php/php-src/blob/c0172aa2bdb9ea223c8491bdb300995b93a857a0/UPGRADING#L667 * php/php-src#5577 * php/php-src@cd3e04d Includes unit tests.
jrfnl
added a commit
to PHPCompatibility/PHPCompatibility
that referenced
this pull request
Aug 10, 2020
> ENCHANT_MYSPELL and ENCHANT_ISPELL constants Refs: * https://github.com/php/php-src/blob/c0172aa2bdb9ea223c8491bdb300995b93a857a0/UPGRADING#L667 * php/php-src#5577 * php/php-src@cd3e04d Includes unit tests.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Additionally, deprecate ENCHANT_MYSPELL and ENCHANT_ISPELL constants.
This PR is essentially the same as the reverted 5318971 commit, minus the OO interface.