New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IntlBreakIterator::getRules() does not exist #125

Open
leofeyer opened this Issue Oct 11, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@leofeyer
Member

leofeyer commented Oct 11, 2018

Affected version(s)

4.6+

Description

@ausi I wonder how this code has ever worked:

$iterator = \IntlBreakIterator::createWordInstance($strLocale);
$iterator->setText($strText);
$words = array();
foreach ($iterator->getPartsIterator() as $part)
{
if ($iterator->getRuleStatus() !== \IntlBreakIterator::WORD_NONE)
{
$words[] = $part;
}
}

The getRules() method only exists in the IntlRuleBasedBreakIterator class but not in the IntlBreakIterator class. I think we need to fix this, don't we?

@leofeyer leofeyer added the defect label Oct 11, 2018

@leofeyer leofeyer added this to the 4.6.7 milestone Oct 11, 2018

@ausi

This comment has been minimized.

Show comment
Hide comment
@ausi

ausi Oct 11, 2018

Member

What do you mean by IntlBreakIterator::getRules() doesn’t exist? It is not used in the linked code.

I can’t see why it should not work, working example: https://3v4l.org/BiUYW

Member

ausi commented Oct 11, 2018

What do you mean by IntlBreakIterator::getRules() doesn’t exist? It is not used in the linked code.

I can’t see why it should not work, working example: https://3v4l.org/BiUYW

@leofeyer

This comment has been minimized.

Show comment
Hide comment
@leofeyer

leofeyer Oct 11, 2018

Member

WTF? The method should not exist in this class. 😄

Maybe 3v4l.org uses an old Intl version?

Member

leofeyer commented Oct 11, 2018

WTF? The method should not exist in this class. 😄

Maybe 3v4l.org uses an old Intl version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment