Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
361 commits
Select commit Hold shift + click to select a range
966592c
VirtualFileSystemTest: typo
sanmai Sep 25, 2017
67acc44
Merge pull request #58 from sanmai/vfs-with-closures
sanmai Sep 25, 2017
043cbf8
AbstractTag should have abstract content: children must implement it
sanmai Sep 25, 2017
8bd037c
TagCaseTest: check with toLiquid
sanmai Sep 25, 2017
29753b3
TestFileSystem: simplified test wrapper for 'Virtual' file system
sanmai Sep 25, 2017
6ae0aec
TagIncludeTest: use TestFileSystem
sanmai Sep 25, 2017
29cf039
Context: defer object-to-string conversion, delegate it to Decision::…
sanmai Sep 25, 2017
37ff105
AbstractBlock: refuse to render arrays (before they were silently cas…
sanmai Sep 25, 2017
3d96a0f
CHANGELOG for the next version
sanmai Sep 25, 2017
06dbdd6
Merge pull request #59 from sanmai/fix-include-obj-rebase
sanmai Sep 25, 2017
082479c
Test an invalid variable with a new line inside
sanmai Sep 25, 2017
b45fb69
AbstractBlock: removed redundant array check
sanmai Sep 25, 2017
f769426
ContextTest: additional cases for `null` returned from toLiquid
sanmai Sep 25, 2017
1921720
DropTest: make sure hasKey gets called
sanmai Sep 25, 2017
04b0a41
Test for Context::hasKey
sanmai Sep 25, 2017
37a356a
Test for Drop::__toString
sanmai Sep 25, 2017
8e0b7d5
Merge pull request #60 from sanmai/more-tests-2
sanmai Sep 25, 2017
397c52b
Adopt PHP-CS-Fixer with closest possible config to the currently used…
sanmai Sep 25, 2017
cea52b1
src/ fixed with PHP-CS-Fixer
sanmai Sep 25, 2017
224060e
tests/ fixed with PHP-CS-Fixer
sanmai Sep 25, 2017
66d83dc
examples/ fixed with PHP-CS-Fixer
sanmai Sep 25, 2017
2688d64
TagPaginateTest: missing tests for https
sanmai Sep 25, 2017
4b1d000
Merge pull request #61 from sanmai/php-cs-fixer
sanmai Sep 25, 2017
80dd907
Full-on PSR-2 for all code
sanmai Sep 25, 2017
164f424
.php_cs.dist - removed braces exception; we should now follow PSR-2 i…
sanmai Sep 25, 2017
935b586
Context: missing phpdoc
sanmai Sep 25, 2017
1ed2479
Decision: arguments with default values before non-default ones
sanmai Sep 25, 2017
f128bf8
Removed useless else
sanmai Sep 25, 2017
f3767ea
.php_cs.dist - checks for dead code
sanmai Sep 25, 2017
38b1843
Standard comment in all files
sanmai Sep 25, 2017
469e8cd
.php_cs.dist - enforce standard comment
sanmai Sep 25, 2017
622eca8
.php_cs.dist - enforce PHPDoc argument order
sanmai Sep 25, 2017
c8762ff
.php_cs.dist - adjust to the same standard
sanmai Sep 25, 2017
9624451
.php_cs.dist - enforce PSR-4 (we're following it anyway)
sanmai Sep 25, 2017
d976e0d
Space after comma in arrays
sanmai Sep 25, 2017
81421e0
Merge pull request #62 from sanmai/coding-standards
sanmai Sep 25, 2017
cfc2484
Template::parseFile - Parses the given template file
sanmai Sep 25, 2017
7f0db74
Test FileSystem\Local instead of LocalFileSystem, check that the latt…
sanmai Sep 25, 2017
f8bef32
Merge pull request #63 from sanmai/parseFile
sanmai Sep 25, 2017
fd8fe3f
Update README.md
sanmai Sep 25, 2017
a907e9a
Update README.md
sanmai Sep 25, 2017
f779df5
Can use unquoted template name in include tag.
jfoucher Sep 26, 2017
4e73927
Merge pull request #66 from jfoucher/master
sanmai Sep 28, 2017
2ada3be
TagIncludeTest: deep includes
sanmai Sep 26, 2017
fd00dcb
Refactored checkIncludes() and related functions
sanmai Sep 26, 2017
a53e116
TagExtendsTest: use TestFileSystem
sanmai Sep 26, 2017
42ffc13
Renamed checkIncludes() to hasIncludes(), added comment about use
sanmai Sep 28, 2017
26889dd
Document::hasIncludes() - this may be suboptimal, but if we re-render…
sanmai Sep 28, 2017
bb86dee
TagExtendsTest: test for issue #65
sanmai Sep 26, 2017
2cdfcbe
TagIncludeTest: a test that fails with cache enabled, as in issue #65
sanmai Sep 26, 2017
65e8441
TagIncludeTest for simple include without quotes
sanmai Sep 28, 2017
56f816f
Merge pull request #64 from sanmai/include-caching-bug
sanmai Sep 28, 2017
12f20fb
Changelog for 1.4.1
sanmai Sep 28, 2017
605bb58
Merge pull request #67 from sanmai/release-1-4-1
sanmai Sep 28, 2017
6a4adca
Test for extends and include tags where a file changes from under the…
sanmai Sep 28, 2017
391e152
TagExtends: try to keep the base templates in cache (that not extend …
sanmai Sep 28, 2017
5b18aec
Test that raw tag ignores other tags
sanmai Sep 28, 2017
1f7b888
Merge pull request #68 from sanmai/include-tests
sanmai Sep 28, 2017
c1dfbd5
CustomTagTest - for Template::registerTag
sanmai Sep 28, 2017
374d935
Merge pull request #69 from sanmai/custom-tag-test
sanmai Sep 28, 2017
00af598
Test case with fixtures
sanmai Sep 28, 2017
4bc643c
Fixtures for 'case' and 'for' tags
sanmai Sep 29, 2017
8f3e4ab
Fixture for cycle tag
sanmai Sep 29, 2017
e2493fb
Fixture for the bulk of filters
sanmai Sep 29, 2017
c61a969
Test for extends without default block contents
sanmai Sep 29, 2017
b41a428
Merge pull request #70 from sanmai/fixtures
sanmai Sep 29, 2017
02fedf7
Test for filters in assign
sanmai Oct 2, 2017
402e4e6
Merge pull request #72 from sanmai/assign-tests
sanmai Oct 2, 2017
3def71e
Allow using `FILTER_SEPARATOR` as a split filter parameter in filters…
jfoucher Oct 2, 2017
1efa84d
Merge pull request #71 from jfoucher/master
sanmai Oct 4, 2017
2448132
PHPUnit: create html report by default - helps quickly discover uncov…
sanmai Oct 4, 2017
35b13c0
Keep PHP CS Fixer cache between builds (about 20 seconds speed-up)
sanmai Oct 4, 2017
51eb6bd
Test on PHP 7.2
sanmai Oct 4, 2017
b73d29c
Pull request template
sanmai Oct 4, 2017
9714dc4
Merge pull request #73 from sanmai/php-cs-fixer-2
sanmai Oct 4, 2017
af3b131
Throw different types of exception depending on the case instead of a…
jfoucher Oct 5, 2017
3ea8667
- Change exception thrown in case of a missing filesystem
jfoucher Oct 8, 2017
699c084
Merge pull request #75 from jfoucher/master
sanmai Oct 9, 2017
31adc04
Use ::class instead of literal class names where possible
sanmai Oct 7, 2017
40e133b
Removed unused imports
sanmai Oct 7, 2017
f88cc44
Filterbank: do not try calling instance methods statically
sanmai Oct 7, 2017
0ca5bb5
Mark bogus tests as incomplete: is this an expected behavior?
sanmai Oct 9, 2017
1419dca
Tests for unconfigured filesystem
sanmai Oct 9, 2017
422ae67
FilterbankTest: filters should work with non-global classes
sanmai Oct 9, 2017
54f9c17
TagIncludeTest: expect specific error message on syntax error
sanmai Oct 9, 2017
a6c98e5
StandardFiltersTest: addFilters takes just one argument
sanmai Oct 9, 2017
9f647eb
Template::setCache isn't using $this, should be allowed being called …
sanmai Oct 9, 2017
9aec4d5
TestCase: drop cache on every run
sanmai Oct 9, 2017
7b5d951
Callback-type filters. Adding filters has never been easier.
sanmai Oct 9, 2017
3901584
Merge pull request #76 from sanmai/easy-filters
sanmai Oct 9, 2017
3847af0
Changelog for 1.4.2
sanmai Oct 9, 2017
bee3002
Merge pull request #77 from sanmai/release-1-4-2
sanmai Oct 9, 2017
908c009
Context: typo
sanmai Oct 10, 2017
07a062e
string: new standard filter for explicit string conversion
sanmai Oct 10, 2017
ccdba75
`escape` and `escape_once` should do their job at all costs by castin…
sanmai Oct 10, 2017
b2d1d84
EscapeByDefaultTest: verify that object-to-string conversion does not…
sanmai Oct 10, 2017
1bff334
Changelog for 1.4.3
sanmai Oct 10, 2017
e69e594
Merge pull request #78 from sanmai/filters-tostring
sanmai Oct 10, 2017
0608428
Merge pull request #79 from sanmai/release-1-4-3
sanmai Oct 10, 2017
c47e7a0
TagUnless is an inverted TagIf: simplify implementation to reflect that
sanmai Oct 16, 2017
fec5ba8
Merge pull request #81 from sanmai/unless-forloop
sanmai Oct 16, 2017
0f5ff83
Allow dashes in filenames (LocalFileSystem)
Oct 17, 2017
426e24d
Merge pull request #82 from j-angnoe/allow-dashes-localfilesystem
sanmai Oct 17, 2017
e216710
Changelog for 1.4.4
sanmai Nov 3, 2017
357cede
Merge pull request #88 from sanmai/release-1-4-4
sanmai Nov 3, 2017
7f49138
Test case for issue #90
sanmai Dec 12, 2017
fd80cd5
assign-capture.liquid - clarified cases
sanmai Dec 12, 2017
5cd4b76
TagCapture: assign variables in the global context; Liquid from Jekyl…
sanmai Dec 12, 2017
0d97b49
Merge pull request #91 from sanmai/assign-capture-90
sanmai Dec 12, 2017
8b08a46
Update CHANGELOG
sanmai Dec 12, 2017
2a0fa60
TagPaginate must work in own scope
sanmai Feb 7, 2018
33cc34d
TagFor: refactored different types of cycles in separate functions
sanmai Feb 7, 2018
99823c5
TagPaginate: throw up if no collection present instead of vague "arra…
sanmai Feb 7, 2018
9c99b0e
Fixtures for #93
sanmai Feb 7, 2018
9467bb5
TagFor: by default render a collection, which is the default anyways
sanmai Feb 7, 2018
7719f19
TagPaginate: count() won't work with non-array in PHP 7.2
sanmai Feb 7, 2018
34a240e
Changelog for 1.4.6
sanmai Feb 7, 2018
d3d8d54
Merge pull request #95 from sanmai/fix-93
sanmai Feb 7, 2018
f692ed3
TagPaginate: Replace hardcoded references to 'page' with lookups agai…
edwardoka Feb 8, 2018
6e7691d
TagPaginate: Partial changes requested in PR #96
edwardoka Feb 8, 2018
8b53be3
Merge pull request #96 from edwardoka/fix-94
sanmai Feb 9, 2018
d645b7b
TagPaginateTest: a constant with default assigns for most tests
sanmai Feb 9, 2018
32edab8
TagPaginateTest: URL generation must preserve params
edwardoka Feb 9, 2018
d58e2ce
TagPaginateTest: a case without https
sanmai Feb 9, 2018
7f1caa0
TagPaginate: keep request parameters
sanmai Feb 9, 2018
09a3582
TagPaginate: page number can only be between 1 and a number of pages
sanmai Feb 9, 2018
2de6125
Changelog for 1.4.7
sanmai Feb 9, 2018
3827557
Merge pull request #98 from sanmai/custom-url-fix-97
sanmai Feb 9, 2018
162a8a9
CI with Infection PHP
sanmai Mar 15, 2018
5fcd1e3
Context: return null for missing properties, like we do for arrays.
sanmai Mar 22, 2018
df82356
Merge pull request #103 from sanmai/fix-101
sanmai Mar 22, 2018
cc14ece
Update CHANGELOG
sanmai Mar 23, 2018
49de940
Update and rename CHANGELOG to CHANGELOG.md
sanmai Mar 23, 2018
e76a88b
Update CHANGELOG.md
sanmai Mar 23, 2018
82107d1
Merge pull request #99 from sanmai/ci-infection
sanmai Jul 24, 2018
9541f09
FixturesTest: use human-readable dataset names
sanmai Dec 29, 2018
db88860
Strings now have a 'size' property, as in the upstream
sanmai Dec 29, 2018
6177604
Fixture with an example with no whitespace control
sanmai Dec 29, 2018
bc973e7
TestCase shall use stock TAG_START/_END
sanmai Dec 29, 2018
722478f
Implement tags with whitespace control (swallowing all whitespace aro…
sanmai Dec 29, 2018
9c6b5af
Add basic Regexp debugging to AbstractBlock
sanmai Dec 29, 2018
d4f0f16
Add branch-alias to composer.json to simplify installation of a dev v…
sanmai Dec 29, 2018
06264e7
Merge pull request #110 from sanmai/pr/whitespace-control
sanmai Dec 29, 2018
96e2567
Also test on PHP 7.3 on Travis CI
sanmai Dec 29, 2018
9896c0c
Fix "Element 'testsuite': The attribute 'name' is required but missing."
sanmai Dec 29, 2018
56f47fb
Use a more recent version of PHPUnit, related fixes
sanmai Dec 29, 2018
7196861
Update PULL_REQUEST_TEMPLATE.md
sanmai Dec 29, 2018
2516e13
A workaround for php-cs-fixer on PHP 7.3
sanmai Jan 1, 2019
8f692d6
Don't add '__construct' as filter! (#112)
PATROMO Jan 28, 2019
107d483
add support for content ticks (#113)
timglabisch Jan 29, 2019
ce53ad8
Do not expose $_SERVER in templates by default (#116)
sanmai Feb 11, 2019
0085fe2
Implement whitespace control for variables
funkjedi Mar 8, 2019
26af642
Remove negative string offset for PHP 7.0 sake
funkjedi Mar 8, 2019
60dbd0c
Added variable whitespace control test
funkjedi Mar 8, 2019
15d3e7e
Use mb_substr inplace of array access
funkjedi Mar 8, 2019
ff15a51
Remove needless mb_strlen calls
funkjedi Mar 8, 2019
cd847b3
Fix greediness of tag and variable contents
funkjedi Mar 8, 2019
36640c8
Adding test for whitespace ctrl/if tag edge case
funkjedi Mar 8, 2019
2c22f62
Fix for whitespace ctrl/if tag edge case
funkjedi Mar 8, 2019
3bf7447
Merge pull request #119 from funkjedi/whitespace-ctrl-if-tag-edgecase
sanmai Mar 9, 2019
96e189d
Merge branch 'master' into feature-whitespace-control
sanmai Mar 9, 2019
f7890df
AbstractBlock: document changes, add an extra test
sanmai Mar 21, 2019
3ae052a
Merge pull request #118 from funkjedi/feature-whitespace-control
sanmai Mar 22, 2019
c08ebdf
Merge pull request #120 from sanmai/pr/document-whitespace-control
sanmai Mar 22, 2019
e8cbf7b
PHPUnit 8 requires more advanced changes
sanmai May 29, 2019
72ca543
Do not generate a coverage report by default to speed up tests
sanmai May 29, 2019
8941835
Merge pull request #111 from sanmai/pr/php73
sanmai May 30, 2019
034d499
Update README.md
sanmai May 31, 2019
aa26c48
Add wrapper for call_user_func_array() with try/catch block.
PATROMO Jun 14, 2019
eed1cea
Add test case to confirm that LiquidException is throw.
PATROMO Jun 17, 2019
a195370
Take care of TypeError from within the Context.
sanmai Jun 16, 2019
cade20c
Merge pull request #128 from sanmai/PATROMO-pr/handle-type-erros-in-f…
sanmai Jun 17, 2019
1d283af
Allow later versions of php-coveralls
sanmai Jul 10, 2019
6630f6b
Normalize composer.json
sanmai Jul 10, 2019
179fd31
Work nicely with virtual properties
sanmai Jul 10, 2019
a9f0d8f
Improve test coverage
sanmai Jul 10, 2019
848e57f
Merge pull request #131 from sanmai/pr/composer-update
sanmai Jul 11, 2019
d46cbf7
Merge pull request #132 from sanmai/pr/virtual_props
sanmai Jul 11, 2019
6c0657a
Add support for Countables
funkjedi Jul 30, 2019
dba1a1f
Merge pull request #134 from funkjedi/support-for-countable
sanmai Jul 31, 2019
87ec868
Add support for array first/last dot notation
funkjedi Sep 13, 2019
c5b7253
Update src/Liquid/Context.php
funkjedi Sep 14, 2019
dea55bc
Update src/Liquid/Liquid.php
funkjedi Sep 14, 2019
c358ce7
Update usage to work for both associative arrays
funkjedi Sep 14, 2019
9534e90
Adding additional tests for overrides
funkjedi Sep 14, 2019
f844cd9
Merge pull request #135 from funkjedi/array-first-last-dot-notation
sanmai Sep 14, 2019
4e939ce
Update .travis.yml
sanmai Jan 30, 2020
9c91499
Update .travis.yml
sanmai Jan 30, 2020
2bf1685
Fix bug preventing keyword args from being used with filters (#137)
funkjedi Mar 18, 2020
6c87f31
Fix issues with Generator types (#139)
sanmai Sep 18, 2020
9d28b52
Add GitHub workflows, update and composer.json to use newer PHPUnit (…
sanmai Sep 21, 2020
fcdae2c
Fix build failures (#141)
sanmai Sep 21, 2020
7f51a8a
Update workflow to test under PHP 8 (#142)
sanmai Jan 1, 2021
b761303
Fix current build failures (#145)
sanmai Jan 1, 2021
9b73a10
If the $object variable is a string php will attempt to load a class …
schmitty42 Jan 7, 2021
d3e9c3d
If the $token variable is a string php will attempt to load a class w…
schmitty42 Jan 22, 2021
4f5ae8d
Add whitelist check and a default whitelist. (#151)
shawngoh87 Jun 25, 2021
b55e868
Fix slice method for UTF8 (#150)
PNixx Sep 17, 2021
763a95a
Allow arrays to be output to template as string, rather than throwing…
Nov 4, 2021
d81a526
Fix truncate, capitalize, upcase, downcase methods for UTF-8 (#158)
PNixx Feb 17, 2022
33f649c
fix parse exception "tag was never closed" with line break (#159)
PNixx Mar 1, 2022
948327d
fix parse exception "Unknown tag endfor" with line break (#161)
PNixx Mar 22, 2022
1dbd10e
fix parse exception "Variable was not properly terminated" with line …
PNixx Mar 22, 2022
4818847
Fix PHP 8.1 error in preg_split by replacing null with default value …
peterjaap Apr 15, 2022
e9e0c16
Start testing on PHP 8.1 (#164)
sanmai Apr 15, 2022
a7a6f24
Fix PHP 8.1 error in preg_split by replacing null with default value …
PNixx May 14, 2022
5dcd84a
Allow plugins to be loaded (#168)
sanmai Aug 7, 2022
2b6a48a
use build statuus badge from github actions (#166)
live627 Aug 7, 2022
f0be8a3
Align split filter behaviour with Ruby liquid (#167)
funkjedi Aug 8, 2022
ff1bb2b
Test on PHP 8.2 (#172)
sanmai Oct 30, 2022
c835629
Replace strftime (#175)
schmoove Jan 4, 2023
0088a17
Ignore non-essential files for the composer package (#181)
live627 Feb 11, 2023
befadb5
Migrate PHPUnit configuration on the fly (#184)
sanmai Feb 12, 2023
d9c1629
Remove superfluous alternation from the QUOTED_FRAGMENT regex (#182)
live627 Feb 12, 2023
345ff54
Improve compatibility for array operands (#190)
live627 Mar 11, 2023
fbfbbcf
Test improvements (#191)
sanmai Mar 11, 2023
4c20f56
these tests should pass on Windows (#192)
live627 Mar 12, 2023
efb285b
Add a test for case tag with compound conditions in when clauses (#196)
sanmai Mar 16, 2023
d8fd54a
Support compound conditions in when clauses (#197)
sanmai Mar 16, 2023
8000aed
add support for filter (#201)
jkrenge May 13, 2023
2c67bbb
Update PHP Coding Standards Fixer
sanmai Aug 7, 2023
e80bc56
Bump PHP version support
sanmai Aug 7, 2023
fcf2e3c
Add another rule
sanmai Aug 7, 2023
72c7e3f
Apply code style changes
sanmai Aug 7, 2023
3211746
Ignore CS changes on git blame
sanmai Aug 7, 2023
d3703d8
Skip test on PHP 8
sanmai Aug 7, 2023
80eda02
Bump Composer version
sanmai Aug 7, 2023
44942ae
Merge pull request #205 from sanmai/pr/php-cs-fixer
sanmai Aug 7, 2023
c76f0b8
Fix sort different array keys (#202)
PNixx Aug 9, 2023
71b1d11
Add where filter for array (#209)
PNixx Dec 27, 2023
36b1289
Test on PHP 8.3 (#210)
sanmai Dec 28, 2023
c503efd
Fix array where method with multiple input types (#211)
PNixx Jan 9, 2024
1f4477c
Improve StandardFiltersTest (#214)
sanmai Mar 19, 2024
de705d5
Fix split filter for php >=8.0 in case of empty separator (#213)
oleksii-pavlikovskii-eleks-com Mar 19, 2024
f6befea
Mutation testing on PHP 8.3 (#219)
sanmai Oct 4, 2024
3a472d5
Fix: htmlentities() shouldn't be called with null (#218)
fedeisas Oct 4, 2024
502820c
AbstractTag: add cached instance of the config, to improve performanc…
sanmai Oct 6, 2024
906686c
Update README.md
sanmai Oct 6, 2024
ac914b7
Create dependabot.yml (#221)
live627 Mar 29, 2025
66e7e29
Fix GH Actions config (#222)
sanmai Mar 29, 2025
a3eb218
Improve PHP-CS-Fixer configuration (#225)
sanmai May 31, 2025
772eb39
Ignore all .dot files (#226)
sanmai May 31, 2025
a07411c
PHP 8.4 compatibility (implicit nullable types) (#228)
sanmai May 31, 2025
2a9d2d7
Bring array syntax up to speed
sanmai May 31, 2025
d837112
Apply the PHP-CS-Fixer ruleset
sanmai May 31, 2025
2d95d64
Blame-ignore the previous commit
sanmai May 31, 2025
024e2eb
Merge pull request #229 from sanmai/fix/array-syntax
sanmai May 31, 2025
1b74ad6
Improve performance (#216)
live627 May 31, 2025
b2ad21c
Ensure all subclasses of AbstractTag always call the constructor (#230)
sanmai May 31, 2025
69dfccb
Let go of PHP versions 7.4, 8.0, and 8.1 (#237)
sanmai Dec 4, 2025
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
5 changes: 5 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view
# https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt

72c7e3f4e34d2ed474b1399f2a7ab427fb6f3b14
d837112369c0193def1c27636da1b9a8df5c98f3
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/.gitattributes export-ignore
/.github export-ignore
/.gitignore export-ignore
/.php_cs.dist export-ignore
/.infection.json.dist export-ignore
/.phpunit.xml.dist export-ignore
/examples export-ignore
/tests export-ignore
5 changes: 5 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- [ ] I've run the tests with `vendor/bin/phpunit`
- [ ] None of the tests were found failing
- [ ] I've seen the coverage report at `build/coverage/index.html`
- [ ] Not a single line left uncovered by tests
- [ ] Any coding standards issues were fixed with `vendor/bin/php-cs-fixer fix`
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"

- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "monthly"
47 changes: 47 additions & 0 deletions .github/workflows/cs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Code Style

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
php-version:
- '8.3'

name: PHP ${{ matrix.php-version }}

steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions:
coverage: pcov
tools: composer:v2

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

- name: Install dependencies
run: |
composer update --prefer-dist --no-interaction --no-progress ${{ matrix.dependencies }}

- name: Check code style
run: |
php vendor/bin/php-cs-fixer --using-cache=no --diff --dry-run --stop-on-violation --verbose fix

50 changes: 50 additions & 0 deletions .github/workflows/mt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Mutation Testing

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]


jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
php-version:
- '8.4'
dependencies: ['']

name: PHP ${{ matrix.php-version }} ${{ matrix.dependencies }}

steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions:
coverage: pcov
tools: composer:v2

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

- name: Install dependencies
run: |
composer update --prefer-dist --no-interaction --no-progress ${{ matrix.dependencies }}
composer dump-autoload --optimize

- name: Run mutation testing
run: |
php vendor/bin/infection --min-msi=80 --min-covered-msi=80 --threads=$(nproc) --no-progress

61 changes: 61 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# yamllint disable rule:line-length
# yamllint disable rule:braces

name: CI

on:
pull_request:
push:
branches:
- master
- main

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
php-version:
- '8.2'
- '8.3'
- '8.4'
include:
- { php-version: '8.2', dependencies: '--prefer-lowest', legend: 'with lowest dependencies' }

name: PHP ${{ matrix.php-version }} ${{ matrix.legend }}

steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
tools: composer:v2

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}-${{ matrix.composer-flags }}
restore-keys: |
composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}-
composer-${{ runner.os }}-${{ matrix.php-version }}-
composer-${{ runner.os }}-
composer-

- name: Install dependencies
run: |
composer update --prefer-dist --no-interaction --no-progress ${{ matrix.dependencies }}
composer dump-autoload --optimize

- name: Run tests
run: |
php vendor/bin/phpunit --migrate-configuration || true
php vendor/bin/phpunit
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.idea/
.?*
vendor/
composer.lock
62 changes: 62 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?php

/*
* This file is part of the Liquid package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @package Liquid
*/

$header = <<<'EOF'
This file is part of the Liquid package.

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.

@package Liquid
EOF;

$config = new PhpCsFixer\Config();
$config
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'psr_autoloading' => true,
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_order' => true,
'semicolon_after_instruction' => true,
'whitespace_after_comma_in_array' => true,
'header_comment' => ['header' => $header],
'php_unit_construct' => true,
'php_unit_dedicate_assert' => true,
'php_unit_dedicate_assert_internal_type' => true,
'php_unit_expectation' => true,
'php_unit_mock_short_will_return' => true,
'php_unit_mock' => true,
'php_unit_namespaced' => true,
'php_unit_no_expectation_annotation' => true,
"phpdoc_order_by_value" => ['annotations' => ['covers']],
'php_unit_set_up_tear_down_visibility' => true,
'php_unit_test_case_static_method_calls' => ['call_type' => 'this'],
'no_whitespace_in_blank_line' => true,
'nullable_type_declaration_for_default_null_value' => true,
'array_syntax' => ['syntax' => 'short'],
'trailing_comma_in_multiline' => ['elements' => ['arrays']],
'binary_operator_spaces' => ['default' => 'at_least_single_space'],
])
->setIndent("\t")
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__)
->append([__FILE__])
)
;


return $config;
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

38 changes: 0 additions & 38 deletions CHANGELOG

This file was deleted.

Loading