Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
b89d552
Fix get attributes from latte 3 MultiplierAddNode
Attanon Nov 14, 2023
387a2cd
addRemoveButton accepts Nette\Utils\Html (#87)
BigOHenry Nov 21, 2023
a2ccdcf
tests: Demonstrate orphan fieldsets (#83)
jtojnar Nov 21, 2023
39725d3
Fixes for nested multipliers (#59)
Kocicak Jan 4, 2024
9b4e600
FIX compile error
MikKuba Feb 10, 2024
bde2503
Fix tests with nette/component-model 3.1.0
jtojnar Feb 17, 2024
1e6e3b2
tests: Improve coverage of nested multiplier
jtojnar Feb 17, 2024
4cf1ae4
Fix coding style issues
jtojnar Feb 18, 2024
42e1ced
Multiplier: Add missing param typehint to getValues
jtojnar Feb 17, 2024
9e18d15
Bump Codeception version
jtojnar Mar 2, 2024
9b51c6e
Bump testing-helpers to fix CI
jtojnar Mar 3, 2024
f7ebe4d
Fix coding style
jtojnar Mar 3, 2024
7445d0d
Fix PHPStan issue with nette/component-model 3.1.0
jtojnar Mar 20, 2024
2afcd08
Fix coding style issue
jtojnar Mar 20, 2024
2016957
tests: Remove Acceptance testing stubs
jtojnar May 7, 2024
fc6296e
makefile: Fix code coverage
jtojnar May 7, 2024
1d9a356
Fix compatibility with nette/forms 3.2.3
jtojnar May 7, 2024
73f42f5
Re-add phpdoc annotation for PHPStan
jtojnar May 8, 2024
45cf2a8
Fix PHPStan issue after nette/forms added more types
jtojnar May 8, 2024
bfe52eb
Fix coding style
jtojnar May 14, 2024
71cc347
Mostly revert "Fixes for nested multipliers (#59)"
jtojnar Feb 25, 2024
47e0d11
Add license
janfejtek Aug 11, 2024
0363eb5
CI: Bump PHP versions
jtojnar Jan 11, 2025
3df02db
Bump minimum PHP version to 8.2
jtojnar Jan 11, 2025
7dc3379
PHPStan: Fix getForm() result type
jtojnar Jan 11, 2025
07a1009
Bump PHPStan to 2.0
jtojnar Jan 11, 2025
9533530
phpstan: Ignore Container::getComponents() returning incorrect type
jtojnar Jan 17, 2025
eb64028
Multiplier::validate(): Filter out non-validatable components
jtojnar Mar 21, 2024
7d72a68
Add regression test for filter
jtojnar Apr 17, 2024
71b44f4
Remove redundant cast
jtojnar May 18, 2024
43fc8a4
tests: mark testNoOrphanFieldsets as incomplete
jtojnar Jun 7, 2025
853e7c8
tests: Mark some nested multiplier tests as incomplete
jtojnar Jun 7, 2025
8fede17
Fix PHPStan complaining about accessing protected `currentGroup` prop…
jtojnar Jun 7, 2025
1fb9339
tests: Add extra tests for #68
jtojnar Jun 7, 2025
34c23ec
Multiplier: Do not allow removing without button
jtojnar Jun 7, 2025
880594d
tests: Check remove button disabling validation
jtojnar Jun 7, 2025
73dd4cd
tests: Check it is not possible to create containers without button
jtojnar Jun 7, 2025
044f41d
CI: use PHP 8.2 for QA, add PHP 8.5 tests, remove kodiak config
f3l1x Feb 10, 2026
a65a5be
Tests: convert to Nette Tester with .phpt files, add bootstrap
f3l1x Feb 10, 2026
5dc3652
Config: use PHP 8.2 base, update dependencies, align with template
f3l1x Feb 10, 2026
21e76ba
Tests: move FooPresenter mock to tests/Mocks
f3l1x Feb 11, 2026
c5c73f2
chore: use php instead of phpdbg for coverage (#124)
ohmyfelix Mar 29, 2026
fa62b76
Added Nette Forms 3.3 compatibility
slischka Jul 24, 2026
9860f22
Merged fork master history
slischka Jul 24, 2026
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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ indent_style = tab
indent_size = tab
tab_width = 4

[{*.json, *.yaml, *.yml, *.md}]
[*.{json,yaml,yml,md}]
indent_style = space
indent_size = 2
6 changes: 3 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Not archived
.docs export-ignore
tests export-ignore
.github export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
Makefile export-ignore
phpstan.neon export-ignore
README.md export-ignore
phpstan.neon export-ignore
ruleset.xml export-ignore
tests export-ignore
10 changes: 0 additions & 10 deletions .github/.kodiak.toml

This file was deleted.

5 changes: 4 additions & 1 deletion .github/workflows/codesniffer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: "Codesniffer"

on:
pull_request:
workflow_dispatch:

push:
branches: ["*"]
Expand All @@ -12,4 +13,6 @@ on:
jobs:
codesniffer:
name: "Codesniffer"
uses: contributte/.github/.github/workflows/codesniffer.yml@v1
uses: contributte/.github/.github/workflows/codesniffer.yml@master
with:
php: "8.2"
7 changes: 5 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ name: "Coverage"

on:
pull_request:
workflow_dispatch:

push:
branches: ["*"]

schedule:
- cron: "0 8 * * 1"
- cron: "0 9 * * 1"

jobs:
coverage:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester-coverage.yml@v1
uses: contributte/.github/.github/workflows/nette-tester-coverage-v2.yml@master
with:
php: "8.2"
7 changes: 5 additions & 2 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ name: "Phpstan"

on:
pull_request:
workflow_dispatch:

push:
branches: ["*"]

schedule:
- cron: "0 8 * * 1"
- cron: "0 10 * * 1"

jobs:
phpstan:
name: "Phpstan"
uses: contributte/.github/.github/workflows/phpstan.yml@v1
uses: contributte/.github/.github/workflows/phpstan.yml@master
with:
php: "8.2"
31 changes: 19 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,42 @@ name: "Nette Tester"

on:
pull_request:
workflow_dispatch:

push:
branches: ["*"]

schedule:
- cron: "0 8 * * 1"
- cron: "0 10 * * 1"

jobs:
test82:
test85:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester.yml@v1
uses: contributte/.github/.github/workflows/nette-tester.yml@master
with:
php: "8.2"
php: "8.5"

test84:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester.yml@master
with:
php: "8.4"

test81:
test83:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester.yml@v1
uses: contributte/.github/.github/workflows/nette-tester.yml@master
with:
php: "8.1"
php: "8.3"

test80:
test82:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester.yml@v1
uses: contributte/.github/.github/workflows/nette-tester.yml@master
with:
php: "8.0"
php: "8.2"

testlower:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester.yml@v1
uses: contributte/.github/.github/workflows/nette-tester.yml@master
with:
php: "8.0"
php: "8.2"
composer: "composer update --no-interaction --no-progress --prefer-dist --prefer-stable --prefer-lowest"
25 changes: 14 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# IDE
/.idea

# Composer
/vendor
/composer.lock

# Tests
/tests/_output
/tests/_support
/coverage.xml
# IDE
/.idea

# Composer
/vendor
/composer.lock

# Tests
/tests/tmp
/coverage.*
/tests/**/*.log
/tests/**/*.html
/tests/**/*.expected
/tests/**/*.actual
17 changes: 11 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,29 +1,34 @@
.PHONY: install qa cs csf phpstan tests coverage

.PHONY: install
install:
composer update

.PHONY: qa
qa: phpstan cs

.PHONY: cs
cs:
ifdef GITHUB_ACTION
vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp -q --report=checkstyle src tests | cs2pr
else
vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp src tests
endif

.PHONY: csf
csf:
vendor/bin/phpcbf --standard=ruleset.xml --encoding=utf-8 --colors -nsp src tests
vendor/bin/phpcbf --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp src tests

.PHONY: phpstan
phpstan:
vendor/bin/phpstan analyse -c phpstan.neon

.PHONY: tests
tests:
vendor/bin/codecept run
vendor/bin/tester -s -p php --colors 1 -C tests/Cases

.PHONY: coverage
coverage:
ifdef GITHUB_ACTION
phpdbg -qrr vendor/bin/codecept run --coverage-xml
vendor/bin/tester -s -p php --colors 1 -C --coverage coverage.xml --coverage-src src tests/Cases
else
phpdbg -qrr vendor/bin/codecept run --coverage-html
vendor/bin/tester -s -p php --colors 1 -C --coverage coverage.html --coverage-src src tests/Cases
endif
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ For details on how to use this package, check out our [documentation](.docs).

| State | Version | Branch | PHP |
|-------------|---------|----------|---------|
| dev | `^4.1` | `master` | `>=8.0` |
| stable | `^4.0` | `master` | `>=8.0` |
| dev | `^4.1` | `master` | `>=8.1` |
| stable | `^4.0` | `v4` | `>=8.0` |

## Development

Expand Down
22 changes: 0 additions & 22 deletions codeception.yml

This file was deleted.

40 changes: 25 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,50 @@
{
"name": "contributte/forms-multiplier",
"type": "library",
"description": "Multiplier for nette forms",
"keywords": [
"nette",
"contributte",
"forms",
"multiplier"
],
"type": "library",
"license": "MIT",
"homepage": "https://github.com/contributte/forms-multiplier",
"authors": [
{
"name": "Milan Felix Sulc",
"homepage": "https://f3l1x.io"
}
],
"require": {
"php": ">=8.0",
"nette/forms": "^3.1.0"
"php": ">=8.2",
"nette/forms": "^3.2.0"
},
"require-dev": {
"codeception/codeception": "^4.1.9",
"codeception/module-asserts": "^1.3.1",
"codeception/module-phpbrowser": "^1.0.2",
"nette/application": "^3.1.11",
"nette/di": "^3.1.0",
"contributte/phpstan": "~0.2.0",
"contributte/qa": "~0.4.0",
"contributte/tester": "~0.4.0",
"latte/latte": "^3.0.0",
"contributte/qa": "^0.3",
"contributte/phpstan": "^0.1",
"webchemistry/testing-helpers": "~2.0.0"
"nette/application": ">=3.2.0 <3.3.0",
"nette/di": "^3.2.0",
"webchemistry/testing-helpers": "^4.1.1"
},
"conflict": {
"latte/latte": "<3.0.0",
"nette/component-model": "<3.1.0"
},
"autoload": {
"psr-4": {
"Contributte\\FormMultiplier\\": "src"
}
},
"autoload-dev": {
"classmap": [
"tests/includes"
]
"psr-4": {
"Tests\\": "tests"
}
},
"prefer-stable": true,
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"sort-packages": true,
"allow-plugins": {
Expand Down
51 changes: 47 additions & 4 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
includes:
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
- vendor/phpstan/phpstan-nette/extension.neon
- vendor/phpstan/phpstan-nette/rules.neon
- vendor/contributte/phpstan/phpstan.neon

parameters:
level: 8
phpVersion: 80000
phpVersion: 80200

scanDirectories:
- src
Expand All @@ -16,3 +14,48 @@ parameters:
paths:
- src
- .docs

ignoreErrors:
# https://github.com/phpstan/phpstan-nette/issues/141
-
message: '#^Parameter \#1 \$array of function array_filter expects array, Iterator\<int\|string, Nette\\ComponentModel\\IComponent\> given\.$#'
identifier: argument.type
count: 4
path: src/Multiplier.php

# Strict rules - boolean conditions
-
identifier: if.condNotBoolean
path: src/ComponentResolver.php
-
identifier: if.condNotBoolean
path: src/Multiplier.php
-
identifier: booleanAnd.leftNotBoolean
path: src/Latte/Extension/Node/MultiplierAddNode.php
-
identifier: booleanAnd.leftNotBoolean
path: src/Multiplier.php
-
identifier: booleanAnd.rightNotBoolean
path: src/Multiplier.php
-
identifier: booleanNot.exprNotBoolean
path: src/Latte/Extension/Node/MultiplierRemoveNode.php
-
identifier: booleanNot.exprNotBoolean
path: src/Multiplier.php
-
identifier: ternary.condNotBoolean
path: src/Latte/Extension/Node/MultiplierAddNode.php
-
identifier: ternary.condNotBoolean
path: src/Latte/Extension/Node/MultiplierRemoveNode.php

# Strict rules - covariance/contravariance
-
identifier: method.childReturnType
path: src/Latte/Extension/MultiplierExtension.php
-
identifier: method.childParameterType
path: src/Multiplier.php
Loading
Loading