Skip to content

Commit

Permalink
initial copy of Symfony 6 project
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed Jun 14, 2023
0 parents commit 0cfe17a
Show file tree
Hide file tree
Showing 279 changed files with 48,896 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# In all environments, the following files are loaded if they exist,
# the latter taking precedence over the former:
#
# * .env contains default values for the environment variables needed by the app
# * .env.local uncommitted file with local overrides
# * .env.$APP_ENV committed environment-specific defaults
# * .env.$APP_ENV.local uncommitted environment-specific overrides
#
# Real environment variables win over .env files.
#
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
# https://symfony.com/doc/current/configuration/secrets.html
#
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration

###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=4777a99cd6c61ce84969bd1338737c38
###< symfony/framework-bundle ###

###> doctrine/doctrine-bundle ###
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
#
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
# DATABASE_URL="mysql://db_user:[email protected]:3306/db_name?serverVersion=5.7&charset=utf8mb4"
DATABASE_URL="postgresql://symfony:[email protected]:5432/app?serverVersion=13&charset=utf8"
###< doctrine/doctrine-bundle ###
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

###> symfony/framework-bundle ###
/.env.local
/.env.local.php
/.env.*.local
/config/secrets/prod/prod.decrypt.private.php
/public/bundles/
/var/
/vendor/
###< symfony/framework-bundle ###

###> symfony/webpack-encore-bundle ###
/node_modules/
/public/build/
npm-debug.log
yarn-error.log
###< symfony/webpack-encore-bundle ###
122 changes: 122 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# Tutorials, Friendship & Symfony6

Well hi there! This repository holds the code and script
for the [Symfony6 Tutorials](https://symfonycasts.com/tracks/symfony) on SymfonyCasts.

## Setup

If you've just downloaded the code, congratulations!!

To get it working, follow these steps:

**Download Composer dependencies**

Make sure you have [Composer installed](https://getcomposer.org/download/)
and then run:

```
composer install
```

You may alternatively need to run `php composer.phar install`, depending
on how you installed Composer.

**Start the Symfony web server**

You can use Nginx or Apache, but Symfony's local web server
works even better.

To install the Symfony local web server, follow
"Downloading the Symfony client" instructions found
here: https://symfony.com/download - you only need to do this
once on your system.

Then, to start the web server, open a terminal, move into the
project, and run:

```
symfony serve
```

(If this is your first time using this command, you may see an
error that you need to run `symfony server:ca:install` first).

Now check out the site at `https://localhost:8000`

Have fun!

**OPTIONAL: Webpack Encore Assets**

This app uses Webpack Encore for the CSS, JS and image files.
But, the built files are already included... so you don't need
to download or build anything if you don't want to!

But if you *do* want to play with the CSS/JS and build the
final files, no problem. Make sure you have [yarn](https://yarnpkg.com/lang/en/)
or `npm` installed (`npm` comes with Node) and then run:

```
yarn install
yarn encore dev --watch
# or
npm install
npm run watch
```

## Have Ideas, Feedback or an Issue?

If you have suggestions or questions, please feel free to
open an issue on this repository or comment on the course
itself. We're watching both :).

## SymfonyCasts Team Mix Tapes

Want to listen to *our* mixtapes?

* Diego: https://tidal.com/browse/playlist/4b0dd1f6-c3d4-4886-8e31-c59455596528
* Victor: https://tidal.com/browse/playlist/e2473e0d-e4df-407e-b12c-f40765d1dd4b
* Danielle: https://tidal.com/browse/playlist/acd3fae7-10ea-43a4-be89-56a3f6f3040c
* Ryan: https://tidal.com/browse/playlist/96d88543-e1bb-4457-b38a-3afd7d71d1da
* Matias: https://tidal.com/browse/playlist/9f914493-5844-4fbc-8029-a828ee4d090d
* Leanna: https://tidal.com/browse/playlist/fb01a86a-802e-4861-9a20-a0d37244b696
* Vladimir: https://tidal.com/browse/playlist/0e78bb9e-a6ce-4548-9521-3e6779875978

... or for countries where Tidal isn't available:
https://open.spotify.com/user/31smny3k6o3kbqmmyzwebplayhda?si=8kq-n_8aRNOieXAOQJoleQ

## Rock 'N' Roll Band

If we were a rock 'n' roll band,
We'd travel all over the land.
We'd play and we'd sing and wear spangly things.
If we were a rock 'n' roll band.
If we were a rock 'n' roll band,
And we were up there on the stand,
The people would here us and love us and cheer us.
Hurray for that rock 'n' roll band.
If we were a rock 'n' roll band,
Then we'd have a million fans.
We'd giggle and laugh and sign autographs,
If we were a rock 'n' roll band.
If we were a rock 'n' roll band.
The people would all kiss our hands.
We'd be millionaires and have extra long hair,
If we were a rock 'n' roll band.
But we ain't no rock 'n' roll band,
We're just seven kids in the sand.
With homemade guitars and pails and jars
And drums of potato chip cans.
Just seven kids in the sand.
Talk'n and waven' our hands.
And dreamin' and thinkin' oh wouldn't it be grand,
If we were a rock 'n' roll band.

Shel Silverstein

## Thanks!

And as always, thanks so much for your support and letting
us do what we love!

<3 Your friends at SymfonyCasts
14 changes: 14 additions & 0 deletions assets/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Welcome to your app's main JavaScript file!
*
* We recommend including the built version of this JavaScript file
* (and its CSS file) in your base layout (base.html.twig).
*/

// any CSS you import will output into a single css file (app.css in this case)
import './styles/app.css';

// start the Stimulus application
import './bootstrap';

console.log('Hi! My name is app.js!');
11 changes: 11 additions & 0 deletions assets/bootstrap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { startStimulusApp } from '@symfony/stimulus-bridge';

// Registers Stimulus controllers from controllers.json and in the controllers/ directory
export const app = startStimulusApp(require.context(
'@symfony/stimulus-bridge/lazy-controller-loader!./controllers',
true,
/\.[jt]sx?$/
));

// register any custom, 3rd party controllers here
// app.register('some_controller_name', SomeImportedController);
11 changes: 11 additions & 0 deletions assets/controllers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"controllers": {
"@symfony/ux-turbo": {
"turbo-core": {
"enabled": true,
"fetch": "eager"
}
}
},
"entrypoints": []
}
28 changes: 28 additions & 0 deletions assets/controllers/song-controls_controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Controller } from '@hotwired/stimulus';

/*
* This is an example Stimulus controller!
*
* Any element with a data-controller="hello" attribute will cause
* this controller to be executed. The name "hello" comes from the filename:
* hello_controller.js -> "hello"
*
* Delete this file or adapt it for your use!
*/
import axios from 'axios';

export default class extends Controller {
static values = {
infoUrl: String
}

play(event) {
event.preventDefault();

axios.get(this.infoUrlValue)
.then((response) => {
const audio = new Audio(response.data.url);
audio.play();
});
}
}
39 changes: 39 additions & 0 deletions assets/styles/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
@import '~bootstrap';
@import '~@fortawesome/fontawesome-free/css/all.css';
@import '~@fontsource/roboto-condensed';

body {
background-color: #17242C;
color: #fff;
font-family: 'Roboto Condensed', sans-serif;
}

.song-list i {
margin-top: 7px;
}

.song-list a {
color: #fff;
}

.song-details {
background-color: #222F36;
border-radius: 5px;
padding: 5px;
}

.genre-list li {
margin-right: 5px;
}

.mixed-vinyl-container {
background: rgb(23,36,44);
background: linear-gradient(180deg, rgba(23,36,44,1) 1%, rgba(34,47,54,1) 97%);
border-radius: 5px;
display: block;
color: #fff;
text-decoration: none;
}
.mixed-vinyl-container:hover {
color: #fff;
}
17 changes: 17 additions & 0 deletions bin/console
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env php
<?php

use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;

if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
}

