mirror of
https://github.com/symfony/ux.symfony.com.git
synced 2026-03-24 00:02:09 +01:00
[Site] updates
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
# define your env variables for the test env here
|
||||
KERNEL_CLASS='App\Kernel'
|
||||
APP_SECRET='$ecretf0rt3st'
|
||||
SYMFONY_DEPRECATIONS_HELPER=999999
|
||||
PANTHER_APP_ENV=panther
|
||||
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
|
||||
|
||||
35
README.md
Normal file
35
README.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# [ux.symfony.com](https://ux.symfony.com)
|
||||
|
||||
Source code for [ux.symfony.com](https://ux.symfony.com).
|
||||
|
||||
## Contributing
|
||||
|
||||
### Local Development
|
||||
|
||||
1. Install the project:
|
||||
```bash
|
||||
git clone git@github.com:symfony/ux
|
||||
cd ux/ux.symfony.com
|
||||
```
|
||||
2. Install the dependencies:
|
||||
```bash
|
||||
composer install
|
||||
```
|
||||
3. (optional) Configure docker:
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
4. Populate the database:
|
||||
```bash
|
||||
symfony console app:load-data
|
||||
```
|
||||
5. Start the web server:
|
||||
```bash
|
||||
symfony server:start -d
|
||||
```
|
||||
|
||||
### Running the Test Suite
|
||||
|
||||
```bash
|
||||
vendor/bin/phpunit
|
||||
```
|
||||
@@ -115,6 +115,7 @@
|
||||
"symfony/phpunit-bridge": "^6.1",
|
||||
"symfony/stopwatch": "6.3.*",
|
||||
"symfony/web-profiler-bundle": "6.3.*",
|
||||
"zenstruck/browser": "^1.1"
|
||||
"zenstruck/browser": "^1.1",
|
||||
"zenstruck/foundry": "^1.33"
|
||||
}
|
||||
}
|
||||
|
||||
1082
composer.lock
generated
1082
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -28,4 +28,5 @@ return [
|
||||
Symfony\UX\StimulusBundle\StimulusBundle::class => ['all' => true],
|
||||
Symfony\UX\Typed\TypedBundle::class => ['all' => true],
|
||||
Symfony\UX\Swup\SwupBundle::class => ['all' => true],
|
||||
Zenstruck\Foundry\ZenstruckFoundryBundle::class => ['dev' => true, 'test' => true],
|
||||
];
|
||||
|
||||
7
config/packages/zenstruck_foundry.yaml
Normal file
7
config/packages/zenstruck_foundry.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
when@dev: &dev
|
||||
# See full configuration: https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#full-default-bundle-configuration
|
||||
zenstruck_foundry:
|
||||
# Whether to auto-refresh proxies by default (https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#auto-refresh)
|
||||
auto_refresh_proxies: true
|
||||
|
||||
when@test: *dev
|
||||
@@ -15,6 +15,7 @@
|
||||
<server name="SHELL_VERBOSITY" value="-1" />
|
||||
<server name="SYMFONY_PHPUNIT_REMOVE" value="" />
|
||||
<server name="SYMFONY_PHPUNIT_VERSION" value="9.5" />
|
||||
<server name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0&max[direct]=0&quiet[]=indirect"/>
|
||||
</php>
|
||||
|
||||
<testsuites>
|
||||
|
||||
@@ -9,7 +9,7 @@ use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
|
||||
class AddTodoItemForm extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('item', TextType::class, [
|
||||
|
||||
@@ -10,7 +10,7 @@ use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
|
||||
class AnimalCreationForm extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$animals = ['🐑', '🦖', '🦄', '🐖'];
|
||||
$builder
|
||||
|
||||
@@ -8,7 +8,7 @@ use Symfony\UX\Dropzone\Form\DropzoneType;
|
||||
|
||||
class DropzoneForm extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('file', DropzoneType::class, [
|
||||
|
||||
@@ -12,7 +12,7 @@ use Symfony\UX\Autocomplete\Form\ParentEntityAutocompleteType;
|
||||
#[AsEntityAutocompleteField]
|
||||
class FoodAutocompleteField extends AbstractType
|
||||
{
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'class' => Food::class,
|
||||
|
||||
@@ -24,7 +24,7 @@ class MealPlannerForm extends AbstractType
|
||||
*/
|
||||
private $dependencies = [];
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$this->factory = $builder->getFormFactory();
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
|
||||
class RegistrationFormType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('email', EmailType::class, [
|
||||
|
||||
@@ -9,7 +9,7 @@ use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
|
||||
class SendNotificationForm extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('message', ChoiceType::class, [
|
||||
|
||||
@@ -8,7 +8,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class TimeForAMealForm extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('foods', FoodAutocompleteField::class)
|
||||
|
||||
@@ -9,7 +9,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class TodoItemForm extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('description', null, [
|
||||
@@ -21,7 +21,7 @@ class TodoItemForm extends AbstractType
|
||||
;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults(['data_class' => TodoItem::class]);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ use Symfony\UX\LiveComponent\Form\Type\LiveCollectionType;
|
||||
|
||||
class TodoListFormType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('name', null, [
|
||||
@@ -30,7 +30,7 @@ class TodoListFormType extends AbstractType
|
||||
;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults(['data_class' => TodoList::class]);
|
||||
}
|
||||
|
||||
12
symfony.lock
12
symfony.lock
@@ -671,5 +671,17 @@
|
||||
},
|
||||
"zenstruck/callback": {
|
||||
"version": "v1.4.2"
|
||||
},
|
||||
"zenstruck/foundry": {
|
||||
"version": "1.33",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "1.10",
|
||||
"ref": "37c2f894cc098ab4c08874b80cccc8e2f8de7976"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/zenstruck_foundry.yaml"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,14 +2,26 @@
|
||||
|
||||
namespace App\Tests\Functional;
|
||||
|
||||
use App\Entity\Food;
|
||||
use App\Model\LiveDemo;
|
||||
use App\Service\LiveDemoRepository;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
use Zenstruck\Browser\Test\HasBrowser;
|
||||
use Zenstruck\Foundry\Test\Factories;
|
||||
use Zenstruck\Foundry\Test\ResetDatabase;
|
||||
use function Zenstruck\Foundry\create;
|
||||
|
||||
class LiveComponentDemosTest extends KernelTestCase
|
||||
{
|
||||
use HasBrowser;
|
||||
use Factories, HasBrowser, ResetDatabase;
|
||||
|
||||
/**
|
||||
* @before
|
||||
*/
|
||||
public function setupEntities(): void
|
||||
{
|
||||
create(Food::class, ['name' => 'Pizza', 'votes' => 10]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider getSmokeTests
|
||||
|
||||
Reference in New Issue
Block a user