lstrojny / uffff
Unicode input processing made trivial
Requires
- php: >=8.2
- ext-intl: *
- ext-pcre: *
- lib-pcre-unicode: *
- webmozart/assert: ^1.11
Requires (Dev)
- ext-xdebug: *
- phpstan/extension-installer: ^1.2
- phpstan/phpstan: ^1.10
- phpstan/phpstan-strict-rules: ^1.5
- phpunit/phpunit: ^10.0
- psalm/plugin-phpunit: ^0.18.4
- roave/better-reflection: ^6.8
- rregeer/phpunit-coverage-check: ^0.3.1
- slevomat/coding-standard: ^8.8
- steos/quickcheck: ^v2.0
- symplify/easy-coding-standard: ^11.2 || ^12.0
- veewee/composer-run-parallel: ^1.2
- vimeo/psalm: ^5.9.0
- dev-develop
- v0.2.0
- v0.1.0
- dev-dependabot/composer/psr/log-3.0.1
- dev-dependabot/composer/phpstan/phpstan-1.11.11
- dev-dependabot/composer/sebastian/comparator-5.0.2
- dev-dependabot/composer/symplify/easy-coding-standard-12.3.5
- dev-dependabot/pip/docs/sphinx-8.0.2
- dev-dependabot/composer/symfony/process-7.1.3
- dev-dependabot/composer/symfony/string-7.1.3
- dev-dependabot/composer/symfony/console-6.4.10
- dev-dependabot/composer/squizlabs/php_codesniffer-3.10.2
- dev-dependabot/composer/composer/semver-3.4.2
- dev-dependabot/github_actions/shivammathur/setup-php-2.31.1
- dev-dependabot/composer/phpunit/phpunit-10.5.26
- dev-dependabot/composer/phpunit/php-code-coverage-10.1.15
- dev-dependabot/composer/symfony/filesystem-7.1.2
- dev-dependabot/composer/vimeo/psalm-5.25.0
- dev-dependabot/composer/symfony/polyfill-mbstring-1.30.0
- dev-dependabot/composer/symfony/polyfill-intl-grapheme-1.30.0
- dev-dependabot/composer/symfony/polyfill-intl-normalizer-1.30.0
- dev-dependabot/composer/symfony/polyfill-ctype-1.30.0
- dev-dependabot/github_actions/actions/checkout-4.1.7
- dev-dependabot/composer/myclabs/deep-copy-1.12.0
- dev-dependabot/composer/phpstan/extension-installer-1.4.1
- dev-dependabot/composer/phpstan/phpdoc-parser-1.29.1
- dev-dependabot/composer/composer/pcre-3.1.4
- dev-dependabot/composer/phpstan/phpstan-strict-rules-1.6.0
This package is auto-updated.
Last update: 2024-12-21 19:32:01 UTC
README
Properly processing unicode user input is surprisingly tricky:
- Ensuring bidirectional markers are balanced properly
- Trimming whitespaces and handling esoteric unicode whitespaces well
- Normalizing unicode equivalent characters to a well-known form
- Harmonizing newlines to a single format
- … and more
With Uffff the problem is reduced to:
$good = Uffff\unicode($bad);
Read the docs to learn more.
Development
Setting up the environment
Uffff uses direnv to set up the development environment. Run direnv allow
to initialize the
development environment.
To switch to a different PHP version for development or if you prefer not to use direnv, you can use nix develop
to
initialize the environment:
nix develop github:loophp/nix-shell#env-php82 --impure
to select PHP 8.2nix develop github:loophp/nix-shell#env-php83 --impure
to select PHP 8.3nix develop github:loophp/nix-sphinx
to set up sphinx to build documentation
Making changes
Change the code and then run composer check
to run tests, static inspection, everything and the kitchen sink. Once
that succeeds, open a pull request.
Edit the documentation in docs/
and run composer docs
to build the documentation. Open build/docs/html/index.html
in a browser to view the HTML version.