Skip to content

Commit d8551d9

Browse files
authored
Merge branch 'master' into master
2 parents 30b295f + ea59f29 commit d8551d9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+580
-519
lines changed

.dockerignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/.github
2+
/.idea
3+
/build
4+
/docs
5+
/vendor
6+
/.dockerignore
7+
/.gitattributes
8+
/.gitignore
9+
/composer.lock
10+
/CONTRIBUTING.md
11+
/Dockerfile
12+
/LICENSE
13+
/makefile
14+
/README.md

.gitattributes

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
* text=auto
22

3+
/.github export-ignore
34
/tests export-ignore
5+
/.dockerignore export-ignore
46
/.gitattributes export-ignore
57
/.gitignore export-ignore
6-
/.travis.yml export-ignore
7-
/appveyor.yml export-ignore
8+
/.php-cs-fixer.php export-ignore
9+
/CONTRIBUTING.md export-ignore
10+
/Dockerfile export-ignore
811
/makefile export-ignore
9-
/phpunit.xml.dist export-ignore
12+
/phpunit.xml export-ignore
1013
/README.md export-ignore
14+
/ruleset.xml.dist export-ignore

.github/workflows/docs.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: docs
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
tags: [ '*' ]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Generate docs
14+
run: make docs
15+
- name: Publish
16+
uses: s0/git-publish-subdir-action@develop
17+
env:
18+
REPO: self
19+
BRANCH: docs
20+
FOLDER: docs
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/healthcheck.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: healthcheck
2+
3+
on:
4+
schedule:
5+
- cron: "0 1 * * *"
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Test (twice, if needed)
13+
run: make test || make test
14+
- name: Healthcheck ping
15+
run: wget https://healthchecks.home.mullie.eu/ping/0ca5c263-bafb-4d7b-b6fc-f7d73991169f -T 10 -t 5 -O /dev/null

.github/workflows/test.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,30 @@ on:
77
branches: [ master ]
88

