Skip to content

Updated the application to use Symfony Flex #617

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

Closed
wants to merge 50 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
3db10d6
Moved templates
javiereguiluz Jul 27, 2017
abee439
Removed .htaccess files
javiereguiluz Jul 27, 2017
2c82b5d
Removed requirement checkers
javiereguiluz Jul 27, 2017
4c695da
Updated front controllers
javiereguiluz Jul 27, 2017
2feb362
Updated the console script
javiereguiluz Jul 27, 2017
57ea352
Renamed web/ to public/
javiereguiluz Jul 27, 2017
22dc5b9
Removed bundles
javiereguiluz Jul 27, 2017
2d9d4b1
Updated tests
javiereguiluz Jul 27, 2017
7567850
Moved app/Resources/translations/ to translations/
javiereguiluz Jul 27, 2017
e017807
Moved app/Resources/*Bundle/ to src/Resources/*Bundle/
javiereguiluz Jul 27, 2017
5b8f5c6
Moved the config from app/ to config/
javiereguiluz Jul 27, 2017
df0a471
Moved app/AppKernel.php to src/Kernel.php
javiereguiluz Jul 27, 2017
dfbd0a6
Removed app/AppCache.php
javiereguiluz Jul 27, 2017
d375c18
Added the Makefile
javiereguiluz Jul 27, 2017
10f825c
Updated PHPUnit config
javiereguiluz Jul 27, 2017
c2009ff
Updated dependencies and added symfony/flex
javiereguiluz Jul 27, 2017
ac89469
Added twig/extensions dependency
javiereguiluz Jul 27, 2017
0c99b95
Restored the app.yaml file created by Flex
javiereguiluz Jul 27, 2017
f7960d0
Added symfony/expression-language needed by @Security annotation
javiereguiluz Jul 27, 2017
3f385f9
Moved the template that displays the source code
javiereguiluz Jul 27, 2017
2840ee6
Removed a duplicated parameter
javiereguiluz Jul 27, 2017
c48e35a
Renamed the remaining AppBundle to App
javiereguiluz Jul 27, 2017
ee01429
Recreated the database
javiereguiluz Jul 27, 2017
32650bc
Updated the .gitignore contents
javiereguiluz Jul 27, 2017
1ef708f
Fixed the name of the main firewall in the test security.yaml
javiereguiluz Jul 28, 2017
14d350e
Removed some unneeded config options
javiereguiluz Jul 28, 2017
550dddc
Renamed EventListener/ to EventSubscriber/
javiereguiluz Jul 28, 2017
1095de8
Fixed the controller reference in Twig's controller() function
javiereguiluz Jul 28, 2017
80ecbe0
Fixed tests
javiereguiluz Jul 30, 2017
c3c902b
Run Travis CI tests only in PHP 7.1
javiereguiluz Jul 30, 2017
c574cb3
Fixed some Travis CI issues
javiereguiluz Jul 30, 2017
e8d0b8a
Added symfony/templating to avoid an error in LogoutUrlHelper
javiereguiluz Aug 3, 2017
764c3b2
Made config more explicit
javiereguiluz Aug 3, 2017
78e3136
Move VarDumper to dev deps
javiereguiluz Aug 3, 2017
3d1bbb9
Fix Travis CI issues
javiereguiluz Aug 3, 2017
6ba282e
Fixed the Travis checks
javiereguiluz Aug 3, 2017
997f384
Added the security:checker dependency
javiereguiluz Aug 3, 2017
96863e6
Committed a missing file
javiereguiluz Aug 3, 2017
116734b
Removed the commands to debug Travis
javiereguiluz Aug 3, 2017
8fb0223
Updated the config for Windows tests
javiereguiluz Aug 3, 2017
a018337
Used a namespace in the security config file
javiereguiluz Aug 3, 2017
ee12694
Restored a command needed for Travis
javiereguiluz Aug 3, 2017
c1bb1d2
Allow to install community recipes by default
javiereguiluz Aug 6, 2017
fe27d06
Replaced web/ by public/ in PHP CS Fixer config
javiereguiluz Aug 6, 2017
82c7c54
Removed an unnecessary "arguments" option
javiereguiluz Aug 6, 2017
d55f55f
Removed the app.yaml no longer used by Symfony Flex
javiereguiluz Aug 6, 2017
5ffff29
Removed the symfony/templating package
javiereguiluz Aug 29, 2017
4ac7d82
Updated dependencies to Symfony 3.3.8
javiereguiluz Aug 30, 2017
bb8e0f8
Committed the .dist version of the .env file
javiereguiluz Aug 30, 2017
5d7380e
Fixed .env file syntax
javiereguiluz Aug 30, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .env.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This file is a "template" of which env vars needs to be defined in your configuration or in an .env file
# Set variables here that may be different on each deployment target of the app, e.g. development, staging, production.
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration

###> symfony/framework-bundle ###
APP_ENV=dev
APP_DEBUG=1
APP_SECRET=67d829bf61dc5f87a73fd814e2c9f629
###< symfony/framework-bundle ###

###> doctrine/doctrine-bundle ###
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For a sqlite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# Set "serverVersion" to your server version to avoid edge-case exceptions and extra database calls
DATABASE_URL=sqlite:///var/data/blog.sqlite
###< doctrine/doctrine-bundle ###

###> symfony/swiftmailer-bundle ###
# 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
###< symfony/swiftmailer-bundle ###
17 changes: 13 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/app/config/parameters.yml
/build/
/node_modules/
/phpunit.xml
Expand All @@ -15,7 +14,17 @@
/var/sessions/*
!var/sessions/.gitkeep
!var/SymfonyRequirements.php
/public/build/fonts/glyphicons-*
/public/build/images/glyphicons-*
###> symfony/framework-bundle ###
.env
/public/bundles/
/var/
/vendor/
/web/bundles/
/web/build/fonts/glyphicons-*
/web/build/images/glyphicons-*
###< symfony/framework-bundle ###
###> symfony/phpunit-bridge ###
/phpunit.xml
###< symfony/phpunit-bridge ###
###> symfony/web-server-bundle ###
.web-server-pid
###< symfony/web-server-bundle ###
10 changes: 5 additions & 5 deletions .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ COMMENT;

$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('config')
->exclude('var')
->exclude('web/bundles')
->exclude('web/css')
->exclude('web/fonts')
->exclude('web/js')
->notPath('web/config.php')
->exclude('public/bundles')
->exclude('public/css')
->exclude('public/fonts')
->exclude('public/js')
Copy link
Member

Choose a reason for hiding this comment

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

public/css, public/fonts and public/js => public/build

;

return PhpCsFixer\Config::create()
Expand Down
11 changes: 4 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ cache:
matrix:
fast_finish: true
include:
- php: 5.5
- php: 5.6
- php: 7.0
- php: 7.1

before_install:
Expand All @@ -21,15 +18,15 @@ install:
- composer install

script:
- cp .env.dist .env
- ./vendor/bin/simple-phpunit
# this checks that the source code follows the Symfony Code Syntax rules
- ./vendor/bin/php-cs-fixer fix --diff --dry-run -v
# this checks that the YAML config files contain no syntax errors
- ./bin/console lint:yaml app/config
- ./bin/console lint:yaml @CodeExplorerBundle
- ./bin/console lint:yaml config
# this checks that the Twig template files contain no syntax errors
- ./bin/console lint:twig app/Resources @CodeExplorerBundle
- ./bin/console lint:twig templates
# this checks that the XLIFF translations contain no syntax errors
- ./bin/console lint:xliff app/Resources
- ./bin/console lint:xliff translations
# this checks that the application doesn't use dependencies with known security vulnerabilities
- ./bin/console security:check --end-point=http://security.sensiolabs.org/check_lock
46 changes: 46 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
ifndef APP_ENV
include .env
endif

###> symfony/framework-bundle ###
CONSOLE := $(shell which bin/console)
sf_console:
ifndef CONSOLE
@printf "Run \033[32mcomposer require cli\033[39m to install the Symfony console.\n"
endif

cache-clear:
ifdef CONSOLE
@$(CONSOLE) cache:clear --no-warmup
else
@rm -rf var/cache/*
endif
.PHONY: cache-clear

cache-warmup: cache-clear
ifdef CONSOLE
@$(CONSOLE) cache:warmup
else
@printf "cannot warmup the cache (needs symfony/console)\n"
endif
.PHONY: cache-warmup

serve_as_sf: sf_console
ifndef CONSOLE
@${MAKE} serve_as_php
endif
@$(CONSOLE) | grep server:start > /dev/null || ${MAKE} serve_as_php
@$(CONSOLE) server:start

@printf "Quit the server with \033[32;49mbin/console server:stop.\033[39m\n"

serve_as_php:
@printf "\033[32;49mServer listening on http://127.0.0.1:8000\033[39m\n";
@printf "Quit the server with CTRL-C.\n"
@printf "Run \033[32mcomposer require symfony/web-server-bundle\033[39m for a better web server\n"
php -S 127.0.0.1:8000 -t public

serve:
@${MAKE} serve_as_sf
.PHONY: sf_console serve serve_as_sf serve_as_php
###< symfony/framework-bundle ###
7 changes: 0 additions & 7 deletions app/.htaccess

This file was deleted.

16 changes: 0 additions & 16 deletions app/AppCache.php

This file was deleted.

80 changes: 0 additions & 80 deletions app/AppKernel.php

This file was deleted.

85 changes: 0 additions & 85 deletions app/config/config.yml

This file was deleted.

41 changes: 0 additions & 41 deletions app/config/config_dev.yml

This file was deleted.

Loading