require_once dirname(__DIR__).'/vendor/autoload_runtime.php';

return function (array $context) {
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);

return new Application($kernel);
};
97 changes: 97 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"type": "project",
"license": "proprietary",
"prefer-stable": true,
"require": {
"php": ">=8.1",
"ext-ctype": "*",
"ext-iconv": "*",
"babdev/pagerfanta-bundle": "^3.7",
"doctrine/doctrine-bundle": "^2.7",
"doctrine/doctrine-migrations-bundle": "^3.2",
"doctrine/orm": "^2.12",
"knplabs/knp-time-bundle": "^1.18",
"pagerfanta/doctrine-orm-adapter": "^3.6",
"pagerfanta/twig": "^3.6",
"sensio/framework-extra-bundle": "^6.2",
"stof/doctrine-extensions-bundle": "^1.7",
"symfony/asset": "6.1.*",
"symfony/console": "6.1.*",
"symfony/dotenv": "6.1.*",
"symfony/flex": "^2",
"symfony/framework-bundle": "6.1.*",
"symfony/http-client": "6.1.*",
"symfony/monolog-bundle": "^3.0",
"symfony/proxy-manager-bridge": "6.1.*",
"symfony/runtime": "6.1.*",
"symfony/twig-bundle": "6.1.*",
"symfony/ux-turbo": "^2.0",
"symfony/webpack-encore-bundle": "^1.13",
"symfony/yaml": "6.1.*",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0"
},
"config": {
"allow-plugins": {
"composer/package-versions-deprecated": true,
"symfony/flex": true,
"symfony/runtime": true
},
"optimize-autoloader": true,
"preferred-install": {
"*": "dist"
},
"sort-packages": true,
"platform": {
"php": "8.1.0"
}
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php72": "*",
"symfony/polyfill-php73": "*",
"symfony/polyfill-php74": "*",
"symfony/polyfill-php80": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": true,
"require": "6.1.*",
"docker": true
}
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.4",
"symfony/debug-bundle": "6.1.*",
"symfony/maker-bundle": "^1.41",
"symfony/stopwatch": "6.1.*",
"symfony/web-profiler-bundle": "6.1.*",
"zenstruck/foundry": "^1.21"
}
}
Loading

0 comments on commit 0cfe17a

Please sign in to comment.