{"id":20945085,"url":"https://github.com/vjik/linkify","last_synced_at":"2025-05-14T01:31:29.552Z","repository":{"id":43172599,"uuid":"339428540","full_name":"vjik/linkify","owner":"vjik","description":"Matches things like email addresses, web URLs, etc. in the text and makes them clickable links.","archived":false,"fork":false,"pushed_at":"2022-03-15T14:31:36.000Z","size":15,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-19T21:31:33.089Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vjik.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-16T14:40:27.000Z","updated_at":"2022-03-15T14:31:07.000Z","dependencies_parsed_at":"2022-09-06T10:31:29.149Z","dependency_job_id":null,"html_url":"https://github.com/vjik/linkify","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":"vjik/package-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vjik%2Flinkify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vjik%2Flinkify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vjik%2Flinkify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vjik%2Flinkify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vjik","download_url":"https://codeload.github.com/vjik/linkify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225160330,"owners_count":17430296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T23:46:38.513Z","updated_at":"2024-11-18T23:46:39.102Z","avatar_url":"https://github.com/vjik.png","language":"PHP","readme":"# Linkify\n\n[![Latest Stable Version](https://poser.pugx.org/vjik/linkify/v/stable.png)](https://packagist.org/packages/vjik/linkify)\n[![Total Downloads](https://poser.pugx.org/vjik/linkify/downloads.png)](https://packagist.org/packages/vjik/linkify)\n[![Build status](https://github.com/vjik/linkify/workflows/build/badge.svg)](https://github.com/vjik/linkify/actions?query=workflow%3Abuild)\n[![Mutation testing badge](https://img.shields.io/endpoint?style=flat\u0026url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fvjik%2Flinkify%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/vjik/linkify/master)\n[![static analysis](https://github.com/vjik/linkify/workflows/static%20analysis/badge.svg)](https://github.com/vjik/linkify/actions?query=workflow%3A%22static+analysis%22)\n\nThe package provide `Linkify` class that matches things like email addresses, web URLs, etc. in the text and makes them clickable links.\n\n## Requirements\n\n- PHP 7.4 or higher.\n\n## Installation\n\nThe package could be installed with [composer](https://getcomposer.org/download/):\n\n```shell\ncomposer require vjik/linkify --prefer-dist\n```\n\n## General usage\n\n```php\n$linkify = new \\Vjik\\Linkify\\Linkify(\n    new \\Vjik\\Linkify\\HttpPattern(),\n    new \\Vjik\\Linkify\\EmailPattern(),\n); \n\n$text = 'Contacts: https://example.com, info@example.com.';\n\n$result = $linkify-\u003eprocess($text);\n```\n\n`$result` will be:\n\n```html\nContacts: \u003ca href=\"https://example.com\"\u003eexample.com\u003c/a\u003e, \u003ca href=\"mailto:info@example.com\"\u003einfo@example.com\u003c/a\u003e.\n```\n\n## Testing\n\n### Unit testing\n\nThe package is tested with [PHPUnit](https://phpunit.de/). To run tests:\n\n```shell\n./vendor/bin/phpunit\n```\n\n### Mutation testing\n\nThe package tests are checked with [Infection](https://infection.github.io/) mutation framework with\n[Infection Static Analysis Plugin](https://github.com/Roave/infection-static-analysis-plugin). To run it:\n\n```shell\n./vendor/bin/roave-infection-static-analysis-plugin\n```\n\n### Static analysis\n\nThe code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis:\n\n```shell\n./vendor/bin/psalm\n```\n\n## License\n\nThe Linkify is free software. It is released under the terms of the BSD License.\nPlease see [`LICENSE`](./LICENSE.md) for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvjik%2Flinkify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvjik%2Flinkify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvjik%2Flinkify/lists"}