-
Notifications
You must be signed in to change notification settings - Fork 2
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
Updated for windows and bash #5
Open
RickKukiela
wants to merge
9
commits into
johnzuk:master
Choose a base branch
from
BelniakMedia:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ae667f1
Update README.MD
f6e2aa6
See readme for changes list. Changed shell command to work with windo…
97b4d1d
fixed readme
6a64128
changed package name in composer.json
b77685b
Update composer.json
fbbc7ff
Please do not edit this fork. Merge it and then edit your version.
ab78e1d
Fixed a few php8 type issues where stemcommand and findcommand could …
RickKukiela b00e472
Merge branch 'master' of ssh://github.com/Belniakmedia/HunspellPHP
RickKukiela ac58979
Version 2.0.0
RickKukiela File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.idea | ||
composer.lock | ||
vendor |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## Changelog | ||
### Version 2.0.0 | ||
#### Added | ||
- Added PHP8.0 typed class, | ||
- Added constructor to main `HunspellPHP` class where the `$dictionary`, `$encoding` and `$dictionary_path` cal be set/overridden during initialization. | ||
- Added `$dictionary_path` as a new argument were the dictionary files path may be specified (system default search locations are used otherwise). Additional `get()` and `set()`methods added. | ||
- Added functionality to `findCommand` method via new `(bool)$stem_mode` argument. | ||
#### Removed | ||
- Removed `findStemCommand` method. | ||
- Removed unused exception classes. | ||
- Removed `HunspellPHP\Exceptions` namespace. | ||
- Removed composer.lock from repo. | ||
#### Fixed | ||
- Renamed `$language` more appropriately `$dictionary` since that is what that property is referencing. | ||
- Moved HunspellMatchTypeException up one directory to \HunspellPHP namespace. | ||
- Fixed an issue where not all `$match` values were returned from the command response resulting in PHP warnings. | ||
- Fixed a missing type `-` extraction from the matcher regex which resulted in PHP warnings and bad responses. |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Hunspell PHP wrapper | ||
Forked from [johnzuk/HunspellPHP](https://github.com/johnzuk/HunspellPHP) | ||
|
||
### Version 2.0.0 | ||
Version 2.0.0 and above requires PHP ^8.0.0 and includes an important fix to the result matcher regex. If you need this for an older version of PHP I recommend that you fork 1.2 and update the regex matcher property of the Hunspell class to what is set in the current version of the code. | ||
|
||
[View Changelog](CHANGELOG.md) | ||
|
||
### The reason for this fork | ||
This project was initially forked because the shell commands used were for a non-bash shell. This fork's main purpose was to convert the shell commands to a BASH compatible syntax and add support for Windows powershell. As such this fork will not work correctly outside of a bash or powershell environment. | ||
|
||
An additional change was made to the parsing of the return value as the `PHP_EOL` value used in the original source was not working in my testing. This was changed to "\n" which resolved the issue. | ||
|
||
Example | ||
=================== | ||
```php | ||
$hunspell = new \HunspellPHP\Hunspell(); | ||
var_dump($hunspell->find('otwórz')); | ||
``` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
{ | ||
"name": "hunspell-php/hunspell-php", | ||
"name": "belniakmedia/hunspell-php", | ||
"description": "Hunspell PHP wrapper", | ||
"minimum-stability": "dev", | ||
"version": "2.0.0", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Janusz Żukowicz", | ||
"email": "[email protected]" | ||
"name": "Richard Kukiela", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"php" : ">=5.6" | ||
"php" : ">=8.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"HunspellPHP\\": "src/HunspellPHP" | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to mention in the notes that I also changed the split char from " " to a regex \W because when people search for things on my site like blue/black it chokes up. I also added a catch in case something else breaks a warning is not thown if vars of two sizes are going to be passed to array_combine.