99
jobs:
10-
1110
build:
12-
1311
runs-on: ubuntu-latest
14-
1512
steps:
16-
- uses: actions/checkout@v2
17-
18-
- name: Test PHP 8.1 & submit codecov
19-
run: make test PHP=8.1 UP=1 DOWN=0 && bash <(curl -s https://codecov.io/bash) && make down PHP=8.1
20-
13+
- uses: actions/checkout@v3
14+
- name: Test PHP 8.2
15+
run: make test PHP=8.2
16+
- name: Test PHP 8.1
17+
run: make test PHP=8.1
2118
- name: Test PHP 8.0
2219
run: make test PHP=8.0
23-
2420
- name: Test PHP 7.4
2521
run: make test PHP=7.4
26-
2722
- name: Test PHP 7.3
2823
run: make test PHP=7.3
29-
3024
- name: Test PHP 7.2
3125
run: make test PHP=7.2
32-
3326
- name: Test PHP 7.1
3427
run: make test PHP=7.1
35-
3628
- name: Test PHP 5.6
3729
run: make test PHP=5.6
30+
- name: Test PHP 5.5
31+
run: make test PHP=5.5
32+
- name: Test PHP 5.4
33+
run: make test PHP=5.4
34+
- uses: codecov/codecov-action@v3
35+
with:
36+
directory: build

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
/.idea
12
/build
23
/docs
34
/vendor
4-
composer.lock
5-
5+
/composer.lock

.php-cs-fixer.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
$finder = PhpCsFixer\Finder::create()
4+
->exclude('vendor')
5+
->in(__DIR__);
6+
7+
$config = new PhpCsFixer\Config();
8+
9+
return $config
10+
->setRules(array(
11+
'@Symfony' => true,
12+
'array_syntax' => array('syntax' => 'long'),
13+
'single_line_throw' => false,
14+
'yoda_style' => array('equal' => false, 'identical' => false, 'less_and_greater' => false),
15+
'@PSR12' => true,
16+
'class_definition' => false, // @see https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/5463
17+
'visibility_required' => array('elements' => array('property', 'method')),
18+
))
19+
->setFinder($finder)
20+
->setUsingCache(false);

CONTRIBUTING.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,29 @@ you'd rather not risk wasting your time implementing a new feature only to see
1919
it turned down, please start the discussion by
2020
[opening an issue](https://github.com/matthiasmullie/minify/issues/new).
2121

22-
Don't forget to add your changes to the [changelog](CHANGELOG.md).
23-
2422

2523
### Testing
2624

2725
Please include tests for every change or addition to the code.
2826
To run the complete test suite:
2927

3028
```sh
31-
vendor/bin/phpunit
29+
make test
3230
```
3331

34-
When submitting a new pull request, please make sure that that the test suite
35-
passes (Travis CI will run it & report back on your pull request.)
36-
37-
To run the tests on Windows, run `tests/convert_symlinks_to_windows_style.sh`
38-
from the command line in order to convert Linux-style test symlinks to
39-
Windows-style.
32+
GitHub Actions have been [configured](.github/workflows/test.yml) to run supported
33+
PHP versions. Upon submitting a new pull request, that test suite will be run &
34+
report back on your pull request. Please make sure the test suite passes.
4035

4136

4237
### Coding standards
4338

44-
All code must follow [PSR-2](http://www.php-fig.org/psr/psr-2/). Just make sure
39+
All code must follow [PSR-12](http://www.php-fig.org/psr/psr-12/). Just make sure
4540
to run php-cs-fixer before submitting the code, it'll take care of the
4641
formatting for you:
4742

4843
```sh
49-
vendor/bin/php-cs-fixer fix src
50-
vendor/bin/php-cs-fixer fix tests
44+
make format
5145
```
5246

5347
Document the code thoroughly!

Dockerfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
ARG version=cli
2-
FROM php:$version
1+
ARG VERSION=cli
2+
FROM php:$VERSION
33

44
COPY . /var/www
55
WORKDIR /var/www
66

7+
RUN cat /etc/os-release | grep jessie && echo "deb http://archive.debian.org/debian jessie main" > /etc/apt/sources.list || true
8+
RUN cat /etc/os-release | grep stretch && echo "deb http://archive.debian.org/debian stretch main" > /etc/apt/sources.list || true
79
RUN apt-get update
8-
RUN apt-get install -y zip unzip libzip-dev git
9-
RUN docker-php-ext-install zip
10-
RUN docker-php-ext-install pcntl
11-
RUN pecl install xdebug || pecl install xdebug-2.7.2 || pecl install -f xdebug-2.5.5 && docker-php-ext-enable xdebug
12-
RUN curl -sS https://getcomposer.org/installer | php
13-
RUN mv composer.phar /usr/local/bin/composer
10+
RUN apt-get install --reinstall -y --force-yes ca-certificates
11+
RUN apt-get install -y --force-yes zip unzip libzip-dev git
12+
RUN docker-php-ext-install zip pcntl
13+
RUN pecl install xdebug || pecl install xdebug-3.1.6 || pecl install xdebug-2.7.2 && docker-php-ext-enable xdebug || true
14+
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
1415
RUN composer install

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Minify
22

3-
[![Build status](https://img.shields.io/github/workflow/status/matthiasmullie/minify/test-suite?style=flat-square)](https://github.com/matthiasmullie/minify/actions/workflows/test.yml)
4-
[![Code coverage](http://img.shields.io/codecov/c/github/matthiasmullie/minify?style=flat-square)](https://codecov.io/github/matthiasmullie/minify)
5-
[![Code quality](http://img.shields.io/scrutinizer/g/matthiasmullie/minify?style=flat-square)](https://scrutinizer-ci.com/g/matthiasmullie/minify)
3+
[![Build status](https://img.shields.io/github/actions/workflow/status/matthiasmullie/minify/test.yml?branch=master&style=flat-square)](https://github.com/matthiasmullie/minify/actions/workflows/test.yml)
4+
[![Code coverage](http://img.shields.io/codecov/c/gh/matthiasmullie/minify?style=flat-square)](https://codecov.io/gh/matthiasmullie/minify)
65
[![Latest version](http://img.shields.io/packagist/v/matthiasmullie/minify?style=flat-square)](https://packagist.org/packages/matthiasmullie/minify)
76
[![Downloads total](http://img.shields.io/packagist/dt/matthiasmullie/minify?style=flat-square)](https://packagist.org/packages/matthiasmullie/minify)
87
[![License](http://img.shields.io/packagist/l/matthiasmullie/minify?style=flat-square)](https://github.com/matthiasmullie/minify/blob/master/LICENSE)
@@ -133,7 +132,7 @@ $minifier->setImportExtensions($extensions);
133132

134133
## Installation
135134

136-
Simply add a dependency on matthiasmullie/minify to your composer.json file if you use [Composer](https://getcomposer.org/) to manage the dependencies of your project:
135+
Simply add a dependency on `matthiasmullie/minify` to your composer.json file if you use [Composer](https://getcomposer.org/) to manage the dependencies of your project:
137136

138137
```sh
139138
composer require matthiasmullie/minify

0 commit comments

Comments
 (0)