Download the PHP package barnabywalters/mf-cleaner without Composer
On this page you can find all versions of the php package barnabywalters/mf-cleaner. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download barnabywalters/mf-cleaner
More information about barnabywalters/mf-cleaner
Files in barnabywalters/mf-cleaner
Package mf-cleaner
Short Description Cleans up microformats2 array structures
License MIT
Informations about the package mf-cleaner
php-mf-cleaner
Lots of little helpers for processing canonical microformats2 array structures. Counterpart to indieweb/php-mf2.
Installation
barnabywalters/mf-cleaner is currently tested against and compatible with PHP 7.3, 7.4, 8.0 and 8.1.
Install barnabywalters/mf-cleaner using composer:
composer.phar require barnabywalters/mf-cleaner
composer.phar install (or composer.phar update)
Versioned releases are GPG signed so you can verify that the code hasn’t been tampered with.
gpg --recv-keys 1C00430B19C6B426922FE534BEF8CE58118AD524
cd vendor/barnabywalters/mf-cleaner
git tag -v v0.2.0 # Replace with the version you have installed
Usage
Most of the functions are self explanatory, and all come with summaries in docblocks if something is unclear. This example shows the most common usage:
Contributing
If you have any questions about using this library, join the indieweb dev chatroom, and ping barnaby
or ask one of the other friendly people there.
If you find a bug or problem with the library, or want to suggest a feature, please create an issue.
If discussions lead to you wanting to submit a pull request, following this process, while not required, will increase the chances of it quickly being accepted:
- Fork this repo to your own github account, and clone it to your development computer.
- Run
./run_coverage.sh
and ensure that all tests pass — you’ll need XDebug for code coverage data. - If applicable, write failing regression tests e.g. for a bug you’re fixing.
- Make your changes.
- Run
./run_coverage.sh
andopen docs/coverage/index.html
. Make sure that the changes you made are covered by tests. mf-cleaner had nearly 100% test coverage from early in its development, and that number should never go down! - Run
./vendor/bin/psalm
and and fix any warnings it brings up. - Install and run
./phpDocumentor.phar
to regenerate the documentation if applicable. - Push your changes and submit the PR.
Changelog
v0.2.0
2022-11-15
Awoken from their eight year long slumber, the maintainer lurched into activity to release a long-overdue update…
Breaking Changes:
- Raised minimum PHP version to 7.3
- Renamed main branch from
master
tomain
. If you were requiringdev-master
you will need to rename it todev-main
Other changes:
- Added support for img-alt structures.
getPlaintext()
andtoPlaintext()
correctly return thevalue
value. AddedisImgAlt()
,toImgAlt()
andgetImgAlt()
, all of which do exactly what you’d expect them to. - Initial implementation of
removeFalsePositiveRootMicroformats()
, to restructure mf2 data into something usable when known non-mf2 h-* classnames are used - Added some more tests to improve coverage
- Set up GH Action CI to test against PHP 7.3, 7.4, 8.0 and 8.1
- Set up /docs with generated documentation (thanks HongPong!) and public code coverage info
- getAuthor additionally looks for an h-feed author property (thanks aaronpk!)
- Moved deeply nested Functions file to a shallower location for convenience
- Started signing release tags to enable verification
- Updated readme usage
v0.1.4
2014-10-06
- Improved getAuthor() algorithm, made non-standard portions optional
- Added getRepresentativeHCard() function implementing http://microformats.org/wiki/representative-h-card-parsing
v0.1.3
2014-05-16
- Fixed issue causing getAuthor to return non-h-card microformats
v0.1.2
v0.1.1
v0.1.0
- Initial version