forked from symfony/demo
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,11 @@ | ||
Symfony Demo Application | ||
======================== | ||
|
||
The "Symfony Demo Application" is a reference application created to show how | ||
to develop applications following the [Symfony Best Practices][1]. | ||
|
||
You can also learn about these practices in [the official Symfony Book][5]. | ||
|
||
Requirements | ||
------------ | ||
|
||
* PHP 8.2.0 or higher; | ||
* PDO-SQLite PHP extension enabled; | ||
* and the [usual Symfony application requirements][2]. | ||
|
||
Installation | ||
------------ | ||
|
||
There are 3 different ways of installing this project depending on your needs: | ||
|
||
**Option 1.** [Download Symfony CLI][4] and use the `symfony` binary installed | ||
on your computer to run this command: | ||
|
||
```bash | ||
symfony new --demo my_project | ||
``` | ||
|
||
**Option 2.** [Download Composer][6] and use the `composer` binary installed | ||
on your computer to run these commands: | ||
|
||
```bash | ||
# you can create a new project based on the Symfony Demo project... | ||
composer create-project symfony/symfony-demo my_project | ||
|
||
# ...or you can clone the code repository and install its dependencies | ||
git clone https://github.com/symfony/demo.git my_project | ||
cd my_project/ | ||
composer install | ||
``` | ||
|
||
**Option 3.** Click the following button to deploy this project on Platform.sh, | ||
the official Symfony PaaS, so you can try it without installing anything locally: | ||
|
||
<p align="center"> | ||
<a href="https://console.platform.sh/projects/create-project?template=https://raw.githubusercontent.com/symfonycorp/platformsh-symfony-template-metadata/main/symfony-demo.template.yaml&utm_content=symfonycorp&utm_source=github&utm_medium=button&utm_campaign=deploy_on_platform"><img src="https://platform.sh/images/deploy/lg-blue.svg" alt="Deploy on Platform.sh" width="180px" /></a> | ||
</p> | ||
|
||
Usage | ||
----- | ||
|
||
There's no need to configure anything before running the application. There are | ||
2 different ways of running this application depending on your needs: | ||
|
||
**Option 1.** [Download Symfony CLI][4] and run this command: | ||
|
||
```bash | ||
cd my_project/ | ||
symfony serve | ||
``` | ||
|
||
Then access the application in your browser at the given URL (<https://localhost:8000> by default). | ||
|
||
**Option 2.** Use a web server like Nginx or Apache to run the application | ||
(read the documentation about [configuring a web server for Symfony][3]). | ||
|
||
On your local machine, you can run this command to use the built-in PHP web server: | ||
|
||
```bash | ||
cd my_project/ | ||
php -S localhost:8000 -t public/ | ||
``` | ||
|
||
Tests | ||
----- | ||
|
||
Execute this command to run tests: | ||
|
||
```bash | ||
cd my_project/ | ||
./bin/phpunit | ||
``` | ||
|
||
[1]: https://symfony.com/doc/current/best_practices.html | ||
[2]: https://symfony.com/doc/current/setup.html#technical-requirements | ||
[3]: https://symfony.com/doc/current/setup/web_server_configuration.html | ||
[4]: https://symfony.com/download | ||
[5]: https://symfony.com/book | ||
[6]: https://getcomposer.org/ | ||
# test-symfony for DDEV testing only: | ||
|
||
- Clone this repo, add upstream `git remote add upstream https://github.com/symfony/demo` | ||
- Rebase the default branch `ddev-automated-test` onto the latest tag from `upstream`, resolve conflicts | ||
- Use the [latest Symfony quickstart](https://ddev.readthedocs.io/en/latest/users/quickstart/#symfony) for this repo, do not commit `.ddev` | ||
- `ddev exec "rm -rf assets/vendor var/sass vendor" && ddev composer install && git add assets/vendor var/sass vendor -f` | ||
- Run `ddev console doctrine:schema:create && ddev console doctrine:fixtures:load --no-interaction` | ||
- Export the db `mkdir -p .tarballs && ddev export-db --gzip=false --file=.tarballs/db.sql && tar -czf .tarballs/db.sql.tar.gz -C .tarballs db.sql` | ||
- Run `git push`, create a new release adding `.tarballs/db.sql.tar.gz` as an asset | ||
- Update the URLs in `ddev/ddev` for the new release (e.g. if the old release was `2.6.0` and the new release is `2.7.0`, then search for this string in the `ddev/ddev` and replace it with `2.7.0`) | ||
- Rerun the tests for Laravel `GOTEST_SHORT=20 make testfullsitesetup` |