generated from strangebuzz/MicroSymfony
-
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
1 parent
4b82d1c
commit 9f7a6eb
Showing
80 changed files
with
6,825 additions
and
2,315 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
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
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,53 +1,5 @@ | ||
// @see https://stimulus.hotwired.dev/handbook/installing#using-other-build-systems | ||
import {Application, Controller} from "@hotwired/stimulus" // reference version: Stimulus 3.2.1 | ||
import {Application} from "@hotwired/stimulus" // reference version: Stimulus 3.2.1 | ||
|
||
window.Stimulus = Application.start() | ||
Stimulus.debug = false | ||
|
||
Stimulus.register("hello", class extends Controller { | ||
static targets = ["name", "greeting", "dialog", "form"] | ||
|
||
connect() { | ||
console.log("Hello, Stimulus!", this.element) | ||
} | ||
|
||
greet() { | ||
if (!this.formTarget.reportValidity()) { | ||
return | ||
} | ||
|
||
this.greetingTarget.innerHTML = `Hello, ${this.nameTarget.value}!` | ||
this.dialogTarget.showModal() | ||
} | ||
|
||
reset() { | ||
this.nameTarget.value = '' | ||
this.greetingTarget.innerHTML = '' | ||
} | ||
}) | ||
|
||
Stimulus.register("api", class extends Controller { | ||
static targets = ["title", "slug"] | ||
static values = { | ||
"url": String | ||
} | ||
|
||
connect() { | ||
console.log("Dataset: ", this.element.dataset) // list all data properties of the controller | ||
} | ||
|
||
slugify() { | ||
let apiUrl = this.urlValue + '?title=' + this.titleTarget.value | ||
const slugTarget = this.slugTarget | ||
fetch(apiUrl) | ||
.then(function (response) { | ||
return response.json() | ||
}) | ||
.then(function (data) { | ||
slugTarget.value = data.slug | ||
}) | ||
.catch(function (error) { | ||
console.log('An error occured. 😞', error); | ||
}) | ||
} | ||
}) |
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,15 +1,3 @@ | ||
/** | ||
* Mark required fields in Symfony forms. | ||
* | ||
* @see https://symfony.com/doc/current/forms.html#form-type-options | ||
*/ | ||
label.required:after { | ||
content: " *"; | ||
} | ||
|
||
/** | ||
* Form errors in red. | ||
*/ | ||
form > div > div > ul > li { | ||
color: red; | ||
} | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
if (!ini_get('date.timezone')) { | ||
ini_set('date.timezone', 'UTC'); | ||
} | ||
|
||
if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) { | ||
if (PHP_VERSION_ID >= 80000) { | ||
require dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit'; | ||
} else { | ||
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php'); | ||
require PHPUNIT_COMPOSER_INSTALL; | ||
PHPUnit\TextUI\Command::main(); | ||
} | ||
} else { | ||
if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) { | ||
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n"; | ||
exit(1); | ||
} | ||
|
||
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php'; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
version: '3' | ||
|
||
services: | ||
###> doctrine/doctrine-bundle ### | ||
database: | ||
ports: | ||
- "5432" | ||
###< doctrine/doctrine-bundle ### | ||
|
||
###> symfony/mailer ### | ||
mailer: | ||
image: axllent/mailpit | ||
ports: | ||
- "1025" | ||
- "8025" | ||
environment: | ||
MP_SMTP_AUTH_ACCEPT_ANY: 1 | ||
MP_SMTP_AUTH_ALLOW_INSECURE: 1 | ||
###< symfony/mailer ### |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
version: '3' | ||
|
||
services: | ||
###> doctrine/doctrine-bundle ### | ||
database: | ||
image: postgres:${POSTGRES_VERSION:-16}-alpine | ||
environment: | ||
POSTGRES_DB: ${POSTGRES_DB:-app} | ||
# You should definitely change the password in production | ||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!ChangeMe!} | ||
POSTGRES_USER: ${POSTGRES_USER:-app} | ||
healthcheck: | ||
test: ["CMD", "pg_isready", "-d", "${POSTGRES_DB:-app}", "-U", "${POSTGRES_USER:-app}"] | ||
timeout: 5s | ||
retries: 5 | ||
start_period: 60s | ||
volumes: | ||
- database_data:/var/lib/postgresql/data:rw | ||
# You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data! | ||
# - ./docker/db/data:/var/lib/postgresql/data:rw | ||
###< doctrine/doctrine-bundle ### | ||
|
||
volumes: | ||
###> doctrine/doctrine-bundle ### | ||
database_data: | ||
###< doctrine/doctrine-bundle ### |
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
Oops, something went wrong.