Skip to content

Commit

Permalink
Merge pull request #21 from sjeguedes/feature/reviews-improvements
Browse files Browse the repository at this point in the history
Feature/reviews improvements
  • Loading branch information
sjeguedes authored Sep 27, 2020
2 parents 052671b + a0c88d9 commit 713372a
Show file tree
Hide file tree
Showing 336 changed files with 15,689 additions and 4,428 deletions.
16 changes: 15 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# Change after November 2018 : https://symfony.com/doc/4.1/configuration/dot-env-changes.html
# This file is a "template" of which env vars need to be defined for your application
# Copy this file to .env file for development, create environment variables when deploying to production
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration

# Website name displayed and visible in application:
WEBSITE_NAME=Your website name
# Default logo .jpeg file is provided in public/assets/mailing/logo:
ABSOLUTE_URL_FOR_HOSTED_LOGO=your_absolute_defined_path_to_hosted_mailing_logo

###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=ffa18a3943e672e66fa18cb17de6079a
Expand All @@ -20,5 +26,13 @@ DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name
# For Gmail as a transport, use: "gmail://username:password@localhost"
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode="
# Delivery is disabled by default via "null://localhost"
MAILER_URL=null://localhost
#MAILER_URL=null://localhost
# IMPORTANT: to authorize the use of google account with less secure apps: https://myaccount.google.com/lesssecureapps
MAILER_DEV_URL=mailer_server_dev_parameters
# Swift_Mailer sender email address:
MAILER_SENDER_EMAIL=your_mailing_sender_email_address
# Swift_Mailer sender name:
MAILER_SENDER_NAME=${WEBSITE_NAME} - Your mailing sender name
# Use smtp relay and credentials in prod!
MAILER_URL=mailer_server_prod_parameters
###< symfony/swiftmailer-bundle ###
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@
/.php_cs
/.php_cs.cache
###< friendsofphp/php-cs-fixer ###
### PHPUnit installed with symfony bridge and html code coverage ###
/tests-html
/tests/bootstrap.php

###> symfony/phpunit-bridge ###
.phpunit
.phpunit.result.cache
/phpunit.xml
###< symfony/phpunit-bridge ###

