Skip to content

Commit 1121fdc

Browse files
authored
Merge pull request #5 from npghub/master
Catch up with upstream changes
2 parents cc791ad + eda7c24 commit 1121fdc

Some content is hidden

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

41 files changed

+779
-197
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
22

33
on:
4-
pull_request:
54
push:
5+
branches:
6+
- main
7+
pull_request:
68
schedule:
79
- cron: '3 3 * * 1'
810

@@ -14,11 +16,11 @@ jobs:
1416
runs-on: ubuntu-22.04
1517
strategy:
1618
matrix:
17-
php-version: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ]
19+
php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
1820

1921
steps:
2022
- name: Checkout
21-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2224

2325
- name: Install PHP
2426
uses: shivammathur/setup-php@v2
@@ -39,29 +41,25 @@ jobs:
3941
strategy:
4042
fail-fast: false
4143
matrix:
42-
php-version: [ '5.6', '7.0', '7.1', '7.2', '7.3' ]
43-
coverage: [ 'none' ]
44-
include:
45-
- php-version: '7.4'
46-
coverage: xdebug
44+
php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
4745

4846
steps:
4947
- name: Checkout
50-
uses: actions/checkout@v3
48+
uses: actions/checkout@v4
5149

5250
- name: Install PHP
5351
uses: shivammathur/setup-php@v2
5452
with:
5553
php-version: ${{ matrix.php-version }}
5654
ini-values: error_reporting=E_ALL
5755
tools: composer:v2
58-
coverage: "${{ matrix.coverage }}"
56+
coverage: none
5957

6058
- name: Show the Composer configuration
6159
run: composer config --global --list
6260

6361
- name: Cache dependencies installed with composer
64-
uses: actions/cache@v3
62+
uses: actions/cache@v4
6563
with:
6664
path: ~/.cache/composer
6765
key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
@@ -74,14 +72,7 @@ jobs:
7472
composer show;
7573
7674
- name: Run Tests
77-
run: ./vendor/bin/phpunit --coverage-clover build/coverage/xml
78-
79-
- name: Upload coverage results to Codacy
80-
env:
81-
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
82-
if: "${{ matrix.coverage != 'none' && env.CODACY_PROJECT_TOKEN != '' }}"
83-
run: |
84-
./vendor/bin/codacycoverage clover build/coverage/xml
75+
run: ./vendor/bin/phpunit
8576

8677
static-analysis:
8778
name: Static Analysis
@@ -93,17 +84,15 @@ jobs:
9384
strategy:
9485
fail-fast: false
9586
matrix:
96-
include:
97-
- command: sniffer
98-
php-version: '7.4'
99-
- command: fixer
100-
php-version: '7.4'
101-
- command: stan
102-
php-version: '7.4'
87+
command:
88+
- fixer
89+
- stan
90+
php-version:
91+
- '8.3'
10392

10493
steps:
10594
- name: Checkout
106-
uses: actions/checkout@v3
95+
uses: actions/checkout@v4
10796

10897
- name: Install PHP
10998
uses: shivammathur/setup-php@v2
@@ -116,7 +105,7 @@ jobs:
116105
run: composer config --global --list
117106

118107
- name: Cache dependencies installed with composer
119-
uses: actions/cache@v3
108+
uses: actions/cache@v4
120109
with:
121110
path: ~/.cache/composer
122111
key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
@@ -130,7 +119,7 @@ jobs:
130119
131120
- name: Install development tools
132121
run: |
133-
phive --no-progress install --trust-gpg-keys BBAB5DF0A0D6672989CF1869E82B2FB314E9906E,A972B9ABB95D0B760B51442231C7E470E2138192,D32680D5957DC7116BE29C14CF1A108D0E7AE720
122+
phive --no-progress install --trust-gpg-keys BBAB5DF0A0D6672989CF1869E82B2FB314E9906E
134123
135124
- name: Run Command
136125
run: composer ci:php:${{ matrix.command }}

.github/workflows/codecoverage.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
name: Code coverage
10+
11+
jobs:
12+
code-coverage:
13+
name: Code coverage
14+
15+
runs-on: ubuntu-22.04
16+
17+
strategy:
18+
matrix:
19+
php-version: [ '7.4' ]
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Install PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php-version }}
29+
ini-values: error_reporting=E_ALL
30+
tools: composer:v2
31+
coverage: xdebug
32+
33+
- name: Show the Composer configuration
34+
run: composer config --global --list
35+
36+
- name: Cache dependencies installed with composer
37+
uses: actions/cache@v4
38+
with:
39+
path: ~/.cache/composer
40+
key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
41+
restore-keys: |
42+
php${{ matrix.php-version }}-composer-
43+
44+
- name: Install Composer dependencies
45+
run: |
46+
composer update --with-dependencies --no-progress;
47+
composer show;
48+
49+
- name: Run Tests
50+
run: ./vendor/bin/phpunit --coverage-clover build/coverage/xml
51+
52+
- name: Upload coverage results to Codacy
53+
env:
54+
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
55+
if: "${{ env.CODACY_PROJECT_TOKEN != '' }}"
56+
run: |
57+
./vendor/bin/codacycoverage clover build/coverage/xml

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/.phive/*
22
/.php-cs-fixer.cache
33
/.php_cs.cache
4+
/.phpunit.result.cache
45
/composer.lock
56
/phpstan.neon
67
/vendor/

.phive/phars.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
3-
<phar name="php-cs-fixer" version="^3.13.2" installed="3.13.2" location="./.phive/php-cs-fixer.phar" copy="false"/>
4-
<phar name="phpcbf" version="^3.7.1" installed="3.7.1" location="./.phive/phpcbf.phar" copy="false"/>
5-
<phar name="phpcs" version="^3.7.1" installed="3.7.1" location="./.phive/phpcs.phar" copy="false"/>
6-
<phar name="phpstan" version="^1.9.14" installed="1.9.14" location="./.phive/phpstan.phar" copy="false"/>
3+
<phar name="php-cs-fixer" version="^3.50.0" installed="3.50.0" location="./.phive/php-cs-fixer" copy="false"/>
74
</phive>

CHANGELOG.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,47 @@
1-
# Revision History
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
This project adheres to [Semantic Versioning](https://semver.org/).
5+
6+
## x.y.z
7+
8+
### Added
9+
10+
- Add a class diagram to the README (#482)
11+
- Add support for the `dvh`, `lvh` and `svh` length units (#415)
12+
- Add more tests (#449)
13+
14+
### Changed
15+
16+
- Improve performance of Value::parseValue with many delimiters by refactoring to remove array_search()
17+
- Add visibility to all class/interface constants (#469)
18+
19+
### Deprecated
20+
21+
### Removed
22+
23+
- Drop support for PHP < 7.2 (#420)
24+
25+
### Fixed
26+
27+
- Fix PHP notice caused by parsing invalid color values having less than 6 characters (#485)
28+
- Fix (regression) failure to parse at-rules with strict parsing (#456)
29+
30+
## 8.5.0
31+
32+
### Added
33+
34+
- Add a method to get an import's media queries (#384)
35+
- Add more unit tests (#381, #382)
36+
37+
### Fixed
38+
39+
- Retain CSSList and Rule comments when rendering CSS (#351)
40+
- Replace invalid `turns` unit with `turn` (#350)
41+
- Also allow string values for rules (#348)
42+
- Fix invalid calc parsing (#169)
43+
- Handle scientific notation when parsing sizes (#179)
44+
- Fix PHP 8.1 compatibility in `ParserState::strsplit()` (#344)
245

346
## 8.4.0
447

0 commit comments

Comments
 (0)