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

Update to Symfony 7 #6

Merged
merged 5 commits into from Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env
Expand Up @@ -4,7 +4,8 @@ APP_SECRET=75d4e1cbc659df86c914d00f5f9a00d4
###< symfony/framework-bundle ###

###> doctrine/doctrine-bundle ###
DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:8877/demohtmx?serverVersion=15&charset=utf8"
# DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:8877/demohtmx?serverVersion=15&charset=utf8"
DATABASE_URL="sqlite:///%kernel.project_dir%/messages.db"
###< doctrine/doctrine-bundle ###

###> symfony/messenger ###
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -19,4 +19,7 @@
###< symfony/phpunit-bridge ###
###> symfony/asset-mapper ###
/public/assets/
/assets/vendor/
###< symfony/asset-mapper ###

messages.db
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💣 chore: ‏This should be removed now 😄

19 changes: 10 additions & 9 deletions README.md
Expand Up @@ -5,24 +5,25 @@ This is the source code for the blog post at https://jolicode.com/blog/making-a-
## Requirements

- Symfony CLI
- Docker
- PHP 8.2+ (with appropriate database extensions, sqlite by default)

## Installation

- Clone the repository

```shell
composer install
bin/console doctrine:database:create
bin/console doctrine:schema:update --force --complete
symfony server:start -d
symfony open:local
```
-
- 🌐: `https://127.0.0.1:8000`

- Edit your `.env` and your `docker-compose.yaml` files to add your database credentials
## Production

When deploying to production, use postgres or mysql and change the environment variables accordingly.

## Run the project

```shell
docker compose up -d
symfony server:start -d
symfony open:local
```

- 🌐: `https://127.0.0.1:8000`
8 changes: 8 additions & 0 deletions assets/app.js
@@ -1,3 +1,11 @@
import htmx from 'htmx.org';

window.htmx = htmx;
/*
* Welcome to your app's main JavaScript file!
*
* This file will be included onto the page via the importmap() Twig function,
* which should already be in your base.html.twig.
*/
import './styles/app.css';

62 changes: 31 additions & 31 deletions composer.json
Expand Up @@ -12,33 +12,33 @@
"doctrine/orm": "^2.16",
"phpdocumentor/reflection-docblock": "^5.3",
"phpstan/phpdoc-parser": "^1.24",
"symfony/asset": "6.3.*",
"symfony/console": "6.3.*",
"symfony/doctrine-messenger": "6.3.*",
"symfony/dotenv": "6.3.*",
"symfony/expression-language": "6.3.*",
"symfony/asset": "^7.0",
"symfony/console": "^7.0",
"symfony/doctrine-messenger": "^7.0",
"symfony/dotenv": "^7.0",
"symfony/expression-language": "^7.0",
"symfony/flex": "^2",
"symfony/form": "6.3.*",
"symfony/framework-bundle": "6.3.*",
"symfony/http-client": "6.3.*",
"symfony/intl": "6.3.*",
"symfony/mailer": "6.3.*",
"symfony/mime": "6.3.*",
"symfony/form": "^7.0",
"symfony/framework-bundle": "^7.0",
"symfony/http-client": "^7.0",
"symfony/intl": "^7.0",
"symfony/mailer": "^7.0",
"symfony/mime": "^7.0",
"symfony/monolog-bundle": "^3.0",
"symfony/notifier": "6.3.*",
"symfony/process": "6.3.*",
"symfony/property-access": "6.3.*",
"symfony/property-info": "6.3.*",
"symfony/runtime": "6.3.*",
"symfony/security-bundle": "6.3.*",
"symfony/serializer": "6.3.*",
"symfony/string": "6.3.*",
"symfony/translation": "6.3.*",
"symfony/twig-bundle": "6.3.*",
"symfony/validator": "6.3.*",
"symfony/web-link": "6.3.*",
"symfony/yaml": "6.3.*",
"symfonycasts/tailwind-bundle": "^0.1.7",
"symfony/notifier": "^7.0",
"symfony/process": "^7.0",
"symfony/property-access": "^7.0",
"symfony/property-info": "^7.0",
"symfony/runtime": "^7.0",
"symfony/security-bundle": "^7.0",
"symfony/serializer": "^7.0",
"symfony/string": "^7.0",
"symfony/translation": "^7.0",
"symfony/twig-bundle": "^7.0",
"symfony/validator": "^7.0",
"symfony/web-link": "^7.0",
"symfony/yaml": "^7.0",
"symfonycasts/tailwind-bundle": "*",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0"
},
Expand Down Expand Up @@ -89,17 +89,17 @@
"extra": {
"symfony": {
"allow-contrib": false,
"require": "6.3.*"
"require": "^7.0"
}
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"symfony/browser-kit": "6.3.*",
"symfony/css-selector": "6.3.*",
"symfony/debug-bundle": "6.3.*",
"symfony/browser-kit": "^7.0",
"symfony/css-selector": "^7.0",
"symfony/debug-bundle": "^7.0",
"symfony/maker-bundle": "^1.0",
"symfony/phpunit-bridge": "^6.3",
"symfony/stopwatch": "6.3.*",
"symfony/web-profiler-bundle": "6.3.*"
"symfony/stopwatch": "^7.0",
"symfony/web-profiler-bundle": "^7.0"
}
}