### PHPUnit installed with symfony bridge and html code coverage ###
/tests-html
/tests/bootstrap.php
71 changes: 70 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,71 @@
[![Maintainability](https://api.codeclimate.com/v1/badges/827a5e2ff0a280908699/maintainability)](https://codeclimate.com/github/sjeguedes/symfonyST/maintainability)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/29eb61ca510e4bcea85bdad552406ed1)](https://www.codacy.com/manual/sje.guedes/symfonyST/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=sjeguedes/symfonyST&amp;utm_campaign=Badge_Grade)
# symfonyST
Symfony 4 project

## Website project with Symfony 4 and Uikit frameworks
> https://symfony.com/doc/current/index.html
> https://getuikit.com/docs/introduction
### Local installation (can be used on deployment with ssh access with some adaptations for environment variables)

##### 1. Clone project repository master branch on GitHub with:
```
$ git clone https://github.com/sjeguedes/symfonyST.git
```

##### 2. Configure particular project needed data and your own database parameters with environment variables in `env.local` file using `.env` provided example file:
```
# Website name displayed and visible in application:
$ WEBSITE_NAME=Your website name
# Default logo .jpeg file is provided in public/assets/images/mailing/ for application automatic emails:
$ ABSOLUTE_URL_FOR_HOSTED_LOGO=your_absolute_defined_path_to_hosted_mailing_logo
# Swift mailer configuration:
$ MAILER_DEV_URL=mailer_server_dev_parameters
$ MAILER_URL=mailer_server_prod_parameters
# Sender email address:
$ MAILER_SENDER_EMAIL=your_mailing_sender_email_address
# Sender email address:
$ MAILER_SENDER_NAME=${WEBSITE_NAME} - Your mailing sender name
```
###### *This is important for local installation only:*
###### *Please note to host provided logo in `public/assets/images/mailing/` which is used to be shown with absolute URL in automatic sent emails!*

##### 3. Adapt Doctrine "dbal" section configuration (driver and server_version) to your system requirements in `doctrine.yaml` file

##### 4. Encode plain passwords manually with command line interface (CLI) using defined Symfony password encoder to customise default users application hashed passwords. Then use these data to replace existing values in `src/Utils/Database/DataFixtures/yaml/user_fixtures.yaml` to insert them in database thanks to data fixtures.

```
$ php bin/console security:encode-password Your_secured_password@1
```

###### *Please note your password must contain between 8 and 20 characters (digits and letters), with at least 1 digit, 1 uppercase letter, 1 lowercase letter and 1 special one.*

##### 5. Install dependencies defined in composer.json:

```
$ composer install
```

##### 6. Create database and schema with Doctrine migrations located in `src/Utils/Database/Migrations`:

```
$ php bin/console doctrine:database:create
```
###### *Please note this command must be used on first installation only!*
```
$ php bin/console doctrine:schema:update --force
```
###### *Prefer use migrations instead of updating schema!*
```
$ php bin/console doctrine:migrations:migrate
```

##### 7. Add starting set of data with Doctrine fixtures located in `src/Utils/Database/DataFixtures`:

```
$ php bin/console doctrine:fixtures:load
```
###### *Please note a starting set of images files which corresponds to data fixtures is already present in project!*

##### 8. Compile assets (SASS and JS files), if you really need to, thanks to Webpack and npm configuration and files sources located in `public/assets/src`. You will probably have to update defined packages.

13 changes: 13 additions & 0 deletions bin/phpunit
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env php
<?php

if (!file_exists(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);
}

if (false === getenv('SYMFONY_PHPUNIT_DIR')) {
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
}

require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
41 changes: 20 additions & 21 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,29 @@
"ext-json": "^1.6",
"ext-openssl": "^7.2",
"ext-zlib": "*",
"doctrine/doctrine-migrations-bundle": "^1.0",
"doctrine/doctrine-migrations-bundle": "^1.3",
"psr/log": "^1.1",
"ramsey/uuid-doctrine": "^1.4",
"sensio/framework-extra-bundle": "^5.2",
"symfony/asset": "^4.2",
"symfony/console": "^4.2",
"symfony/flex": "^1.0",
"symfony/form": "^4.2",
"symfony/framework-bundle": "^4.2",
"symfony/lts": "^4@dev",
"ramsey/uuid-doctrine": "^1.6",
"sensio/framework-extra-bundle": "^5.6",
"symfony/asset": "^4.4",
"symfony/console": "^4.4",
"symfony/flex": "^1.9",
"symfony/form": "^4.4",
"symfony/framework-bundle": "^4.4",
"symfony/orm-pack": "^1.0",
"symfony/property-access": "^4.2",
"symfony/property-info": "^4.2",
"symfony/security-bundle": "^4.2",
"symfony/serializer": "4.2.*",
"symfony/swiftmailer-bundle": "^3.2",
"symfony/twig-bundle": "^4.2",
"symfony/validator": "^4.2",
"symfony/yaml": "^4.2"
"symfony/property-access": "^4.4",
"symfony/property-info": "^4.4",
"symfony/security-bundle": "^4.4",
"symfony/serializer": "4.4.*",
"symfony/swiftmailer-bundle": "^3.4",
"symfony/twig-bundle": "^4.4",
"symfony/validator": "^4.4",
"symfony/yaml": "^4.4"
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.0",
"symfony/dotenv": "^4.2",
"symfony/maker-bundle": "^1.5",
"doctrine/doctrine-fixtures-bundle": "^3.3",
"symfony/dotenv": "4.4.*",
"symfony/maker-bundle": "^1.21",
"symfony/phpunit-bridge": "^5.1",
"symfony/profiler-pack": "^1.0"
},
Expand Down Expand Up @@ -84,7 +83,7 @@
"extra": {
"symfony": {
"allow-contrib": false,
"require": "4.2.*"
"require": "4.4.*"
}
}
}
Loading

0 comments on commit 713372a

Please sign in to comment.