# AutoAdmin Library

## Documentation && Changelog

[link to documentation](./doc/index.md)

[link to changelog](./CHANGELOG.md)

## Installation

```bash
composer create-project symfony/skeleton:"6.4.*" <my_project_directory>
cd <my_project_directory>
composer require webapp
composer require -W doctrine/orm:^2.6.3
composer remove symfony/asset-mapper

composer config repositories.satis composer https://satis.gda.fr
composer config extra.symfony.endpoint --json '["https://satis.gda.fr/recipes/index.json", "flex://defaults"]'

composer require -W gda/autoadmin
```

---------------------------

## For development

### Work in local

For local developpement add this to "repositories" composer.json section:
```json
{
    "type": "path",
    "url": "../aa-bundle"
}
```
and run
```bash
rm -rf ./vendor/gda/autoadmin && composer update gda/autoadmin
```

You can use `yarn watch` and `yarn build` for update/work assets in local, don't forget to make `yarn build` after push new version of bundle.

Use this command for simlink project vendor in local autoadmin bundle for avoid package version error:

```bash
ln -s /home/gda223/PhpstormProjects/your-project-with-autoadmin/vendor/ /home/gda223/PhpstormProjects/autoadmin-project
```

### Update bundle

When push on master branch, the bundle when automatically updated on https://satis.gda.fr/, wait few seconds for let satis update file.

And for update in your project, run next command, it will update composer.json and composer.lock

```bash
rm -rf ./vendor/gda/autoadmin && composer update gda/autoadmin
```

### Using rsync to bind project vendor with AA

```bash
watch -n 1 'rsync -rva --delete ./src/ ../AAA-site/vendor/gda/autoadmin/src'
```


### List last git version tags

```bash
bash ./scripts/git/last_tags.sh
```


# Notes

We use phpunit ^9.5 because symfony 6.4 is using this.