Skip to content

Catch up with upstream changes #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 66 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
c19b008
Bump actions/checkout from 3 to 4
dependabot[bot] Sep 5, 2023
cbe5f33
Merge pull request #416 from sabberworm/dependabot/github_actions/act…
sabberworm Sep 8, 2023
724b654
Bump actions/cache from 3 to 4
dependabot[bot] Jan 18, 2024
7ae6c01
Merge pull request #418 from sabberworm/dependabot/github_actions/act…
oliverklee Jan 18, 2024
759fdfa
[TASK] Prepare the 8.5.0 release
oliverklee Jan 19, 2024
6d4c502
Bump to 8.5.0 and add more changes mentioned in review
oliverklee Jan 27, 2024
4e9a54c
Merge pull request #419 from sabberworm/task/release
JakeQZ Feb 1, 2024
9648ced
[TASK] Drop support for PHP < 7.2 (#420)
oliverklee Feb 1, 2024
a89395c
[TASK] Sync the PHPUnit configuration file version with the package (…
oliverklee Feb 2, 2024
4bd764e
[TASK] Add return types to `setUp()` in tests (#425)
oliverklee Feb 2, 2024
73b0344
[TASK] Update phpunit/phpunit requirement from ^5.7.27 to ^8.5.36 (#424)
dependabot[bot] Feb 2, 2024
af5a176
[TASK] Update the development tools (#421)
oliverklee Feb 3, 2024
d518539
[TASK] Also PHP-lint the code with PHP 8.3 (#426)
oliverklee Feb 3, 2024
9d6c1d8
[TASK] Add the new maintainers to the `composer.json` (#428)
oliverklee Feb 3, 2024
e78a796
[BUGFIX] Git-ignore the PHPUnit result cache (#429)
oliverklee Feb 4, 2024
a2282d6
[TASK] Make the testcases final (#435)
oliverklee Feb 4, 2024
084e376
[TASK] Configure PHPUnit some more (#436)
oliverklee Feb 4, 2024
2299296
[TASK] Move PHPStan from PHIVE to Composer (#438)
oliverklee Feb 4, 2024
e9eb937
[TASK] Simplify the configuration for the static analysis CI job (#439)
oliverklee Feb 4, 2024
b0c1403
[CLEANUP] Autoformat the code (#440)
oliverklee Feb 4, 2024
3d7924f
[TASK] Add some Composer settings (#441)
oliverklee Feb 4, 2024
273490c
[BUGFIX] Avoid double CI runs for pull requests (#437)
oliverklee Feb 5, 2024
49df8dd
[TASK] Make the data providers static (#443)
oliverklee Feb 5, 2024
83ccf6e
[TASK] Move the coverage generation to a separate CI workflow (#427)
oliverklee Feb 5, 2024
daf4cdd
[FEATURE] Add a PHPUnit-specific extension to PHPStan (#444)
oliverklee Feb 5, 2024
a068287
[BUGFIX] Use the Composer-installed PHPStan for creating the baseline…
oliverklee Feb 5, 2024
f9cae12
[TASK] Switch the static analysis CI jobs to PHP 8.3 (#446)
oliverklee Feb 5, 2024
be53799
[TASK] Run the unit tests up to PHP 8.3 (#447)
oliverklee Feb 5, 2024
79f7865
[CLEANUP] Make variable acces in `DeclarationBlock` more obvious (#448)
oliverklee Feb 6, 2024
2cbe028
[FEATURE] Add unit tests for the existing `Settings` methods (#449)
oliverklee Feb 6, 2024
52ff901
[TASK] Finish the repository move and switch from master to main (#451)
oliverklee Feb 7, 2024
8bb6080
[TASK] Drop PHP_CodeSniffer (#468)
oliverklee Feb 13, 2024
c00e588
[TASK] Add visibility to all class/interface constants (#470)
oliverklee Feb 13, 2024
bcaa672
[TASK] Switch to the PER2 coding standard (#467)
oliverklee Feb 13, 2024
7238d87
Update phpstan/phpstan requirement from ^1.10.57 to ^1.10.58 (#473)
dependabot[bot] Feb 13, 2024
3dd89b5
[BUGFIX] Allow at-rules to be parsed in strict mode (#456)
JakeQZ Feb 13, 2024
870c453
[TASK] Mark the public class constants as `@internal` (#472)
oliverklee Feb 15, 2024
dd81ad8
[FEATURE] Add --diff to PHP-CS-Fixer CI dry-run command (#480)
JakeQZ Feb 17, 2024
cb78396
[FEATURE] Add support for the `dvh`, `lvh` and `svh` length units (#415)
KaiOnGitHub Feb 17, 2024
a8d85df
[DOC] Fix typo in PHPStan script description (#483)
JakeQZ Feb 17, 2024
848685a
[BUGFIX] Invoke PHIVE-installed tools via shell (#484)
JakeQZ Feb 17, 2024
6a5d91d
[BUGFIX] Handle incorrect RGB colors better (#485)
ali-khalili Feb 20, 2024
97cee41
Update phpstan/phpstan requirement from ^1.10.58 to ^1.10.59 (#487)
dependabot[bot] Feb 21, 2024
822bb72
[FEATURE] Add Composer scripts to run unit tests (#488)
JakeQZ Feb 22, 2024
3fa1326
[DOCS] Fix typo in the changelog (#491)
oliverklee Feb 22, 2024
5474968
Update phpstan/phpstan-phpunit requirement from ^1.3.15 to ^1.3.16 (#…
dependabot[bot] Feb 23, 2024
9ea4650
[TASK] Update PHP-CS-Fixer (#493)
oliverklee Feb 24, 2024
8f94950
[DOCS] Add a class diagram (#482)
oliverklee Feb 26, 2024
b2ba983
[TASK] Avoid poor scaling of `array_search()` with very long arrays (…
bartbutler Feb 26, 2024
3a461e0
[FEATURE] Add Composer scripts to run unit tests (#503)
JakeQZ Feb 27, 2024
f9f3e40
[TASK] Reorder things in the class diagram source code (#505)
oliverklee Feb 27, 2024
4108ca8
[TASK] Add more tests for parsing of invalid colors
mathroc Feb 28, 2024
0d69060
[DOCS] Correct typo in class diagram ("abstruct" -> "abstract") (#509)
JakeQZ Feb 29, 2024
498d504
[DOCS] Remove trailing whitespace in README.md (#508)
JakeQZ Feb 29, 2024
086fa00
[CLEANUP] Use common ancestor `Value` in type specifications (#507)
JakeQZ Mar 1, 2024
2330f6d
[CLEANUP] Move some things in the class diagram code around (#513)
oliverklee Mar 3, 2024
c4dbc10
[TASK] Use a generated class/diagram list in the class diagram (#515)
oliverklee Mar 3, 2024
4b15eed
[TASK] Fix typo "abstruct" in the class diagram (again) (#517)
oliverklee Mar 5, 2024
e63e5a8
Update phpunit/phpunit requirement from ^8.5.36 to ^8.5.37 (#519)
dependabot[bot] Mar 6, 2024
ac8b039
[TASK] Use auto-generated inheritance/implementation in the class dia…
oliverklee Mar 7, 2024
451f83f
Update phpstan/phpstan requirement from ^1.10.59 to ^1.10.60 (#523)
dependabot[bot] Mar 8, 2024
6d6d8b9
Update phpstan/phpstan requirement from ^1.10.60 to ^1.10.61 (#525)
dependabot[bot] Mar 13, 2024
06c4aef
Update phpstan/phpstan requirement from ^1.10.61 to ^1.10.62 (#526)
dependabot[bot] Mar 14, 2024
f116090
Update phpstan/phpstan requirement from ^1.10.62 to ^1.10.63 (#527)
dependabot[bot] Mar 19, 2024
8b96b31
Update phpstan/phpstan requirement from ^1.10.63 to ^1.10.64 (#529)
dependabot[bot] Mar 21, 2024
eda7c24
Update phpstan/phpstan requirement from ^1.10.64 to ^1.10.65 (#530)
dependabot[bot] Mar 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 18 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

on:
pull_request:
push:
branches:
- main
pull_request:
schedule:
- cron: '3 3 * * 1'

Expand All @@ -14,11 +16,11 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
php-version: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ]
php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
Expand All @@ -39,29 +41,25 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: [ '5.6', '7.0', '7.1', '7.2', '7.3' ]
coverage: [ 'none' ]
include:
- php-version: '7.4'
coverage: xdebug
php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
ini-values: error_reporting=E_ALL
tools: composer:v2
coverage: "${{ matrix.coverage }}"
coverage: none

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

- name: Cache dependencies installed with composer
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/composer
key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
Expand All @@ -74,14 +72,7 @@ jobs:
composer show;

- name: Run Tests
run: ./vendor/bin/phpunit --coverage-clover build/coverage/xml

- name: Upload coverage results to Codacy
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
if: "${{ matrix.coverage != 'none' && env.CODACY_PROJECT_TOKEN != '' }}"
run: |
./vendor/bin/codacycoverage clover build/coverage/xml
run: ./vendor/bin/phpunit

static-analysis:
name: Static Analysis
Expand All @@ -93,17 +84,15 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- command: sniffer
php-version: '7.4'
- command: fixer
php-version: '7.4'
- command: stan
php-version: '7.4'
command:
- fixer
- stan
php-version:
- '8.3'

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
Expand All @@ -116,7 +105,7 @@ jobs:
run: composer config --global --list

- name: Cache dependencies installed with composer
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/composer
key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
Expand All @@ -130,7 +119,7 @@ jobs:

- name: Install development tools
run: |
phive --no-progress install --trust-gpg-keys BBAB5DF0A0D6672989CF1869E82B2FB314E9906E,A972B9ABB95D0B760B51442231C7E470E2138192,D32680D5957DC7116BE29C14CF1A108D0E7AE720
phive --no-progress install --trust-gpg-keys BBAB5DF0A0D6672989CF1869E82B2FB314E9906E

- name: Run Command
run: composer ci:php:${{ matrix.command }}
57 changes: 57 additions & 0 deletions .github/workflows/codecoverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

on:
push:
branches:
- main
pull_request:

name: Code coverage

jobs:
code-coverage:
name: Code coverage

runs-on: ubuntu-22.04

strategy:
matrix:
php-version: [ '7.4' ]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
ini-values: error_reporting=E_ALL
tools: composer:v2
coverage: xdebug

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

- name: Cache dependencies installed with composer
uses: actions/cache@v4
with:
path: ~/.cache/composer
key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
php${{ matrix.php-version }}-composer-

- name: Install Composer dependencies
run: |
composer update --with-dependencies --no-progress;
composer show;

- name: Run Tests
run: ./vendor/bin/phpunit --coverage-clover build/coverage/xml

- name: Upload coverage results to Codacy
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
if: "${{ env.CODACY_PROJECT_TOKEN != '' }}"
run: |
./vendor/bin/codacycoverage clover build/coverage/xml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/.phive/*
/.php-cs-fixer.cache
/.php_cs.cache
/.phpunit.result.cache
/composer.lock
/phpstan.neon
/vendor/
Expand Down
5 changes: 1 addition & 4 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="php-cs-fixer" version="^3.13.2" installed="3.13.2" location="./.phive/php-cs-fixer.phar" copy="false"/>
<phar name="phpcbf" version="^3.7.1" installed="3.7.1" location="./.phive/phpcbf.phar" copy="false"/>
<phar name="phpcs" version="^3.7.1" installed="3.7.1" location="./.phive/phpcs.phar" copy="false"/>
<phar name="phpstan" version="^1.9.14" installed="1.9.14" location="./.phive/phpstan.phar" copy="false"/>
<phar name="php-cs-fixer" version="^3.50.0" installed="3.50.0" location="./.phive/php-cs-fixer" copy="false"/>
</phive>
45 changes: 44 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,47 @@
# Revision History
# Changelog

All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/).

## x.y.z

### Added

- Add a class diagram to the README (#482)
- Add support for the `dvh`, `lvh` and `svh` length units (#415)
- Add more tests (#449)

### Changed

- Improve performance of Value::parseValue with many delimiters by refactoring to remove array_search()
- Add visibility to all class/interface constants (#469)

### Deprecated

### Removed

- Drop support for PHP < 7.2 (#420)

### Fixed

- Fix PHP notice caused by parsing invalid color values having less than 6 characters (#485)
- Fix (regression) failure to parse at-rules with strict parsing (#456)

## 8.5.0

### Added

- Add a method to get an import's media queries (#384)
- Add more unit tests (#381, #382)

### Fixed

- Retain CSSList and Rule comments when rendering CSS (#351)
- Replace invalid `turns` unit with `turn` (#350)
- Also allow string values for rules (#348)
- Fix invalid calc parsing (#169)
- Handle scientific notation when parsing sizes (#179)
- Fix PHP 8.1 compatibility in `ParserState::strsplit()` (#344)

## 8.4.0

Expand Down
Loading