Skip to content

Commit 0b9dfcf

Browse files
committed
chore: cleanup
1 parent feeabe3 commit 0b9dfcf

16 files changed

Lines changed: 768 additions & 3023 deletions

.editorconfig

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,15 @@
1-
# EditorConfig is awesome: http://EditorConfig.org
2-
3-
# top-most EditorConfig file
41
root = true
52

6-
# Unix-style newlines with a newline ending every file
73
[*]
8-
end_of_line = lf
94
charset = utf-8
5+
indent_size = 4
6+
indent_style = space
7+
end_of_line = lf
108
insert_final_newline = true
119
trim_trailing_whitespace = true
12-
indent_style = tab
13-
indent_size = 4
1410

1511
[*.md]
16-
indent_style = space
17-
indent_size = 2
18-
19-
# don't add newlines to test files
20-
[tests/*]
21-
indent_style = tabs
2212
trim_trailing_whitespace = false
23-
insert_final_newline = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2

.gitattributes

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
* text=auto
2+
3+
# Path-based git attributes
4+
# https://git-scm.com/docs/gitattributes
5+
6+
# Ignore all test and documentation with "export-ignore".
7+
/.editorconfig export-ignore
8+
/.gitattributes export-ignore
9+
/.github export-ignore
10+
/.gitignore export-ignore
11+
/CHANGELOG.md export-ignore
12+
/docs export-ignore
13+
/phpstan.neon.dist export-ignore
14+
/phpunit.xml.dist export-ignore
15+
/tests export-ignore

.github/workflows/lint.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
env:
13+
PREVENT_OUTPUT: true
14+
strategy:
15+
fail-fast: true
16+
matrix:
17+
php: [8.1]
18+
19+
name: P${{ matrix.php }} ${{ matrix.stability }}
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v3
24+
25+
- name: Setup PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php }}
29+
extensions: dom, libxml
30+
coverage: none
31+
32+
- name: Setup problem matchers
33+
run: |
34+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
35+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
36+
37+
- name: Install dependencies
38+
run: |
39+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --ansi
40+
41+
- name: Execute tests
42+
run: composer test:unit

.gitignore

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1-
tests/*.output
2-
*.sublime-project
3-
*.sublime-workspace
4-
vendor/
5-
**/*.DS_Store
1+
.idea
2+
.php_cs
3+
.php_cs.cache
4+
.phpunit.result.cache
5+
build
6+
composer.lock
7+
coverage
8+
docs
9+
phpunit.xml
10+
phpstan.neon
11+
testbench.yaml
12+
vendor
13+
node_modules
14+
.php-cs-fixer.cache

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 Jevon Wright
3+
Copyright (c) 2022 Worksome
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ You can use [Composer](http://getcomposer.org/) to add the [package](https://pac
6060
And then use it quite simply:
6161

6262
```php
63-
$text = \Soundasleep\Html2Text::convert($html);
63+
$text = \Worksome\Html2Text::convert($html);
6464
```
6565

6666
You can also include the supplied `html2text.php` and use `$text = convert_html_to_text($html);` instead.
@@ -79,7 +79,7 @@ $options = array(
7979
'ignore_errors' => true,
8080
// other options go here
8181
);
82-
$text = \Soundasleep\Html2Text::convert($html, $options);
82+
$text = \Worksome\Html2Text::convert($html, $options);
8383
```
8484

8585
## Tests

composer.json

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,30 @@
11
{
2-
"name": "soundasleep/html2text",
3-
"description": "A PHP script to convert HTML into a plain text format",
4-
"type": "library",
5-
"keywords": [ "php", "html", "text", "email" ],
6-
"homepage": "https://github.com/soundasleep/html2text",
7-
"license": "MIT",
8-
"authors": [
9-
{
10-
"name": "Jevon Wright",
11-
"homepage": "https://jevon.org",
12-
"role": "Developer"
2+
"name": "worksome/html2text",
3+
"description": "A PHP script to convert HTML into a plain text format",
4+
"type": "library",
5+
"license": "MIT",
6+
"autoload": {
7+
"psr-4": {
8+
"Worksome\\Html2Text\\": "src/"
9+
}
10+
},
11+
"require": {
12+
"php": "^8.1",
13+
"ext-dom": "*",
14+
"ext-libxml": "*"
15+
},
16+
"require-dev": {
17+
"pestphp/pest": "^1.22.1",
18+
"soundasleep/component-tests": "^0.2.1"
19+
},
20+
"scripts": {
21+
"test:unit": "vendor/bin/pest -p"
22+
},
23+
"minimum-stability": "dev",
24+
"prefer-stable": true,
25+
"config": {
26+
"allow-plugins": {
27+
"pestphp/pest-plugin": true
28+
}
1329
}
14-
],
15-
"autoload": {
16-
"psr-4": {
17-
"Soundasleep\\": "src"
18-
}
19-
},
20-
"support": {
21-
"email": "support@jevon.org"
22-
},
23-
"require": {
24-
"php": "^7.0|^8.0",
25-
"ext-dom": "*",
26-
"ext-libxml": "*"
27-
},
28-
"require-dev": {
29-
"phpunit/phpunit": "^7.0|^8.0|^9.0",
30-
"soundasleep/component-tests": "^0.2"
31-
}
3230
}

0 commit comments

Comments
 (0)