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

Feature/reviews improvements #21

Merged
merged 26 commits into from
Sep 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
3d405fd
fixed email sending bug due to Twig template variable names error in …
sjeguedes Sep 6, 2020
f981ec4
updated login form authenticator target path redirection to be homepa…
sjeguedes Sep 7, 2020
9ff5859
reformatted code in application files by following PHP PSR-12 as far …
sjeguedes Sep 7, 2020
73e4013
added project local installation steps process as first version in RE…
sjeguedes Sep 9, 2020
ca40be7
upgraded project from Sf 4.2.12 to Sf 4.3.11 and followed markdown re…
sjeguedes Sep 10, 2020
f958fba
upgraded project from Sf 4.3.11 to Sf 4.4.13 LTS and followed markdow…
sjeguedes Sep 10, 2020
1e610a3
added uploaded images which correspond to loaded data fixtures to mak…
sjeguedes Sep 10, 2020
a69b40c
transferred template list to load in Responder PHP classes in .yaml f…
sjeguedes Sep 10, 2020
318699e
fixup! added project local installation steps process as first versio…
sjeguedes Sep 10, 2020
2256ce1
reduced Responder PHP classes by simplifying process with generic fil…
sjeguedes Sep 10, 2020
21acdb9
improved JavaScript calls by splitting application JS files with Webp…
sjeguedes Sep 12, 2020
c87989a
fixup! transferred template list to load in Responder PHP classes in …
sjeguedes Sep 12, 2020
e482b27
added user account deletion AJAX process without a form by implementi…
sjeguedes Sep 13, 2020
63543b7
fixed a bug as concerns trick comment list AJAX loading for template …
sjeguedes Sep 13, 2020
5cc82ff
cleaned event dispatcher with decorator for forward and backward comp…
sjeguedes Sep 13, 2020
2f7355f
updated README.md and added temporary Code climate analysis
sjeguedes Sep 14, 2020
2db0f3e
reformatted curly brace on method with arguments declared on multiple…
sjeguedes Sep 14, 2020
1feb727
fixed kernel exception callback in form subscriber which caused an er…
sjeguedes Sep 19, 2020
83712eb
fixed PHPUnit Symfony Bridge for Sf 4.4
sjeguedes Sep 24, 2020
4954688
fixed Login authenticator referer redirection depending on authentica…
sjeguedes Sep 24, 2020
2e525a7
fixed cropperjs custom CSS styles to override default style
sjeguedes Sep 24, 2020
dbdf210
fixed avatar upload success JS redirection by removing stupid useless…
sjeguedes Sep 25, 2020
8f8a241
reformatted ternary operator syntax in code due to wrong last replace…
sjeguedes Sep 25, 2020
63dfcfe
cleaned both profile update forms with use of JsonResponder and fixed…
sjeguedes Sep 26, 2020
4d66de1
updated README.md file for installation process
sjeguedes Sep 26, 2020
a0c88d9
added a few unit tests and reformatted some code
sjeguedes Sep 27, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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