Skip to content
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

Adapt to new widgets feature "theme config" #244

Merged
merged 23 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"yiisoft/hydrator-validator": "dev-master",
"yiisoft/strings": "^2.0",
"yiisoft/validator": "^1.0",
"yiisoft/widget": "^2.0"
"yiisoft/widget": "^2.1"
},
"require-dev": {
"maglnet/composer-require-checker": "^4.2",
Expand Down
4 changes: 2 additions & 2 deletions config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
declare(strict_types=1);

use Psr\Container\ContainerInterface;
use Yiisoft\Form\Field;
use Yiisoft\Form\ThemeContainer;

/**
* @var array $params
*/

return [
static function (ContainerInterface $container) use ($params) {
Field::initialize(
ThemeContainer::initialize(
$params['yiisoft/form']['configs'],
$params['yiisoft/form']['defaultConfig'],
);
Expand Down
2 changes: 1 addition & 1 deletion docs/creating-forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ $this->setTitle($title);
There is a way to declare validation rules using attributes.
For detailed information of using attributes see [Yiisoft Validator](https://github.com/yiisoft/validator).

> If you are using attributes then there is no need to declare the `getRules` method.
> If you are using attributes then there is no need to declare the `getRules` method.
4 changes: 2 additions & 2 deletions docs/fields-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
Configuration levels:

- widget factory configuration;
- common configuration in field factory;
- individual configuration in field factory;
- common configuration from theme (optional);
- individual configuration from theme (optional);
- configuration at the place of use.
48 changes: 30 additions & 18 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" colors="true" verbose="true" bootstrap="vendor/autoload.php" failOnRisky="true" failOnWarning="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage>
<include>
<directory>./</directory>
</include>
<exclude>
<directory>./tests</directory>
<directory>./vendor</directory>
</exclude>
</coverage>
<php>
<ini name="error_reporting" value="-1"/>
</php>
<testsuites>
<testsuite name="YiiForm">
<directory>./tests</directory>
</testsuite>
</testsuites>

<phpunit
bootstrap="vendor/autoload.php"
colors="true"
verbose="true"
failOnRisky="true"
failOnWarning="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
stopOnFailure="false"
executionOrder="random"
resolveDependencies="true"
>
<php>
<ini name="error_reporting" value="-1"/>
</php>

<testsuites>
<testsuite name="Yii Form tests">
<directory>./tests</directory>
</testsuite>
</testsuites>

<coverage>
<include>
<directory>./src</directory>
<directory>./config</directory>
</include>
</coverage>
</phpunit>
Loading