Skip to content

Commit

Permalink
Nette 3
Browse files Browse the repository at this point in the history
  • Loading branch information
mabar authored and Milan Felix Šulc committed Jun 16, 2019
1 parent bfaf0b4 commit c587236
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 23 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ Extra contribution to [`nette/forms`](https://github.com/nette/forms).

## Versions

| State | Version | Branch | PHP |
|-------------|---------|----------|----------|
| dev | `^0.4` | `master` | `>= 7.1` |
| stable | `^0.3` | `master` | `>= 7.1` |
| stable | `^0.1` | `master` | `>= 5.6` |
| State | Version | Branch | Nette | PHP |
|-------------|---------|----------|-------|---------|
| dev | `^0.5` | `master` | 3.0+ | `^7.2` |
| stable | `^0.4` | `master` | 3.0+ | `^7.2` |
| stable | `^0.3` | `master` | 2.4 | `>=7.1` |
| stable | `^0.1` | `master` | 2.4 | `>=5.6` |

## Maintainers

Expand Down
15 changes: 6 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@
}
],
"require": {
"php": ">= 7.1",
"nette/forms": "~2.4.8"
"php": "^7.2",
"nette/forms": "~3.0.0"
},
"require-dev": {
"nette/application": "~2.4.13",
"nette/di": "~2.4.13",
"nette/utils": "~2.5.2",
"nette/application": "~3.0.0",
"nette/di": "~3.0.0",
"ninjify/nunjuck": "^0.2",
"ninjify/qa": "^0.8.0",
"phpstan/extension-installer": "^1.0",
Expand All @@ -43,9 +42,7 @@
"nette/di": "to use FormFactoryExtension[CompilerExtension]"
},
"conflict": {
"nette/application": "<2.4.12",
"nette/utils": "<2.5.0",
"nette/http": "<2.4.9"
"nette/di": "<3.0.0"
},
"autoload": {
"psr-4": {
Expand All @@ -59,7 +56,7 @@
"prefer-stable": true,
"extra": {
"branch-alias": {
"dev-master": "0.4.x-dev"
"dev-master": "0.5.x-dev"
}
}
}
1 change: 0 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
parameters:
ignoreErrors:
# It is contravariant, original typehint is not recognized properly
- '#^Parameter \#2 \$mode \(string\|null\) of method .+ should be contravariant with parameter \$mode \(mixed\) of method Nette\\Forms\\Rendering\\DefaultFormRenderer\:\:render\(\)$#'
- '#^Parameter \#1 \$value \(string\) of method Contributte\\Forms\\Controls\\ProtectionFastInput\:\:setValue\(\) should be contravariant with parameter \$value \(mixed\) of method Nette\\Forms\\.+\:\:setValue\(\)$#'
5 changes: 1 addition & 4 deletions src/DI/ApplicationFormFactoryExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
class ApplicationFormFactoryExtension extends CompilerExtension
{

/**
* Register services
*/
public function loadConfiguration(): void
{
if (!class_exists(Form::class)) {
Expand All @@ -21,7 +18,7 @@ public function loadConfiguration(): void

$builder = $this->getContainerBuilder();

$builder->addDefinition($this->prefix('factory'))
$builder->addFactoryDefinition($this->prefix('factory'))
->setImplement(IApplicationFormFactory::class);
}

Expand Down
5 changes: 1 addition & 4 deletions src/DI/StandaloneFormFactoryExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,11 @@
class StandaloneFormFactoryExtension extends CompilerExtension
{

/**
* Register services
*/
public function loadConfiguration(): void
{
$builder = $this->getContainerBuilder();

$builder->addDefinition($this->prefix('factory'))
$builder->addFactoryDefinition($this->prefix('factory'))
->setImplement(IStandaloneFormFactory::class);
}

Expand Down

0 comments on commit c587236

Please sign in to comment.